Documentation
¶
Index ¶
- type Driver
- type PGXDriver
- func (p *PGXDriver) CreateConnection(dsn string) (*sqlx.DB, error)
- func (p *PGXDriver) CreateRefreshableConnection(buildDSN func() (string, error)) (*sqlx.DB, error)
- func (p *PGXDriver) IsConnNeedsRefreshError(err error) bool
- func (p *PGXDriver) IsDupDatabaseError(err error) bool
- func (p *PGXDriver) IsDupEntryError(err error) bool
- type PQDriver
- func (p *PQDriver) CreateConnection(dsn string) (*sqlx.DB, error)
- func (p *PQDriver) CreateRefreshableConnection(buildDSN func() (string, error)) (*sqlx.DB, error)
- func (p *PQDriver) IsConnNeedsRefreshError(err error) bool
- func (p *PQDriver) IsDupDatabaseError(err error) bool
- func (p *PQDriver) IsDupEntryError(err error) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver interface {
CreateConnection(dsn string) (*sqlx.DB, error)
// CreateRefreshableConnection creates a connection pool that calls buildDSN
// before opening each new physical connection, enabling per-connection
// credential refresh for short-lived tokens (e.g. from passwordCommand).
CreateRefreshableConnection(buildDSN func() (string, error)) (*sqlx.DB, error)
IsDupEntryError(error) bool
IsDupDatabaseError(error) bool
IsConnNeedsRefreshError(error) bool
}
type PGXDriver ¶
type PGXDriver struct{}
func (*PGXDriver) CreateConnection ¶
func (*PGXDriver) CreateRefreshableConnection ¶ added in v1.31.0
func (*PGXDriver) IsConnNeedsRefreshError ¶ added in v1.25.0
func (*PGXDriver) IsDupDatabaseError ¶
func (*PGXDriver) IsDupEntryError ¶
type PQDriver ¶
type PQDriver struct{}
func (*PQDriver) CreateConnection ¶
func (*PQDriver) CreateRefreshableConnection ¶ added in v1.31.0
func (*PQDriver) IsConnNeedsRefreshError ¶ added in v1.25.0
func (*PQDriver) IsDupDatabaseError ¶
func (*PQDriver) IsDupEntryError ¶
Click to show internal directories.
Click to hide internal directories.