package pgdriver

Import Path
	github.com/uptrace/bun/driver/pgdriver (on go.dev)

Dependency Relation
	imports 26 packages, and imported by one package


Package-Level Type Names (total 20, in which 10 are exported)
/* sort exporteds by: | */
func WithChannelSize(size int) ChannelOption func (*Listener).Channel(opts ...ChannelOption) <-chan Notification
TCP host:port or Unix socket depending on Network. AppName string Database string Dial timeout for establishing new connections. Default is 5 seconds. Dialer creates new network connection and has priority over Network and Addr options. Network type, either tcp or unix. Default is tcp. Password string Timeout for socket reads. If reached, commands will fail with a timeout instead of blocking. TLS config for secure connections. User string Timeout for socket writes. If reached, commands will fail with a timeout instead of blocking. func (*Connector).Config() *Config
(*T) Begin() (driver.Tx, error) (*T) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error) (*T) Close() error (*T) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) (*T) IsValid() bool (*T) Ping(ctx context.Context) error (*T) Prepare(query string) (driver.Stmt, error) (*T) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) *T : database/sql/driver.Conn *T : database/sql/driver.ConnBeginTx *T : database/sql/driver.ExecerContext *T : database/sql/driver.Pinger *T : database/sql/driver.QueryerContext *T : database/sql/driver.Validator *T : io.Closer
(*T) Config() *Config (*T) Connect(ctx context.Context) (driver.Conn, error) (*T) Driver() driver.Driver (*T) Stats() DriverStats *T : database/sql/driver.Connector func NewConnector(opts ...DriverOption) *Connector
( T) Open(name string) (driver.Conn, error) ( T) OpenConnector(name string) (driver.Connector, error) T : database/sql/driver.Driver T : database/sql/driver.DriverContext func NewDriver() Driver
func WithAddr(addr string) DriverOption func WithApplicationName(appName string) DriverOption func WithDatabase(database string) DriverOption func WithDialTimeout(dialTimeout time.Duration) DriverOption func WithDSN(dsn string) DriverOption func WithPassword(password string) DriverOption func WithReadTimeout(readTimeout time.Duration) DriverOption func WithTimeout(timeout time.Duration) DriverOption func WithTLSConfig(cfg *tls.Config) DriverOption func WithUser(user string) DriverOption func WithWriteTimeout(writeTimeout time.Duration) DriverOption func NewConnector(opts ...DriverOption) *Connector
Errors uint64 Queries uint64 func (*Connector).Stats() DriverStats
Error represents an error returned by PostgreSQL server using PostgreSQL ErrorResponse protocol. https://www.postgresql.org/docs/current/static/protocol-message-formats.html ( T) Error() string Field returns a string value associated with an error field. https://www.postgresql.org/docs/current/static/protocol-error-fields.html IntegrityViolation reports whether an error is a part of Integrity Constraint Violation class of errors. https://www.postgresql.org/docs/current/static/errcodes-appendix.html T : error
Channel returns a channel for concurrently receiving notifications. It periodically sends Ping notification to test connection health. The channel is closed with Listener. Receive* APIs can not be used after channel is created. Close closes the listener, releasing any open resources. Listen starts listening for notifications on channels. Receive indefinitely waits for a notification. This is low-level API and in most cases Channel should be used instead. ReceiveTimeout waits for a notification until timeout is reached. This is low-level API and in most cases Channel should be used instead. Unlisten stops listening for notifications on channels. *T : io.Closer func NewListener(db *bun.DB) *Listener
Notification received with LISTEN command. Channel string Payload string func (*Listener).Channel(opts ...ChannelOption) <-chan Notification
Package-Level Functions (total 78, in which 15 are exported)
Package-Level Variables (total 7, in which 1 are exported)
Package-Level Constants (total 57, none are exported)