goqux

package
v0.0.0-...-cd938e1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	Goqu *goqu.Database
	// contains filtered or unexported fields
}

DB 数据库扩展

func NewDb

func NewDb(db *sql.DB) *Database

NewDb 新建

func (*Database) InTxContext

func (db *Database) InTxContext(ctx context.Context, opts *sql.TxOptions, txFunc func(tx *Tx) error) (err error)

InTxContext 运行在一个事务上下文

type GoquLoggerAdapter

type GoquLoggerAdapter struct {
}

func (*GoquLoggerAdapter) Printf

func (x *GoquLoggerAdapter) Printf(format string, v ...interface{})

type Tx

type Tx struct {
	Tx     *sql.Tx
	GoquTx *goqu.TxDatabase
}

Tx 事务扩展

Jump to

Keyboard shortcuts

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