Discover Packages
github.com/odpf/kay
pkg
pgsx
package
Version:
v0.0.0-...-95edb15
Opens a new window with list of versions in this module.
Published: Aug 20, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 12
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
View Source
var (
ErrNilDBClient = errors .New ("db client is nil")
ErrNilPostgresClient = errors .New ("postgres client is nil")
ErrDuplicateKey = errors .New ("duplicate key")
ErrCheckViolation = errors .New ("check constraint violation")
ErrForeignKeyViolation = errors .New ("foreign key violation")
)
type Client struct {
DB *sqlx .DB
}
NewClient initializes database connection
Execs is used for executing list of db query
type Config struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
Name string `yaml:"name"`
User string `yaml:"user"`
Password string `yaml:"password"`
SSLMode string `yaml:"sslmode"`
}
ConnURL returns the connection URL for the Postgres database.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.