internal

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetError added in v0.1.7

func GetError(err error, query string, args []interface{}) error

func ResolveMultiRows added in v0.1.7

func ResolveMultiRows(rows *sql.Rows) (datasetRows []xdb.Rows, err error)

func ResolveRows added in v0.1.7

func ResolveRows(rows *sql.Rows) (dataRows xdb.Rows, err error)

Types

type ISysDB

type ISysDB interface {
	Query(string, ...interface{}) (*sql.Rows, error)
	Exec(string, ...interface{}) (sql.Result, error)
	Begin() (ISysTrans, error)
	Close() error
}

func NewSysDB

func NewSysDB(proto string, conn string, maxOpen int, maxIdle int, maxLifeTime time.Duration) (ISysDB, error)

NewSysDB 创建DB实例

type ISysTrans

type ISysTrans interface {
	Query(string, ...interface{}) (*sql.Rows, error)
	Execute(string, ...interface{}) (sql.Result, error)
	Rollback() error
	Commit() error
}

ISysTrans 数据库事务接口

Jump to

Keyboard shortcuts

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