golang 数据库驱动
http://xiequan.info/golang-mysql-%E6%95%B0%E6%8D%AE%E5%BA%93%E5%BC%80%E5%8F%91/
MySQL以免费、开源、使用方便为优势成为了很多Web开发的后端数据库存储引擎。数据库操作是Web开发中占有极其重要的一部分。数据也是程序最核心的东西。
Go语言作为一门新兴语言他是怎么对Mysql进行开发的呢。
MySQL驱动:
Go中支持MySQL的驱动目前比较多,有如下几种,有些是支持database/sql标准,而有些是采用了自己的实现接口,常用的有如下几种:
- https://github.com/go-sql-driver/mysql 支持database/sql,全部采用go写。
- https://github.com/ziutek/mymysql 支持database/sql,也支持自定义的接口,全部采用go写。
- https://github.com/Philio/GoMySQL 不支持database/sql,自定义接口,全部采用go写。
------------------------------------
[Microsoft SQL server driver written in go language](https://github.com/denisenkom/go-mssqldb)
A pure Go MSSQL driver for Go's database/sql package
Features
- Can be used with SQL Server 2005 or newer
- Can be used with Microsoft Azure SQL Database
- Can be used on all go supported platforms (e.g. Linux, Mac OS X and Windows)
- Supports new date/time types: date, time, datetime2, datetimeoffset
- Supports string parameters longer than 8000 characters
- Supports encryption using SSL/TLS
- Supports SQL Server and Windows Authentication
- Supports Single-Sign-On on Windows
- Supports connections to AlwaysOn Availability Group listeners, including re-direction to read-only replicas.
Known Issues
- SQL Server 2008 and 2008 R2 engine cannot handle login records when SSL encryption is not disabled. To fix SQL Server 2008 R2 issue, install SQL Server 2008 R2 Service Pack 2. To fix SQL Server 2008 issue, install Microsoft SQL Server 2008 Service Pack 3 and Cumulative update package 3 for SQL Server 2008 SP3. More information: http://support.microsoft.com/kb/2653857
======================
XORM - eXtra ORM for Go 操作数据库库
http://xorm.io/
Simple and Powerful ORM for Go, support mysql,postgres,tidb,sqlite3,mssql,oracle,ql
驱动支持
- Mysql: github.com/go-sql-driver/mysql
- MyMysql: github.com/ziutek/mymysql/godrv
- Postgres: github.com/lib/pq
- Tidb: github.com/pingcap/tidb
- SQLite: github.com/mattn/go-sqlite3
- MsSql: github.com/denisenkom/go-mssqldb
- MsSql: github.com/lunny/godbc
- Oracle: github.com/mattn/go-oci8

浙公网安备 33010602011771号