Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotMatchDestination = errors.New("not matching destination to scan") ErrNotReadableValue = errors.New("value not addressable or interfaceable") ErrNotSettable = errors.New("passed in variable is not settable") ErrUnsupportedValueType = errors.New("unsupported unmarshal type") )
View Source
var ErrNotFound = sql.ErrNoRows
Functions ¶
This section is empty.
Types ¶
type BulkInserter ¶
type BulkInserter struct {
// contains filtered or unexported fields
}
func NewBulkInserter ¶
func NewBulkInserter(sqlConn SqlConn, stmt string) (*BulkInserter, error)
func (*BulkInserter) Flush ¶
func (bi *BulkInserter) Flush()
func (*BulkInserter) Insert ¶
func (bi *BulkInserter) Insert(args ...interface{}) error
func (*BulkInserter) SetResultHandler ¶
func (bi *BulkInserter) SetResultHandler(handler ResultHandler)
func (*BulkInserter) UpdateOrDelete ¶
func (bi *BulkInserter) UpdateOrDelete(fn func())
func (*BulkInserter) UpdateStmt ¶
func (bi *BulkInserter) UpdateStmt(stmt string) error
type ResultHandler ¶
type Session ¶
type Session interface {
Exec(query string, args ...interface{}) (sql.Result, error)
Prepare(query string) (StmtSession, error)
QueryRow(v interface{}, query string, args ...interface{}) error
QueryRowPartial(v interface{}, query string, args ...interface{}) error
QueryRows(v interface{}, query string, args ...interface{}) error
QueryRowsPartial(v interface{}, query string, args ...interface{}) error
}
Session stands for raw connections or transaction sessions
type SqlConn ¶
SqlConn only stands for raw connections, so Transact method can be called.
func NewSqlConn ¶
type StmtSession ¶
type StmtSession interface {
Close() error
Exec(args ...interface{}) (sql.Result, error)
QueryRow(v interface{}, args ...interface{}) error
QueryRowPartial(v interface{}, args ...interface{}) error
QueryRows(v interface{}, args ...interface{}) error
QueryRowsPartial(v interface{}, args ...interface{}) error
}
Click to show internal directories.
Click to hide internal directories.