Documentation ¶
Index ¶
- func AtP(index int) string
- func Colon(index int) string
- func Configure(f func(Config) Config)
- func Dollar(index int) string
- func PanicOnLogicalError(err error)
- func PrintLogicalError(err error)
- func Question(index int) string
- type Config
- type DB
- func (d *DB) Begin(ctx context.Context, options *TxOptions) (txCtx context.Context, err error)
- func (d *DB) Commit(ctx context.Context) (err error)
- func (d *DB) End(ctx context.Context, txErr error) (commitErr error, rollbackErr error)
- func (d *DB) Exec(query string, arg ...any) (result Result, err error)
- func (d *DB) ExecContext(ctx context.Context, query string, arg ...any) (result Result, err error)
- func (d *DB) Executor(ctx context.Context) (executor Executor)
- func (d *DB) NamedExec(query string, args map[string]any) (result Result, err error)
- func (d *DB) NamedExecContext(ctx context.Context, query string, args map[string]any) (result Result, err error)
- func (d *DB) NamedQuery(query string, args map[string]any) (rows *Rows, err error)
- func (d *DB) NamedQueryContext(ctx context.Context, query string, args map[string]any) (rows *Rows, err error)
- func (d *DB) Query(query string, args ...any) (rows *Rows, err error)
- func (d *DB) QueryContext(ctx context.Context, query string, args ...any) (rows *Rows, err error)
- func (d *DB) Rollback(ctx context.Context) (err error)
- func (d *DB) Transactional(ctx context.Context, f func(ctx context.Context) error, options *TxOptions) (beginErr error, err error, commitErr error, rollbackErr error)
- type Executor
- type Frame
- type Placeholder
- type Result
- type Rows
- type StackTrace
- type Tx
- func (t *Tx) Commit() (err error)
- func (t *Tx) Exec(query string, arg ...any) (result Result, err error)
- func (t *Tx) ExecContext(ctx context.Context, query string, arg ...any) (result Result, err error)
- func (t *Tx) NamedExec(query string, args map[string]any) (result Result, err error)
- func (t *Tx) NamedExecContext(ctx context.Context, query string, args map[string]any) (result Result, err error)
- func (t *Tx) NamedQuery(query string, args map[string]any) (rows *Rows, err error)
- func (t *Tx) NamedQueryContext(ctx context.Context, query string, args map[string]any) (rows *Rows, err error)
- func (t *Tx) Query(query string, args ...any) (rows *Rows, err error)
- func (t *Tx) QueryContext(ctx context.Context, query string, args ...any) (rows *Rows, err error)
- func (t *Tx) Rollback() (err error)
- type TxController
- type TxOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PanicOnLogicalError ¶
func PanicOnLogicalError(err error)
func PrintLogicalError ¶
func PrintLogicalError(err error)
Types ¶
type Config ¶
type Config struct { Placeholder Placeholder LogicalErrorHandler func(err error) }
type DB ¶
func (*DB) ExecContext ¶
func (*DB) NamedExecContext ¶
func (*DB) NamedQuery ¶
func (*DB) NamedQueryContext ¶
func (*DB) QueryContext ¶
type Executor ¶
type Executor interface { Exec(query string, args ...any) (result Result, err error) NamedExec(query string, args map[string]any) (result Result, err error) ExecContext(ctx context.Context, query string, args ...any) (result Result, err error) NamedExecContext(ctx context.Context, query string, args map[string]any) (result Result, err error) Query(query string, args ...any) (rows *Rows, err error) NamedQuery(query string, args map[string]any) (rows *Rows, err error) QueryContext(ctx context.Context, query string, args ...any) (rows *Rows, err error) NamedQueryContext(ctx context.Context, query string, args map[string]any) (rows *Rows, err error) }
type Placeholder ¶
type StackTrace ¶
type StackTrace []Frame
type Tx ¶
func (*Tx) ExecContext ¶
func (*Tx) NamedExecContext ¶
func (*Tx) NamedQuery ¶
func (*Tx) NamedQueryContext ¶
func (*Tx) QueryContext ¶
type TxController ¶
type TxController interface { Transactional( ctx context.Context, f func(ctx context.Context) error, options *TxOptions, ) (beginErr error, err error, commitErr error, rollbackErr error) Begin(ctx context.Context, options *TxOptions) (txCtx context.Context, err error) End(ctx context.Context, txErr error) (rollbackErr error, commitErr error) Commit(ctx context.Context) (err error) Rollback(ctx context.Context) (err error) }
Click to show internal directories.
Click to hide internal directories.