Table of Contents
SQL database drivers
The database/sql and database/sql/driver packages are designed for using databases from Go and implementing database drivers, respectively.
See the design goals doc:
Drivers
Drivers for Go's sql package include:
- AWS Athena: https://github.com/segmentio/go-athena
- Amazon AWS Athena: https://github.com/uber/athenadriver
- Apache Avatica/Phoenix: https://github.com/apache/calcite-avatica-go
- Apache H2: https://github.com/jmrobles/h2go
- Apache Hive: https://github.com/sql-machine-learning/gohive
- Apache Ignite/GridGain: https://github.com/amsokol/ignite-go-client
- Apache Impala: https://github.com/bippio/go-impala
- Azure Cosmos DB: https://github.com/btnguyen2k/gocosmos
- ClickHouse (uses HTTP API): https://github.com/mailru/go-clickhouse
- ClickHouse (uses native TCP interface): https://github.com/ClickHouse/clickhouse-go
- CockroachDB: Use any PostgreSQL driver
- Couchbase N1QL: https://github.com/couchbase/go_n1ql
- DB2 LUW (uses cgo): https://github.com/asifjalil/cli
- DB2 LUW and DB2/Z with DB2-Connect: https://bitbucket.org/phiggins/db2cli (Last updated 2015-08)
- DB2 LUW, z/OS, iSeries and Informix: https://github.com/ibmdb/go_ibm_db
- Databricks: https://github.com/databricks/databricks-sql-go
- DuckDB: https://github.com/marcboeker/go-duckdb
- Exasol: (pure Go): https://github.com/exasol/exasol-driver-go
- Firebird SQL: https://github.com/nakagami/firebirdsql
- Genji (pure go): https://github.com/genjidb/genji
- Google Cloud BigQuery: https://github.com/solcates/go-sql-bigquery
- Google Cloud Spanner: https://github.com/rakyll/go-sql-driver-spanner
- MS ADODB: https://github.com/mattn/go-adodb
- MS SQL Server (pure go): https://github.com/denisenkom/go-mssqldb
- MS SQL Server (uses cgo): https://github.com/minus5/gofreetds
- MaxCompute: https://github.com/sql-machine-learning/gomaxcompute
- MySQL: https://github.com/go-sql-driver/mysql/
[*] - MySQL: https://github.com/siddontang/go-mysql/
[**](also handles replication) - MySQL: https://github.com/ziutek/mymysql
[*] - ODBC: https://bitbucket.org/miquella/mgodbc (Last updated 2016-02)
- ODBC: https://github.com/alexbrainman/odbc
- Oracle (pure go): https://github.com/sijms/go-ora
- Oracle (uses cgo): https://github.com/godror/godror
- Oracle (uses cgo): https://github.com/mattn/go-oci8
- Oracle (uses cgo): https://gopkg.in/rana/ora.v4
- Postgres (pure Go): https://github.com/jackc/pgx
[*] - Postgres (pure Go): https://github.com/lib/pq
[*] - Postgres (uses cgo): https://github.com/jbarham/gopgsqldriver
- Presto: https://github.com/prestodb/presto-go-client
- QL: https://pkg.go.dev/modernc.org/ql
- SAP ASE (pure go): https://github.com/SAP/go-ase
- SAP ASE (uses cgo): https://github.com/SAP/cgo-ase
- SAP HANA (pure go): https://github.com/SAP/go-hdb
- SAP HANA (uses cgo): https://help.sap.com/viewer/0eec0d68141541d1b07893a39944924e/2.0.03/en-US/0ffbe86c9d9f44338441829c6bee15e6.html
- SQL over REST: https://github.com/adaptant-labs/go-sql-rest-driver
- SQLite (uses cgo): https://github.com/gwenn/gosqlite - Supports SQLite dynamic data typing
- SQLite (uses cgo): https://github.com/mattn/go-sqlite3
[*] - SQLite (uses cgo): https://github.com/mxk/go-sqlite
- SQLite: (pure go): https://modernc.org/sqlite
- SQLite: (uses cgo): https://github.com/rsc/sqlite
- SingleStore: Use any MySQL driver
- Snowflake (pure Go): https://github.com/snowflakedb/gosnowflake
- Sybase ASE (pure go): https://github.com/thda/tds
- Sybase SQL Anywhere: https://github.com/a-palchikov/sqlago
- TiDB: Use any MySQL driver
- Vertica: https://github.com/vertica/vertica-sql-go
- Vitess: https://pkg.go.dev/vitess.io/vitess/go/vt/vitessdriver
- YDB (pure go): https://github.com/ydb-platform/ydb-go-sdk
- YQL (Yahoo! Query Language): https://github.com/mattn/go-yql
Drivers marked with [*] are both included in and pass the compatibility test suite at https://github.com/bradfitz/go-sql-test.
Drivers marked with [**] pass the compatibility test suite but are not currently included in it.
AVX512 Articles AssemblyPolicy Benchmarks Blogs Books BoundingResourceUse CSSStyleGuide ChromeOS CodeReview CodeReviewComments CodeReviewConcurrency CodeTools Comments CommitMessage CommonMistakes CompilerOptimizations Conferences Configuring GoLand for WebAssembly Contributing to gopls CoreDumpDebugging Courses CreatingSubRepository CustomPprofProfiles Darwin DashboardBuilders Deprecated DesignDocuments Diagnostics Download build farm failed logs and debugging DragonFly BSD ErrorValueFAQ Errors ExperienceReports FileTreeDocumentation FreeBSD FromXToGo Frozen Fuzzing trophy case GOPATH Gardening GcToolchainTricks GccgoCrossCompilation GerritAccess GerritBot GithubAccess Go 1.10 Release Party Go 1.6 release party Go 1.8 Release Party Go Community Slides Go Release Cycle Go2 Go2ErrorHandlingFeedback Go2ErrorValuesFeedback Go2GenericsFeedback GoArm GoForCPPProgrammers GoGenerateTools GoGetProxyConfig GoGetTools GoMips GoStrings GoTalks GoUserGroups GoUsers Gomote Gopher HandlingIssues Home HostedContinuousIntegration How to ask for help HowToAsk IDEsAndTextEditorPlugins InstallFromSource InstallTroubleshooting InterfaceSlice InvalidFlag Iota Learn LearnConcurrency LearnErrorHandling LearnServerProgramming LearnTesting Linux LinuxKernelSignalVectorBug Livestreams LockOSThread MacOS12BSDThreadRegisterIssue MethodSets MinimumRequirements MinorReleases Mobile Modules MutexOrChannel NativeClient NetBSD NewSpeakers NoMeToo NoPlusOne NonEnglish OpenBSD PackagePublishing PanicAndRecover PerfDashboard Performance Plan9 Podcasts PortingPolicy PriorDiscussion Projects Proposals ProviderIntegration Questions Quiet Weeks Range RateLimiting ResearchPapers Resolving Problems From Modified Module Path Resources for slog SQLDrivers SQLInterface Screencasts SettingGOPATH SignalHandling SimultaneousAssignment SliceTricks SlowBots Solaris Spectre Spelling Style SuccessStories Switch TableDrivenTests TargetSpecific TestComments TestFailures Timeouts Training Ubuntu Watchflakes WebAccessibilityResourcesAndTips Well known struct tags WhyGo Windows WindowsBuild WindowsCrossCompiling WindowsDLLs X Repositories _Footer cgo golang tools gopherbot gopls integrator FAQ gopls heapdump13 heapdump14 heapdump15 through heapdump17 heapdump15