Documentation ¶
Index ¶
- type DB
- type Tx
- func (tx *Tx) Commit() error
- func (tx *Tx) CurTime() (time.Time, error)
- func (tx *Tx) Exec(query string, args ...interface{}) (sql.Result, error)
- func (tx *Tx) Query(query string, args ...interface{}) (*sql.Rows, error)
- func (tx *Tx) QueryRow(query string, args ...interface{}) *sql.Row
- func (tx *Tx) Rollback() error
- func (tx *Tx) Start() error
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB wraps a sql.DB to add special behaviors based on the db type
func (*DB) NewUnstartedTx ¶
type Tx ¶
type Tx struct {
// contains filtered or unexported fields
}
Tx wraps a sql.Tx to offer: * apply some statement mutations before executing it * locking around concurrent executions of statements (since the underlying sql driver doesn't support concurrent statements on the same connection/transaction)
Click to show internal directories.
Click to hide internal directories.