Versions in this module Expand all Collapse all v1 v1.0.0 Aug 22, 2020 Changes in this version + func ContainsFold(a, b string) bool + func FirstWord(s string) string + func IfElse(ifCondition bool, ifValue, elseValue string) string + func ImplSQLScanner(t reflect.Type) bool + func ImplType(src, target reflect.Type) bool + func IsQuerySQL(sql string) (string, bool) + func LookupDriverName(driver driver.Driver) string + type ExecResult struct + CostTime time.Duration + Error error + Headers []string + IsQuery bool + LastInsertID int64 + Rows interface{} + RowsAffected int64 + RowsCount int + func (r ExecResult) StringRows() [][]string + type MapMapping struct + func (m *MapMapping) RowsData() interface{} + func (m *MapMapping) Scan(rowNum int) error + type MapPreparer struct + NullReplace string + func NewMapPreparer(nullReplace string) *MapPreparer + func (m *MapPreparer) Prepare(rows *sql.Rows, columns []string) Mapping + type Mapping interface + RowsData func() interface{} + Scan func(rowNum int) error + type MiniDB interface + Exec func(query string, args ...interface{}) (sql.Result, error) + Query func(query string, args ...interface{}) (*sql.Rows, error) + type NullAny struct + Type reflect.Type + Val reflect.Value + func (n *NullAny) Scan(value interface{}) error + type Preparer interface + Prepare func(rows *sql.Rows, columns []string) Mapping + type SQLExec struct + func NewSQLExec(db MiniDB) *SQLExec + func (s *SQLExec) DoUpdate(query string, vars ...interface{}) (result ExecResult) + type SQLRun struct + MaxRows int + func NewSQLRun(db MiniDB, preparer Preparer) *SQLRun + func (s *SQLRun) DoExec(query string, args ...interface{}) ExecResult + func (s *SQLRun) DoQuery(query string, args ...interface{}) (result ExecResult) + type StructMapping struct + func (s *StructMapping) RowsData() interface{} + func (s *StructMapping) Scan(rowNum int) error + type StructPreparer struct + StructType reflect.Type + func NewStructPreparer(v interface{}) *StructPreparer + func (m *StructPreparer) Prepare(rows *sql.Rows, columns []string) Mapping