Go Wiki:SQL 資料庫驅動
database/sql 和 database/sql/driver 包分別用於在 Go 中使用資料庫和實現資料庫驅動程式。
參閱設計目標文件
驅動程式
Go 的 sql 包支援的驅動程式包括
- Amazon AWS Athena: https://github.com/uber/athenadriver
- AWS Athena: https://github.com/segmentio/go-athena
- AWS DynamoDB: https://github.com/btnguyen2k/godynamo
- 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 (使用 HTTP API): https://github.com/mailru/go-clickhouse
- ClickHouse (使用 原生 TCP 介面): https://github.com/ClickHouse/clickhouse-go
- CockroachDB:使用任何 PostgreSQL 驅動程式
- Couchbase N1QL: https://github.com/couchbase/go_n1ql
- DB2 LUW (使用 cgo): https://github.com/asifjalil/cli
- DB2 LUW 和 DB2/Z with DB2-Connect: https://bitbucket.org/phiggins/db2cli (最後更新於 2015-08)
- DB2 LUW, z/OS, iSeries 和 Informix: https://github.com/ibmdb/go_ibm_db
- Databricks: https://github.com/databricks/databricks-sql-go
- DuckDB: https://github.com/marcboeker/go-duckdb
- Exasol (純 Go): https://github.com/exasol/exasol-driver-go
- Firebird SQL: https://github.com/nakagami/firebirdsql
- Genji (純 go): https://github.com/genjidb/genji
- Google Cloud BigQuery: https://github.com/solcates/go-sql-bigquery
- Google Cloud Spanner: https://github.com/googleapis/go-sql-spanner
- Google Cloud Spanner: https://github.com/rakyll/go-sql-driver-spanner
- MS ADODB: https://github.com/mattn/go-adodb
- MS SQL Server (純 go): https://github.com/microsoft/go-mssqldb
- MS SQL Server (使用 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/go-mysql-org/go-mysql
[**]
(也處理複製) - MySQL: https://github.com/ziutek/mymysql
[*]
- ODBC: https://bitbucket.org/miquella/mgodbc (最後更新於 2016-02)
- ODBC: https://github.com/alexbrainman/odbc
- Oracle (純 go): https://github.com/sijms/go-ora
- Oracle (使用 cgo): https://github.com/godror/godror
- Oracle (使用 cgo): https://github.com/mattn/go-oci8
- Oracle (使用 cgo): https://gopkg.in/rana/ora.v4
- Postgres (純 Go): https://github.com/jackc/pgx
[*]
- Postgres (純 Go): https://github.com/lib/pq
[*]
- Postgres (使用 cgo): https://github.com/jbarham/gopgsqldriver
- Presto: https://github.com/prestodb/presto-go-client
- QL: https://pkg.go.dev/modernc.org/ql
- SAP ASE (純 go): https://github.com/SAP/go-ase
- SAP ASE (使用 cgo): https://github.com/SAP/cgo-ase
- SAP HANA (純 go): https://github.com/SAP/go-hdb
- SAP HANA (使用 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 (使用 cgo): https://github.com/gwenn/gosqlite - 支援 SQLite 動態資料型別
- SQLite (使用 cgo): https://github.com/mattn/go-sqlite3
[*]
- SQLite (使用 cgo): https://github.com/mxk/go-sqlite
- SQLite: (純 go): https://modernc.org/sqlite
- SQLite: (純 go): https://github.com/ncruces/go-sqlite3
- SQLite: (使用 cgo): https://github.com/rsc/sqlite
- SingleStore:使用任何 MySQL 驅動程式
- Snowflake (純 Go): https://github.com/snowflakedb/gosnowflake
- Sybase ASE (純 go): https://github.com/thda/tds
- Sybase SQL Anywhere: https://github.com/a-palchikov/sqlago
- TiDB:使用任何 MySQL 驅動程式
- Trino: https://github.com/trinodb/trino-go-client
- Vertica: https://github.com/vertica/vertica-sql-go
- Vitess: https://pkg.go.dev/vitess.io/vitess/go/vt/vitessdriver
- YDB (純 go): https://github.com/ydb-platform/ydb-go-sdk
- YQL (Yahoo! Query Language): https://github.com/mattn/go-yql
標有 [*]
的驅動程式既包含在相容性測試套件中,也通過了位於 https://github.com/bradfitz/go-sql-test 的該套件。標有 [**]
的驅動程式通過了相容性測試套件,但目前不包含在其中。
此內容是 Go Wiki 的一部分。