mysql

package
v0.0.0-...-0353056 Latest Latest
Warning

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

Go to latest
Published: May 19, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExportTemplate string = `` /* 4643-byte string literal not displayed */

Functions

func GenCode

func GenCode(connStr, packageName string, tables []string, genMethods bool)

入口方法

func GetTables

func GetTables() []string

Types

type ConstVar

type ConstVar struct {
	TypeName  string
	FieldName string
	Val       string
}

type MetaCol

type MetaCol struct {
	Field   string
	Type    string
	Null    string
	Key     string
	Default sql.NullString
	Extra   string
	GoType  string
	GoField string
}

func (*MetaCol) String

func (v *MetaCol) String() string

type SingleType

type SingleType struct {
	TableName string
	Camel     string
	Columns   []MetaCol
	Consts    []ConstVar
}

func GenTypeFromTable

func GenTypeFromTable(tableName string) SingleType

type TemplateContext

type TemplateContext struct {
	DriverName  string
	PackageName string
	ConnStr     string
	Packages    []string
	Types       []SingleType
}

Jump to

Keyboard shortcuts

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