mysql

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertSQLType

func ConvertSQLType(sqlType string) string

func ShowCheck

func ShowCheck(r CheckResult)

Types

type CheckResult

type CheckResult struct {
	Error error

	FullTable  []string
	NoMatching bool
}

func Check

func Check(db *sql.DB, sql string, vs ...interface{}) CheckResult

type ExplainResult

type ExplainResult struct {
	Id           sql.NullInt64
	SelectType   sql.NullString
	Table        sql.NullString
	Partition    sql.NullString
	Type         sql.NullString
	PossibleKeys sql.NullString
	Key          sql.NullString
	KeyLen       sql.NullInt32
	Ref          sql.NullString
	Rows         sql.NullInt64
	Filtered     sql.NullFloat64
	Extra        sql.NullString
}

func Explain

func Explain(db *sql.DB, sql string, vs ...interface{}) ([]*ExplainResult, error)

type Field

type Field struct {
	Name    string
	Type    string
	Null    string
	Key     sql.NullString
	Default sql.NullString
	Extract sql.NullString
	Comment string
}

type Table

type Table struct {
	Name    string
	Comment string
	Fields  []*Field
}

func Desc

func Desc(db *sql.DB, tableName, dbName string) (*Table, error)

Jump to

Keyboard shortcuts

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