package
0.0.0-20240614024848-4d8b559eef21
Repository: https://github.com/dhermes/golembic.git
Documentation: pkg.go.dev
# Functions
New creates a PostgreSQL-specific database engine provider from some options.
OptAlwaysError returns an option that always returns an error.
OptConnectTimeout sets the `ConnectTimeout` on a `Config`.
OptDatabase sets the `Database` on a `Config`.
OptDriverName sets the `DriverName` on a `Config`.
OptHost sets the `Host` on a `Config`.
OptIdleConnections sets the `IdleConnections` on a `Config`.
OptLockTimeout sets the `LockTimeout` on a `Config`.
OptMaxConnections sets the `MaxConnections` on a `Config`.
OptMaxLifetime sets the `MaxLifetime` on a `Config`.
OptPassword sets the `Password` on a `Config`.
OptPort sets the `Port` on a `Config`.
OptSchema sets the `Schema` on a `Config`.
OptSSLMode sets the `SSLMode` on a `Config`.
OptStatementTimeout sets the `StatementTimeout` on a `Config`.
OptUsername sets the `Username` on a `Config`.
SetTimeoutMilliseconds sets a timeout value in connection string query parameters.
SetTimeoutSeconds sets a timeout value in connection string query parameters.
# Constants
DefaultDatabase is the default database to connect to, we use `postgres` to not pollute the template databases.
DefaultDriverName is the default SQL driver to be used when creating a new database connection pool via `sql.Open()`.
DefaultHost is the default database hostname, typically used when developing locally.
DefaultIdleConnections is the default number of idle connections.
DefaultLockTimeout is the default timeout to use when attempting to acquire a lock.
DefaultMaxConnections is the default maximum number of connections.
DefaultMaxLifetime is the default maximum lifetime of driver connections.
DefaultPort is the default postgres port.
DefaultStatementTimeout is the default timeout to use when invoking a SQL statement.
# Variables
ErrNegativeCount is the error returned when a configured count cannot be negative.
ErrNegativeTimeout is the error returned when a timeout duration cannot be negative.
# Structs
Config is a set of connection config options.
SQLProvider is a PostgreSQL-specific database engine provider.
# Type aliases
Option describes options used to create a new config for a SQL provider.