Versions in this module Expand all Collapse all v1 v1.0.1 Jun 16, 2021 v1.0.0 Jun 11, 2021 Changes in this version + var ErrNotFound = sql.ErrNoRows + var ErrNotMatchDestination = errors.New("not matching destination to scan") + var ErrNotReadableValue = errors.New("value not addressable or interfaceable") + var ErrNotSettable = errors.New("passed in variable is not settable") + var ErrUnsupportedValueType = errors.New("unsupported unmarshal type") + type BulkInserter struct + func NewBulkInserter(sqlConn SqlConn, stmt string) (*BulkInserter, error) + func (bi *BulkInserter) Flush() + func (bi *BulkInserter) Insert(args ...interface{}) error + func (bi *BulkInserter) SetResultHandler(handler ResultHandler) + func (bi *BulkInserter) UpdateOrDelete(fn func()) + func (bi *BulkInserter) UpdateStmt(stmt string) error + type ResultHandler func(sql.Result, error) + type Session interface + Exec func(query string, args ...interface{}) (sql.Result, error) + Prepare func(query string) (StmtSession, error) + QueryRow func(v interface{}, query string, args ...interface{}) error + QueryRowPartial func(v interface{}, query string, args ...interface{}) error + QueryRows func(v interface{}, query string, args ...interface{}) error + QueryRowsPartial func(v interface{}, query string, args ...interface{}) error + type SqlConn interface + Transact func(func(session Session) error) error + func NewMysql(datasource string, opts ...SqlOption) SqlConn + func NewSqlConn(driverName, datasource string, opts ...SqlOption) SqlConn + type SqlOption func(*commonSqlConn) + type StmtSession interface + Close func() error + Exec func(args ...interface{}) (sql.Result, error) + QueryRow func(v interface{}, args ...interface{}) error + QueryRowPartial func(v interface{}, args ...interface{}) error + QueryRows func(v interface{}, args ...interface{}) error + QueryRowsPartial func(v interface{}, args ...interface{}) error