dbinfo

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallRead

func CallRead(db *sql.DB, name string, args ...interface{}) ([]interface{}, messagehandle.ErrorMsg)

CallRead call stored procedure

func CallReadOutMap

func CallReadOutMap(db *sql.DB, name string, args ...interface{}) ([]map[string]interface{}, messagehandle.ErrorMsg)

CallReadOutMap call stored procedure

func CallReadOutMultipleMap

func CallReadOutMultipleMap(db *sql.DB, name string, args ...interface{}) ([][]map[string]interface{}, messagehandle.ErrorMsg)

CallReadOutMultipleMap call stored procedure

func CallWrite

func CallWrite(db *sql.DB, name string, args ...interface{}) (sql.Result, messagehandle.ErrorMsg)

CallWrite ...

func Exec

func Exec(db *sql.DB, query string, args ...interface{}) (sql.Result, messagehandle.ErrorMsg)

Exec Use to INSTER, UPDATE, DELETE

func MakeProcedureQueryStr

func MakeProcedureQueryStr(name string, args int) string

MakeProcedureQueryStr ...

func MakeScanArray

func MakeScanArray(rows *sql.Rows) []interface{}

MakeScanArray ...

func MakeScanMap

func MakeScanMap(rows *sql.Rows) []map[string]interface{}

MakeScanMap ...

func Query

func Query(db *sql.DB, query string, args ...interface{}) ([]interface{}, messagehandle.ErrorMsg)

Query Use to SELECT return array, first is Keys

func QueryMultipleResult

func QueryMultipleResult(db *sql.DB, query string, args ...interface{}) ([][]map[string]interface{}, messagehandle.ErrorMsg)

QueryMultipleResult ...

func QueryOutMap

func QueryOutMap(db *sql.DB, query string, args ...interface{}) ([]map[string]interface{}, messagehandle.ErrorMsg)

QueryOutMap Use to SELECT return array map

Types

type SqlCLi

type SqlCLi struct {
	DB *sql.DB
}

type SqlQuary

type SqlQuary struct {
	Quary string
	Args  []interface{}
}

Jump to

Keyboard shortcuts

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