tx

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDB

func NewDB(driverName, dataSourceName string) (*sql.DB, error)

Types

type Row

type Row struct {
	sql.Row
}

func (Row) MustScan

func (row Row) MustScan(args ...interface{})

type Rows

type Rows struct {
	*sql.Rows
}

func (*Rows) Each

func (rows *Rows) Each(f func(*Rows))

func (*Rows) MustScan

func (rows *Rows) MustScan(args ...interface{})

type Tx

type Tx struct {
	*sql.Tx
}

func NewTx

func NewTx(db *sql.DB) (*Tx, error)

func (Tx) Any

func (tx Tx) Any(query string, args ...interface{}) bool

func (Tx) MustExec

func (tx Tx) MustExec(query string, args ...interface{}) sql.Result

func (Tx) MustQuery

func (tx Tx) MustQuery(query string, args ...interface{}) *Rows

func (Tx) MustQueryRow

func (tx Tx) MustQueryRow(query string, args ...interface{}) *Row

func (Tx) ScanRow

func (tx Tx) ScanRow(query string, args ...interface{}) map[string]interface{}

func (Tx) ScanRows

func (tx Tx) ScanRows(query string, args ...interface{}) []map[string]interface{}

Jump to

Keyboard shortcuts

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