Documentation
¶
Index ¶
- func Queries(ctx context.Context) (*db.Queries, error)
- func WithLazyTx(ctx context.Context, tx *LazyTx) context.Context
- func WithQueries(ctx context.Context, q *db.Queries) context.Context
- type LazyTx
- func (lt *LazyTx) Commit(ctx context.Context) error
- func (lt *LazyTx) Exec(ctx context.Context, sql string, args ...any) (pgconn.CommandTag, error)
- func (lt *LazyTx) IsStarted() bool
- func (lt *LazyTx) OnCommit(hook func())
- func (lt *LazyTx) Query(ctx context.Context, sql string, args ...any) (pgx.Rows, error)
- func (lt *LazyTx) QueryRow(ctx context.Context, sql string, args ...any) pgx.Row
- func (lt *LazyTx) Rollback(ctx context.Context) error
- type Pool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithLazyTx ¶
WithLazyTx stores the LazyTx in the context
Types ¶
type LazyTx ¶
type LazyTx struct {
// contains filtered or unexported fields
}
func (*LazyTx) OnCommit ¶
func (lt *LazyTx) OnCommit(hook func())
OnCommit registers a function to be called after the transaction successfully commits
Click to show internal directories.
Click to hide internal directories.