Versions in this module Expand all Collapse all v0 v0.13.0 Feb 28, 2022 v0.12.1 Feb 28, 2022 v0.12.0 Feb 28, 2022 v0.11.1 Feb 14, 2022 v0.11.0 Feb 13, 2022 v0.10.5 Nov 17, 2021 v0.10.4 Nov 17, 2021 v0.10.3 Nov 17, 2021 v0.10.2 Sep 6, 2021 v0.10.1 May 5, 2021 v0.10.0 May 4, 2021 Changes in this version + func ConfigConnection(db *sql.DB, connMaxLifetime time.Duration, maxOpenConnections int, ...) + type Database struct + func NewDatabase(app inter.App, connection inter.Connection) *Database + func (d Database) Connection() inter.Connection + func (d Database) Exec(sql string, args ...interface{}) sql.Result + func (d Database) ExecE(sql string, args ...interface{}) (sql.Result, error) + func (d Database) Query(sql string, args ...interface{}) support.Collection + func (d Database) QueryE(sql string, args ...interface{}) (support.Collection, error) + type MySQL struct + ConnMaxLifetime time.Duration + Database string + Host string + MaxIdleConnections int + MaxOpenConnections int + Parameters map[string]string + Password string + Port int + QueryTimeout time.Duration + Username string + func (m *MySQL) Open() error + func (m MySQL) NetworkAddress() string + func (m MySQL) Pool() *sql.DB + func (m MySQL) Timeout() time.Duration + type PostgreSQL struct + AfterConnect pgconn.AfterConnectFunc + BuildFrontend pgconn.BuildFrontendFunc + ConnMaxLifetime time.Duration + ConnectTimeout time.Duration + Database string + DialFunc pgconn.DialFunc + Fallbacks []*pgconn.FallbackConfig + Host string + LookupFunc pgconn.LookupFunc + MaxIdleConnections int + MaxOpenConnections int + OnNotice pgconn.NoticeHandler + OnNotification pgconn.NotificationHandler + Password string + Port int + QueryTimeout time.Duration + RuntimeParams map[string]string + TLSConfig *tls.Config + Username string + ValidateConnect pgconn.ValidateConnectFunc + func (m *PostgreSQL) Open() error + func (m PostgreSQL) Pool() *sql.DB + func (m PostgreSQL) Timeout() time.Duration