Documentation
¶
Overview ¶
Package mysql registers the "mysql" driver for dbx.
Import this package once in your main function to enable mysql:
import _ "github.com/aisphereio/kernel/dbx/mysql"
Then use `dbx.Config{Driver: "mysql", DSN: "user:pass@tcp(host:3306)/db"}` with dbx.New.
The driver uses gorm.io/driver/mysql, which wraps go-sql-driver/mysql. It supports all GORM features including OnConflict (translated to INSERT ... ON DUPLICATE KEY UPDATE), soft-delete, and autoCreate/UpdateTime.
Click to show internal directories.
Click to hide internal directories.