mysql

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DriverName = "mysql"

Functions

This section is empty.

Types

type Mysql

type Mysql struct {
	engine.Engine
}

func NewMysql

func NewMysql(dsn string) *Mysql

func (*Mysql) BulkInsertFromSliceMap

func (m *Mysql) BulkInsertFromSliceMap(tableName string, unSavedRows []map[string]interface{}) (sql.Result, error)

func (*Mysql) BulkInsertFromSliceSlice

func (m *Mysql) BulkInsertFromSliceSlice(tableName string, fields []string, unSavedRows [][]interface{}) (sql.Result, error)

func (*Mysql) BulkUpdateFromSliceMapById

func (m *Mysql) BulkUpdateFromSliceMapById(tableName string, keyName string, unSavedRows []map[string]interface{}) error

func (*Mysql) Close

func (m *Mysql) Close()

func (*Mysql) Connection

func (m *Mysql) Connection() error

func (*Mysql) Copy added in v1.0.1

func (m *Mysql) Copy(sourceTable string, targetTable string) error

func (*Mysql) DriverName added in v1.0.4

func (m *Mysql) DriverName() string

func (*Mysql) Drop

func (m *Mysql) Drop(tableName string) error

func (*Mysql) Exec

func (m *Mysql) Exec(query string, args ...interface{}) (sql.Result, error)

func (*Mysql) GetTableColumns

func (m *Mysql) GetTableColumns(tableName string) ([]string, error)

func (*Mysql) InsertFromMap

func (m *Mysql) InsertFromMap(tableName string, unSavedRow map[string]interface{}) (sql.Result, error)

func (*Mysql) InsertFromSlice

func (m *Mysql) InsertFromSlice(tableName string, fields []string, unSavedRow []interface{}) (sql.Result, error)

func (*Mysql) Ping

func (m *Mysql) Ping() error

func (*Mysql) QueryFieldInterface

func (m *Mysql) QueryFieldInterface(field string, query string, args ...interface{}) (interface{}, error)

func (*Mysql) QueryFieldInterfaceSlice

func (m *Mysql) QueryFieldInterfaceSlice(field string, query string, args ...interface{}) ([]interface{}, error)

func (*Mysql) QueryInterface

func (m *Mysql) QueryInterface(query string, args ...interface{}) ([]map[string]interface{}, error)

func (*Mysql) QueryInterfaceRow

func (m *Mysql) QueryInterfaceRow(query string, args ...interface{}) (map[string]interface{}, error)

func (*Mysql) QueryString

func (m *Mysql) QueryString(query string, args ...interface{}) ([]map[string]string, error)

func (*Mysql) QueryStringRow

func (m *Mysql) QueryStringRow(query string, args ...interface{}) (map[string]string, error)

func (*Mysql) Truncate

func (m *Mysql) Truncate(tableName string) error

func (*Mysql) UpdateFromMapById

func (m *Mysql) UpdateFromMapById(tableName string, keyName string, unSavedRow map[string]interface{}) error

Jump to

Keyboard shortcuts

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