mysql

package
v0.0.0-...-2d91a95 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DB

func DB() (*sql.DB, error)

func Refresh

func Refresh()

Types

type MyTable

type MyTable struct {
	// contains filtered or unexported fields
}

************************ MySQL Output *************************** // sql conversion structure

func New

func New() *MyTable

func (*MyTable) AddColumn

func (myTable *MyTable) AddColumn(names ...string) *MyTable

set the form column

func (*MyTable) AutoInsert

func (myTable *MyTable) AutoInsert(value []string) *MyTable

Smart insert data, one line at a time

func (*MyTable) Clone

func (m *MyTable) Clone() *MyTable

func (*MyTable) Create

func (myTable *MyTable) Create() error

generate a "create a form" statement, before implementation to ensure that SetTableName (), AddColumn () has been implemented

func (*MyTable) CustomPrimaryKey

func (myTable *MyTable) CustomPrimaryKey(primaryKeyCode string) *MyTable

set the primary key statement (optional)

func (*MyTable) FlushInsert

func (myTable *MyTable) FlushInsert() error

Add sqlCode "insert data" statement, before implementation to ensure that Create (), AutoInsert () has been implemented

func (*MyTable) SelectAll

func (myTable *MyTable) SelectAll() (*sql.Rows, error)

Get all the data

func (*MyTable) SetTableName

func (myTable *MyTable) SetTableName(name string) *MyTable

set the table name

func (*MyTable) Truncate

func (myTable *MyTable) Truncate() error

Empty the form before execution to ensure that SetTableName () has been executed

Jump to

Keyboard shortcuts

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