Documentation ¶
Index ¶
- type Connection
- func (c *Connection) Exec(ctx context.Context, sql string, args ...any) error
- func (c *Connection) ExecM(ctx context.Context, sql string, argMap map[string]any) error
- func (c *Connection) GetTransactionManager() TransactionManagerI
- func (c *Connection) Query(ctx context.Context, sql string, args ...any) (RowsI, error)
- func (c *Connection) QueryM(ctx context.Context, sql string, argMap map[string]any) (RowsI, error)
- func (c *Connection) QueryRow(ctx context.Context, sql string, args ...any) RowI
- func (c *Connection) QueryRowM(ctx context.Context, sql string, argMap map[string]any) RowI
- type ConnectionI
- type RowI
- type RowsI
- type TransactionManager
- type TransactionManagerI
- type Tx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { Con *pgxpool.Pool TransactionManager *TransactionManager }
func NewConnection ¶
func NewConnection(dsn string) (*Connection, error)
func (*Connection) GetTransactionManager ¶
func (c *Connection) GetTransactionManager() TransactionManagerI
type ConnectionI ¶
type ConnectionI interface { Exec(ctx context.Context, sql string, args ...any) error Query(ctx context.Context, sql string, args ...any) (RowsI, error) QueryRow(ctx context.Context, sql string, args ...any) RowI ExecM(ctx context.Context, sql string, argMap map[string]any) error QueryM(ctx context.Context, sql string, argMap map[string]any) (RowsI, error) QueryRowM(ctx context.Context, sql string, argMap map[string]any) RowI GetTransactionManager() TransactionManagerI }
type TransactionManager ¶
type TransactionManager struct {
// contains filtered or unexported fields
}
func NewTransactionManager ¶
func NewTransactionManager(connection *pgxpool.Pool) *TransactionManager
func (*TransactionManager) RenewContextTx ¶
func (t *TransactionManager) RenewContextTx(ctx context.Context) error
func (*TransactionManager) TxAddAsyncCallback ¶
func (t *TransactionManager) TxAddAsyncCallback(ctx context.Context, f func())
type TransactionManagerI ¶
Click to show internal directories.
Click to hide internal directories.