postgres

package
v0.0.0-...-1693482 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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
}

func FromPool

func FromPool(pool *pgxpool.Pool) *DB

func (*DB) Dialect

func (d *DB) Dialect() cuttle.Dialect

func (*DB) DispatchBatchR

func (d *DB) DispatchBatchR(ctx context.Context, b *cuttle.BatchR) error

func (*DB) DispatchBatchRW

func (d *DB) DispatchBatchRW(ctx context.Context, b *cuttle.BatchRW) error

func (*DB) ExecFunc

func (d *DB) ExecFunc(ctx context.Context, handler cuttle.TxFunc[cuttle.Exec], stmt string, args ...any) error

func (*DB) QueryFunc

func (d *DB) QueryFunc(ctx context.Context, handler cuttle.TxFunc[cuttle.Rows], stmt string, args ...any) error

func (*DB) QueryRowFunc

func (d *DB) QueryRowFunc(ctx context.Context, handler cuttle.TxFunc[cuttle.Row], stmt string, args ...any) error

func (*DB) RTx

func (d *DB) RTx(ctx context.Context, f cuttle.RTxFunc) error

func (*DB) WTx

func (d *DB) WTx(ctx context.Context, f cuttle.WTxFunc) error

type Exec

type Exec struct {
	// contains filtered or unexported fields
}

func (*Exec) RowsAffected

func (e *Exec) RowsAffected() int64

type RTx

type RTx struct {
	// contains filtered or unexported fields
}

func (*RTx) DispatchBatchR

func (t *RTx) DispatchBatchR(ctx context.Context, b *cuttle.BatchR) error

func (*RTx) Query

func (t *RTx) Query(ctx context.Context, stmt string, args ...any) (cuttle.Rows, error)

func (*RTx) QueryFunc

func (t *RTx) QueryFunc(ctx context.Context, handler cuttle.TxFunc[cuttle.Rows], stmt string, args ...any) error

func (*RTx) QueryRow

func (t *RTx) QueryRow(ctx context.Context, stmt string, args ...any) (cuttle.Row, error)

func (*RTx) QueryRowFunc

func (t *RTx) QueryRowFunc(ctx context.Context, handler cuttle.TxFunc[cuttle.Row], stmt string, args ...any) error

type Row

type Row struct {
	// contains filtered or unexported fields
}

func (*Row) Scan

func (r *Row) Scan(dest ...any) error

type Rows

type Rows struct {
	// contains filtered or unexported fields
}

func (*Rows) Close

func (r *Rows) Close() error

func (*Rows) Next

func (r *Rows) Next(dest ...any) (bool, error)

type WTx

type WTx struct {
	RTx
}

func (*WTx) DispatchBatchRW

func (t *WTx) DispatchBatchRW(ctx context.Context, b *cuttle.BatchRW) error

func (*WTx) Exec

func (t *WTx) Exec(ctx context.Context, stmt string, args ...any) (cuttle.Exec, error)

func (*WTx) ExecFunc

func (t *WTx) ExecFunc(ctx context.Context, handler cuttle.TxFunc[cuttle.Exec], stmt string, args ...any) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL