Versions in this module Expand all Collapse all v0 v0.11.0 May 6, 2021 v0.10.1 Dec 20, 2017 Changes in this version + type ConfigTags map[string]string + type Count struct + func (c Count) RowCount() uint64 + type Counter struct + RowCount uint64 + type DB struct + func Open(driverName, dataSourceName string) (*DB, error) + func Wrap(db *sql.DB) *DB + func (db *DB) DataSource() *sql.DB + func (db *DB) Operation() *Operation + type MagicTable struct + Name string + Object interface{} + RType reflect.Type + func Table(name string, obj interface{}) *MagicTable + func (t *MagicTable) Configure(conf ConfigTags) + func (t *MagicTable) FieldNames() []string + func (t *MagicTable) InsertArgs(source interface{}) []interface{} + func (t *MagicTable) InsertSQL() string + func (t *MagicTable) ScanStruct(dest interface{}) []interface{} + func (t *MagicTable) UpdateArgs(source interface{}) []interface{} + func (t *MagicTable) UpdateSQL() string + type NullableField struct + Value interface{} + func (nf *NullableField) Scan(src interface{}) error + type Operation struct + Dbg bool + func NewOperation(db *DB) *Operation + func (op *Operation) BeginTransaction() + func (op *Operation) EndTransaction() + func (op *Operation) Err() error + func (op *Operation) Exec(query string, args ...interface{}) *Result + func (op *Operation) OperationTable(mt *MagicTable) *OperationTable + func (op *Operation) Prepare(query string) *Stmt + func (op *Operation) Query(query string, args ...interface{}) *Rows + func (op *Operation) Reset() + func (op *Operation) Rollback() + func (op *Operation) Save(tableName string, obj interface{}) *Result + func (op *Operation) Select(tableName string, obj interface{}) Select + func (op *Operation) SetErr(err error) + func (op *Operation) Table(tableName string, obj interface{}) *OperationTable + type OperationTable struct + func (ot *OperationTable) Insert(obj interface{}) *Result + func (ot *OperationTable) Reconfigure(conf ConfigTags) + func (ot *OperationTable) Save(obj interface{}) *Result + func (ot *OperationTable) Select() Select + type Querier interface + Exec func(string, ...interface{}) (sql.Result, error) + Prepare func(string) (*sql.Stmt, error) + Query func(string, ...interface{}) (*sql.Rows, error) + type Result struct + func (r *Result) Err() error + func (r *Result) LastInsertId() int64 + func (r *Result) RowsAffected() int64 + type Rows struct + func (r *Rows) Close() + func (r *Rows) Columns() []string + func (r *Rows) Err() error + func (r *Rows) Next() bool + func (r *Rows) Scan(dest ...interface{}) + type Scannable interface + Scan func(...interface{}) + type Select struct + func NewSelect(ot *OperationTable) Select + func (s Select) AllObjects(ptr interface{}) + func (s Select) Count() Count + func (s Select) EachObject(dest interface{}, cb func()) + func (s Select) EachRow(cb func(Scannable)) + func (s Select) First(dest interface{}) (ok bool) + func (s Select) Limit(l uint64) Select + func (s Select) Offset(o uint64) Select + func (s Select) Order(o string) Select + func (s Select) Query() *Rows + func (s Select) SQL() string + func (s Select) Where(w string, args ...interface{}) Select + type Stmt struct + func (s *Stmt) Close() + func (s *Stmt) Err() error + func (s *Stmt) Exec(args ...interface{}) *Result + func (s *Stmt) Query(args ...interface{}) *Rows