Versions in this module Expand all Collapse all v1 v1.0.0 Sep 24, 2023 Changes in this version + type DB struct + func GetDB(name *string, logger *log.Logger) *DB + func (db *DB) Begin() *Tx + func (db *DB) Delete(table string, wheres string, args ...interface{}) (int64, error) + func (db *DB) Exec(requestSql string, args ...interface{}) (int64, error) + func (db *DB) Insert(table string, data map[string]interface{}) (int64, error) + func (db *DB) Query(requestSql string, args ...interface{}) ([]map[string]interface{}, error) + func (db *DB) Replace(table string, data map[string]interface{}) (int64, error) + func (db *DB) Update(table string, data map[string]interface{}, wheres string, args ...interface{}) (int64, error) + type Tx struct + func (tx *Tx) CheckFinished() error + func (tx *Tx) Commit() error + func (tx *Tx) Delete(table string, wheres string, args ...interface{}) (int64, error) + func (tx *Tx) Exec(requestSql string, args ...interface{}) (int64, error) + func (tx *Tx) Finish(ok bool) error + func (tx *Tx) Insert(table string, data map[string]interface{}) (int64, error) + func (tx *Tx) Query(requestSql string, args ...interface{}) ([]map[string]interface{}, error) + func (tx *Tx) Replace(table string, data map[string]interface{}) (int64, error) + func (tx *Tx) Rollback() error + func (tx *Tx) Update(table string, data map[string]interface{}, wheres string, args ...interface{}) (int64, error)