sqlxx

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

func ToJson

func ToJson(rows *sql.Rows) (string, error)

Types

type DB

type DB struct {
	*sqlx.DB
}

DB 数据库扩展

func NewDb

func NewDb(db *sql.DB, driverName string) *DB

NewDb 新建

func (*DB) InTxContext

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

InTxContext 运行在一个事务上下文

type Tx

type Tx struct {
	*sqlx.Tx
}

Tx 事务扩展

Jump to

Keyboard shortcuts

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