Versions in this module Expand all Collapse all v1 v1.4.0 Apr 19, 2026 Changes in this version + const DriverName + var ErrBadConn = errors.New("celeris-postgres: bad connection") + var ErrClosed = errors.New("celeris-postgres: connection closed") + var ErrDirectModeUnsupported = errors.New(...) + var ErrNoLastInsertID = errors.New("celeris-postgres: LastInsertId is not supported; use RETURNING") + var ErrNoLastInsertId = ErrNoLastInsertID + var ErrPoolClosed = errors.New("celeris-postgres: pool is closed") + var ErrResultTooBig = errors.New(...) + var ErrSSLNotSupported = errors.New(...) + var ErrUnsupportedAuth = errors.New("celeris-postgres: unsupported authentication method") + func WithWorker(ctx context.Context, workerID int) context.Context + type Conn = pgConn + type Connector struct + func NewConnector(dsn string) (*Connector, error) + func (c *Connector) Close() error + func (c *Connector) Connect(ctx context.Context) (driver.Conn, error) + func (c *Connector) Driver() driver.Driver + func (c *Connector) WithEngine(sp eventloop.ServerProvider) *Connector + type CopyFromSource interface + Err func() error + Next func() bool + Values func() ([]any, error) + func CopyFromSlice(rows [][]any) CopyFromSource + type DSN struct + Database string + Host string + Options Options + Params map[string]string + Password string + Port string + User string + func ParseDSN(raw string) (DSN, error) + func (d *DSN) CheckSSL() error + type Driver struct + func (d *Driver) Open(name string) (driver.Conn, error) + func (d *Driver) OpenConnector(name string) (driver.Connector, error) + type Option func(*options) + func WithApplication(name string) Option + func WithEngine(sp eventloop.ServerProvider) Option + func WithHealthCheck(d time.Duration) Option + func WithMaxIdlePerWorker(n int) Option + func WithMaxIdleTime(d time.Duration) Option + func WithMaxLifetime(d time.Duration) Option + func WithMaxOpen(n int) Option + func WithStatementCacheSize(n int) Option + type Options struct + Application string + AutoCacheStatements bool + ConnectTimeout time.Duration + SSLMode string + StatementCacheSize int + type PGError = protocol.PGError + type Pool struct + func Open(dsnStr string, opts ...Option) (*Pool, error) + func (p *Pool) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error) + func (p *Pool) Close() error + func (p *Pool) CopyFrom(ctx context.Context, tableName string, columns []string, src CopyFromSource) (int64, error) + func (p *Pool) CopyTo(ctx context.Context, query string, dest func(row []byte) error) error + func (p *Pool) ExecContext(ctx context.Context, query string, args ...any) (Result, error) + func (p *Pool) IdleConnWorkers() []int + func (p *Pool) Ping(ctx context.Context) error + func (p *Pool) QueryContext(ctx context.Context, query string, args ...any) (*Rows, error) + func (p *Pool) QueryRow(ctx context.Context, query string, args ...any) *Row + func (p *Pool) Stats() async.PoolStats + type PoolConfig struct + Application string + DSN string + HealthCheck time.Duration + MaxIdlePerWorker int + MaxIdleTime time.Duration + MaxLifetime time.Duration + MaxOpen int + StatementCacheSize int + type Result struct + func (r Result) LastInsertId() (int64, error) + func (r Result) RowsAffected() (int64, error) + type Row struct + func (r *Row) Err() error + func (r *Row) Scan(dest ...any) error + type Rows struct + func (r *Rows) Close() error + func (r *Rows) Columns() []string + func (r *Rows) Err() error + func (r *Rows) Next() bool + func (r *Rows) Scan(dest ...any) error + type Tx struct + func (t *Tx) Commit() error + func (t *Tx) ExecContext(ctx context.Context, query string, args ...any) (Result, error) + func (t *Tx) QueryContext(ctx context.Context, query string, args ...any) (*Rows, error) + func (t *Tx) QueryRow(ctx context.Context, query string, args ...any) *Row + func (t *Tx) ReleaseSavepoint(ctx context.Context, name string) error + func (t *Tx) Rollback() error + func (t *Tx) RollbackToSavepoint(ctx context.Context, name string) error + func (t *Tx) Savepoint(ctx context.Context, name string) error