Documentation ¶ Index ¶ func GetTx(ctx context.Context) *sql.Tx func WithTx(ctx context.Context, tx *sql.Tx) context.Context type Manager func New(db *sql.DB) *Manager func (m *Manager) RunInTx(ctx context.Context, fn func(context.Context) error) (err error) type TxExecutor Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func GetTx ¶ func GetTx(ctx context.Context) *sql.Tx func WithTx ¶ func WithTx(ctx context.Context, tx *sql.Tx) context.Context Types ¶ type Manager ¶ type Manager struct { // contains filtered or unexported fields } func New ¶ func New(db *sql.DB) *Manager func (*Manager) RunInTx ¶ func (m *Manager) RunInTx(ctx context.Context, fn func(context.Context) error) (err error) type TxExecutor ¶ type TxExecutor interface { ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error) QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error) QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row } Source Files ¶ View all Source files context.gomanager.go Click to show internal directories. Click to hide internal directories.