Documentation ¶
Index ¶
- Variables
- func BToI(b bool) int
- func IToB(i int) bool
- func IsDuplicate(err error) bool
- func IsForeignKeyConstraint(err error) bool
- type DBPool
- func (p *DBPool) Close()
- func (p *DBPool) Execute(q string, args ...interface{}) (int, error)
- func (p *DBPool) GetCount(q string, args ...interface{}) (int, error)
- func (p *DBPool) IsConnected() bool
- func (p *DBPool) Optimize() error
- func (p *DBPool) Query(q string, args ...interface{}) (pgx.Rows, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var CTxt = context.Background()
Functions ¶
func IsDuplicate ¶
IsDuplicate - returns true if err is mysql duplicate entry notification
func IsForeignKeyConstraint ¶
Types ¶
type DBPool ¶
func NewDBPool ¶
NewDBPool - expects a postgresql connection string the in the form of "user=xxx password=xxxx host=xx.xx.xx.xx port=xxxx dbname=xxxx sslmode=?????"
func NewExternalDBPool ¶
NewExternalDBPool - requires TLS certificates to make the connection to the database expects a postgresql connection string the in the form of "user=xxx password=xxxx host=xx.xx.xx.xx port=xxxx dbname=xxxx sslmode=?????"
func (*DBPool) Close ¶
func (p *DBPool) Close()
Close - shut down the current database connection pool
func (*DBPool) Execute ¶
Execute - execute a sql command that returns no rows (gives count of rows affected)
func (*DBPool) IsConnected ¶
IsConnected - returns true if we have a valid connection
Click to show internal directories.
Click to hide internal directories.