编写驱动
少于1分钟
编写新驱动 Write new driver
GORM provides official support for sqlite, mysql, postgres, sqlserver.
GORM 为 sqlite、mysql、postgres、sqlserver 提供了官方支持。
Some databases may be compatible with the mysql or postgres dialect, in which case you could just use the dialect for those databases.
一些数据库可能与 mysql 或 postgres 方言兼容,在这种情况下,您可以使用这些数据库的方言。
For others, you can create a new driver, it needs to implement the dialect interface.
对于其他数据库,您可以创建一个新驱动程序,它需要实现 方言接口。
| |
Checkout the MySQL Driver as example
以 MySQL 驱动程序为例