Documentation ¶
Overview ¶
Package mysql wraps mysql driver as an adapter for REL.
Usage:
// open mysql connection. // note: `clientFoundRows=true` is required for update and delete to works correctly. adapter, err := mysql.Open("root@(127.0.0.1:3306)/rel_test?clientFoundRows=true&charset=utf8&parseTime=True&loc=Local") if err != nil { panic(err) } defer adapter.Close() // initialize REL's repo. repo := rel.New(adapter)
Index ¶
Constants ¶
View Source
const Name string = "mysql"
Name of database type this adapter implements.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ValueConvert ¶ added in v0.2.0
type ValueConvert struct{}
ValueConvert converts values to MySQL literals.
func (ValueConvert) ConvertValue ¶ added in v0.2.0
func (c ValueConvert) ConvertValue(v interface{}) (driver.Value, error)
Click to show internal directories.
Click to hide internal directories.