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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)