Documentation
¶
Index ¶
- Constants
- Variables
- func DecodeConfig(input any) (database.Connector, error)
- func NameMatcher(name string) bool
- type Config
- type Pool
- func (p *Pool) Acquire(ctx context.Context) (database.Connection, error)
- func (p *Pool) Begin(ctx context.Context, opts *database.TransactionOptions) (database.Transaction, error)
- func (p *Pool) Close(_ context.Context) error
- func (p *Pool) Exec(ctx context.Context, sql string, args ...any) (int64, error)
- func (p *Pool) Migrate(ctx context.Context) error
- func (p *Pool) MigrateTest(ctx context.Context) error
- func (p *Pool) Ping(ctx context.Context) error
- func (p *Pool) Query(ctx context.Context, sql string, args ...any) (database.Rows, error)
- func (p *Pool) QueryRow(ctx context.Context, sql string, args ...any) database.Row
- func (p *Pool) RawDB() *sql.DB
- type PostgresPooler
- type Row
- type Rows
- type Transaction
Constants ¶
View Source
const (
ZIT01 = "ZIT01" // custom error code to express missing permissions by the end-user
)
Variables ¶
View Source
var (
Name = "postgres"
)
Functions ¶
func NameMatcher ¶
Types ¶
type Pool ¶
func (*Pool) Acquire ¶
Acquire implements database.Pool.
func (*Pool) Begin ¶
func (p *Pool) Begin(ctx context.Context, opts *database.TransactionOptions) (database.Transaction, error)
Begin implements database.Pool.
func (*Pool) Exec ¶
Exec implements database.Pool.
func (*Pool) Migrate ¶
Migrate implements database.Migrator.
func (*Pool) MigrateTest ¶
MigrateTest implements database.PoolTest.
func (*Pool) Query ¶
Query implements database.Pool.
func (*Pool) QueryRow ¶
QueryRow implements database.Pool.
type PostgresPooler ¶
type PostgresPooler interface {
// contains filtered or unexported methods
}
type Row ¶
Row and Rows are type aliases so that callers that reference postgres.Row / postgres.Rows continue to compile without change.
type Transaction ¶
type Transaction struct {
*pgxcommon.Transaction
}
func PGxTx ¶
func PGxTx(tx pgx.Tx) *Transaction
PGxTx wraps an existing pgx.Tx in a postgres-dialect transaction.
Click to show internal directories.
Click to hide internal directories.