Documentation
¶
Index ¶
- type DB
- func (db *DB) Close() error
- func (db *DB) Conn(ctx context.Context) (*sql.Conn, error)
- func (db *DB) Do(ctx context.Context, f func(tx *Tx) error) error
- func (db *DB) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
- func (db *DB) NewTx(ctx context.Context) (*Tx, error)
- func (db *DB) NewUnstartedTx() *Tx
- func (db *DB) Type() Type
- type Tx
- func (tx *Tx) Commit() error
- func (tx *Tx) CurTime() (time.Time, error)
- func (tx *Tx) DBType() Type
- func (tx *Tx) Exec(query string, args ...any) (sql.Result, error)
- func (tx *Tx) ID() string
- func (tx *Tx) Query(query string, args ...any) (*sql.Rows, error)
- func (tx *Tx) QueryRow(query string, args ...any) *sql.Row
- func (tx *Tx) Rollback() error
- func (tx *Tx) Start(ctx context.Context) 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) ExecContext ¶ added in v0.9.0
func (*DB) NewUnstartedTx ¶
Click to show internal directories.
Click to hide internal directories.