Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
func Connect(connStr string, overrides ...Overrideable) (*sqlx.DB, error)
Connect returns a SQLX database corresponding to the provided connection string/URL, env variables, and any provided overrides.
func CopyFromLines ¶ added in v0.4.0
CopyFromLines bulk-loads data using the given copyCmd. lines must provide a set of complete lines of CSV data, including the end-of-line delimiters. Returns the number of rows inserted.
Types ¶
type ErrInvalidSSLMode ¶
type ErrInvalidSSLMode struct {
// contains filtered or unexported fields
}
ErrInvalidSSLMode is the error when the provided SSL mode is not one of the values that PostgreSQL supports.
func (*ErrInvalidSSLMode) Error ¶
func (e *ErrInvalidSSLMode) Error() string
type OverrideDBName ¶
type OverrideDBName string
OverrideDBName is a type for overriding the database name used to connect. To use it, one casts a string of the database name as an OverrideDBName
func (OverrideDBName) Override ¶
func (o OverrideDBName) Override() string
type Overrideable ¶
type Overrideable interface {
Override() string
}
Overrideable is an interface for defining ways to override PG settings outside of the usual manners (through the connection string/URL or env vars). An example would be having specific flags that can be used to set database connect parameters.