db

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DbConnectionString string
View Source
var DbTypeName string

Functions

func Exec

func Exec(sqlStr string, values ...interface{}) int64

func ExecBackId

func ExecBackId(sqlStr string, values ...interface{}) int64

func ExecBatch

func ExecBatch(sqlStr string) int64

func Init

func Init(dbTypeName, dbConnectionString string)

Types

type DataColumn

type DataColumn struct {
	Name  string
	Table *DataTable
}

type DataRow

type DataRow struct {
	Values map[string]interface{}
	Table  *DataTable
}

func (DataRow) ToJson

func (dr DataRow) ToJson() string

type DataTable

type DataTable struct {
	Rows    []DataRow
	Columns []DataColumn
}

func ExecDt

func ExecDt(sqlStr string, values ...interface{}) DataTable

func JsonToDataTable

func JsonToDataTable(str string) DataTable

func NewDataTable

func NewDataTable() DataTable

func (*DataTable) AddColumn

func (t *DataTable) AddColumn(column DataColumn)

func (*DataTable) AddColumnByNames

func (t *DataTable) AddColumnByNames(arr ...string)

func (*DataTable) AddRow

func (t *DataTable) AddRow(row DataRow)

func (*DataTable) AddRowByValues

func (t *DataTable) AddRowByValues(arr ...interface{})

func (*DataTable) Clone

func (t *DataTable) Clone() DataTable

func (*DataTable) GetColumn

func (t *DataTable) GetColumn(index int) DataColumn

func (*DataTable) GetRow

func (t *DataTable) GetRow(index int) DataRow

func (*DataTable) InsertColumn

func (t *DataTable) InsertColumn(index int, column DataColumn)

func (*DataTable) InsertColumnByNames

func (t *DataTable) InsertColumnByNames(index int, arr ...string)

func (*DataTable) InsertRow

func (t *DataTable) InsertRow(index int, row DataRow)

func (*DataTable) InsertRowByValues

func (t *DataTable) InsertRowByValues(index int, arr ...interface{})

func (*DataTable) NewColumn

func (t *DataTable) NewColumn(name string) DataColumn

func (*DataTable) NewRow

func (t *DataTable) NewRow() DataRow

func (DataTable) ToJson

func (dt DataTable) ToJson() string

Jump to

Keyboard shortcuts

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