sql

package
v0.0.0-...-ffb043f Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SqlDb

type SqlDb struct {
	DB *sql.DB
}

func (*SqlDb) Commit

func (sd *SqlDb) Commit() error

func (*SqlDb) Exec

func (sd *SqlDb) Exec(query string, args ...interface{}) (sql.Result, error)

func (*SqlDb) Prepare

func (sd *SqlDb) Prepare(query string) (*sql.Stmt, error)

func (*SqlDb) Query

func (sd *SqlDb) Query(query string, args ...interface{}) (*sql.Rows, error)

func (*SqlDb) QueryRow

func (sd *SqlDb) QueryRow(query string, args ...interface{}) *sql.Row

func (*SqlDb) Rollback

func (sd *SqlDb) Rollback() error

func (*SqlDb) TxEnd

func (sd *SqlDb) TxEnd(txFunc func() error) error

type SqlTx

type SqlTx struct {
	DB *sql.Tx
}

func (*SqlTx) Commit

func (st *SqlTx) Commit() error

func (*SqlTx) Exec

func (st *SqlTx) Exec(query string, args ...interface{}) (sql.Result, error)

func (*SqlTx) Prepare

func (st *SqlTx) Prepare(query string) (*sql.Stmt, error)

func (*SqlTx) Query

func (st *SqlTx) Query(query string, args ...interface{}) (*sql.Rows, error)

func (*SqlTx) QueryRow

func (st *SqlTx) QueryRow(query string, args ...interface{}) *sql.Row

func (*SqlTx) Rollback

func (st *SqlTx) Rollback() error

func (*SqlTx) TxEnd

func (st *SqlTx) TxEnd(txFunc func() error) error

Jump to

Keyboard shortcuts

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