db

package
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTestDB

func CreateTestDB(user, password, dbName, host string, port uint16) func()

func MakeUrl

func MakeUrl(user, password, dbName, host string, port uint16, timeZone string, withSchema bool) string

Types

type DB

type DB struct {
	*sqlx.DB
}

func Connect

func Connect(user, password, dbName, host string, port, maxOpenConns, maxIdleConns, connMaxLifeTime, connMaxIdleTime uint16, timeZone string, logMode bool) *DB

func (*DB) Transaction

func (db *DB) Transaction(txFunc TxFunc) (err error)

type TxFunc

type TxFunc func(tx *sqlx.Tx) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL