Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DialectPostgres drivers.Dialect = func() drivers.Dialect { d := &dialect{} d.BaseDialect = drivers.NewBaseDialect(drivers.DialectNamePostgres, drivers.DoubleQuotesEscapeIdentifier, drivers.DoubleQuotesEscapeIdentifier) return d }()
Functions ¶
This section is empty.
Types ¶
type ConfigProperties ¶
type ConfigProperties struct {
DatabaseURL string `mapstructure:"database_url"`
DSN string `mapstructure:"dsn"`
Host string `mapstructure:"host"`
Port string `mapstructure:"port"`
DBname string `mapstructure:"dbname"`
User string `mapstructure:"user"`
Password string `mapstructure:"password"`
SSLMode string `mapstructure:"sslmode"`
SSLRootCertPEM string `mapstructure:"sslrootcert_pem"`
SSLCertPEM string `mapstructure:"sslcert_pem"`
SSLKeyPEM string `mapstructure:"sslkey_pem"`
MaxOpenConns int `mapstructure:"max_open_conns"`
ConnMaxLifetime string `mapstructure:"conn_max_lifetime"`
LogQueries bool `mapstructure:"log_queries"`
AllowHostAccess bool `mapstructure:"allow_host_access"`
}
func (*ConfigProperties) ResolveDSN ¶
func (c *ConfigProperties) ResolveDSN() string
func (*ConfigProperties) ResolveLibpqDSN ¶
func (c *ConfigProperties) ResolveLibpqDSN(dir string) (string, error)
ResolveLibpqDSN resolves a DSN for libpq-based clients, such as DuckDB's postgres extension. libpq reads certificates only from files, so certificate contents are written to dir. The caller must keep dir until the client stops opening connections.
func (*ConfigProperties) Validate ¶ added in v0.78.0
func (c *ConfigProperties) Validate() error
Click to show internal directories.
Click to hide internal directories.