Versions in this module Expand all Collapse all v2 v2.0.0 Apr 14, 2022 Changes in this version + var Debug bool + type DB struct + func Open(driverName string, dsn string, debugs bool) (*DB, error) + func OpenWithConfig(driverName string, dsn string, maxOpen int, maxIdle int, debugs bool) (*DB, error) + func (db *DB) Begin() error + func (db *DB) CleanDb() *DB + func (db *DB) CloneIfDifferentRoutine() + func (db *DB) Commit() + func (db *DB) Rollback() + func (db DB) CleanOrders() DB + func (db DB) Clone() DB + func (db DB) Count(columnName string) (int64, error) + func (db DB) Delete(vs ...interface{}) (int64, int64, error) + func (db DB) DoTransaction(work TransactionWork) (interface{}, error) + func (db DB) ExecuteRaw() (int64, int64, error) + func (db DB) ExecuteStatement(statement string, data ...interface{}) (sql.Result, error) + func (db DB) First(vs interface{}) (interface{}, error) + func (db DB) Insert(v interface{}, columns ...string) (int64, int64, error) + func (db DB) IsInTransaction() bool + func (db DB) OrderBy(field string, t structs.OrderType) DB + func (db DB) OrderByAsc(field string) DB + func (db DB) OrderByDesc(field string) DB + func (db DB) Page(index int, pageSize int) DB + func (db DB) Raw(sql string, datas ...interface{}) DB + func (db DB) RawDb() *sql.DB + func (db DB) Select(vs interface{}, columns ...string) (interface{}, error) + func (db DB) SelectByModel(model structs.TableModel) (interface{}, error) + func (db DB) Sum(columnName string) structs.CountResult + func (db DB) Table(table string) DB + func (db DB) Update(v interface{}, columns ...string) (int64, int64, error) + func (db DB) Where(cnd cnds.Condition) DB + func (db DB) Where2(sql string, patches ...interface{}) DB + type TransactionWork func(databaseTx *DB) (interface{}, error) Other modules containing this package gitee.com/janyees/gom