Documentation
¶
Index ¶
Constants ¶
View Source
const EnvTechURL = "CPS_POSTGRES_TECH_URL"
View Source
const EnvURL = "CPS_POSTGRES_URL"
Variables ¶
This section is empty.
Functions ¶
func Dump ¶
Dump calls pg_dump binary.
Types ¶
type BasePool ¶
type BasePool interface {
Exec(ctx context.Context, sql string, arguments ...any) (pgconn.CommandTag, error)
Query(ctx context.Context, sql string, args ...any) (pgx.Rows, error)
QueryRow(ctx context.Context, sql string, args ...any) pgx.Row
SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResults
Begin(ctx context.Context) (pgx.Tx, error)
Close()
Stat() *pgxpool.Stat
Ping(ctx context.Context) error
CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
}
type Pool ¶
type Pool interface {
Exec(ctx context.Context, sql string, arguments ...any) (pgconn.CommandTag, error)
Query(ctx context.Context, sql string, args ...any) (pgx.Rows, error)
QueryRow(ctx context.Context, sql string, args ...any) pgx.Row
SendBatch(ctx context.Context, b *pgx.Batch) error
Close()
WithTransaction(ctx context.Context, f func(context.Context, pgx.Tx) error) error
Ping(ctx context.Context) error
CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
}
func NewPool ¶
Source Files
¶
- dump.go
- pool_provider.go
- postgres.go
Click to show internal directories.
Click to hide internal directories.