db

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 8 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 added in v0.2.2

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

Types

type DB

type DB struct {
	*sqlx.DB
}

func Connect added in v0.2.2

func Connect(user, password, dbName, host string, port, maxOpenConns, maxIdleConns, connMaxLifeTime, connMaxIdleTime uint16, 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