Documentation ¶
Index ¶
- Variables
- func NewPoolConnection(connectionName string, cfg DBConfiguer)
- func ReturnToPool(db *DB) bool
- type DB
- func (db *DB) ConnectionName() string
- func (db *DB) ExistsRecord(query string, args ...interface{}) error
- func (db *DB) QueryModel(query string, model interface{}, args ...interface{}) error
- func (db *DB) QueryRecord(query string, args ...interface{}) (Record, error)
- func (db *DB) QueryRecords(query string, args ...interface{}) ([]Record, error)
- func (db *DB) ReturnToPool() bool
- type DBConfiguer
- type DBMediator
- type Record
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AttributeName = "mapstructure" TimeFormat = "2006-01-02 15:04:05" )
View Source
var ( MaxConnsInPool int = 20 TimeoutPing time.Duration = 2 // in minutes DefaultDriverName string = "postgres" )
Functions ¶
func NewPoolConnection ¶
func NewPoolConnection(connectionName string, cfg DBConfiguer)
func ReturnToPool ¶
Types ¶
type DB ¶
func GetFromPool ¶
func (*DB) ConnectionName ¶
func (*DB) ExistsRecord ¶
func (*DB) QueryModel ¶
func (*DB) QueryRecord ¶
func (*DB) QueryRecords ¶
func (*DB) ReturnToPool ¶
type DBConfiguer ¶
type DBMediator ¶
type DBMediator interface {
DB() *DB
}
Click to show internal directories.
Click to hide internal directories.