Documentation
¶
Overview ¶
Package providerregistry maps database driver names to provider factories.
Index ¶
Constants ¶
View Source
const PoolerTransaction = "transaction"
PoolerTransaction is the transaction-mode pooler setting.
Variables ¶
View Source
var ErrUnsupportedDriver = errors.New("providerregistry: unsupported driver")
ErrUnsupportedDriver is returned when no factory is registered for a driver.
Functions ¶
func IsRegistered ¶
IsRegistered reports whether driver has a registered factory.
Types ¶
type Options ¶ added in v0.1.11
type Options struct {
// Timeout is the statement timeout the provider sets natively.
Timeout time.Duration
// Pooler is "transaction" when the connection goes through a
// transaction-mode pooler, which keeps no session state: the provider
// must not rely on named prepared statements or startup settings.
Pooler string
// Context bounds opening the provider (its first connection); nil means
// no bound.
Context context.Context
}
Options configures an opened provider.
func (Options) OpenContext ¶ added in v0.1.12
OpenContext is the context opening the provider runs under.
Click to show internal directories.
Click to hide internal directories.