Versions in this module Expand all Collapse all v1 v1.10.2 May 23, 2021 Changes in this version + const Mysql + const Postgres + const Sqlite + var ErrOptimisticLock = errors.New("Optimistic Lock Error") + type Binder interface + BindNamed func(query string, arg interface{}) (string, []interface{}, error) + type DB struct + func Connect(driver, datasource string) (*DB, error) + func (db *DB) Close() error + func (db *DB) Driver() Driver + func (db *DB) Lock(fn func(Execer, Binder) error) error + func (db *DB) Update(fn func(Execer, Binder) error) (err error) + func (db *DB) View(fn func(Queryer, Binder) error) error + type Driver int + type Execer interface + Exec func(query string, args ...interface{}) (sql.Result, error) + type Locker interface + Lock func() + RLock func() + RUnlock func() + Unlock func() + type Queryer interface + Query func(query string, args ...interface{}) (*sql.Rows, error) + QueryRow func(query string, args ...interface{}) *sql.Row + type Scanner interface + Scan func(dest ...interface{}) error