package
Version:
v0.16.0
Opens a new window with list of versions in this module.
Published: Jun 23, 2021
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package mysql wraps mysql driver as an adapter for REL.
Usage:
// open mysql connection.
adapter, err := mysql.Open("root@(127.0.0.1:3306)/rel_test?charset=utf8&parseTime=True&loc=Local")
if err != nil {
panic(err)
}
defer adapter.Close()
// initialize REL's repo.
repo := rel.New(adapter)
View Source
var (
Config = sql.Config{
DropIndexOnTable: true,
Placeholder: "?",
EscapeChar: "`",
IncrementFunc: incrementFunc,
ErrorFunc: errorFunc,
MapColumnFunc: sql.MapColumn,
}
)
Adapter definition for mysql database.
New mysql adapter using existing connection.
Open mysql connection using dsn.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.