Documentation ¶
Index ¶
- func GetCurrentPath() string
- func GetModuleName() (string, string)
- func GetRelativePath() string
- func GoCamelCase(s string) string
- func GoModFilePath() string
- func GoTypeToProtoType(g string) string
- func GoTypeToTypeScriptDefaultValue(g string) string
- func Incr(x int) int
- func IsNumber(arg string) bool
- func MysqlToGoFieldType(dt, ct string) (string, int)
- func SQLTool(t *Table, flag string) string
- type Column
- type Table
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCurrentPath ¶
func GetCurrentPath() string
func GetModuleName ¶
func GetRelativePath ¶
func GetRelativePath() string
func GoCamelCase ¶
func GoModFilePath ¶
func GoModFilePath() string
func GoTypeToProtoType ¶
func GoTypeToTypeScriptDefaultValue ¶ added in v1.0.9
func MysqlToGoFieldType ¶
MysqlToGoFieldType MysqlToGoFieldType
Types ¶
type Column ¶
type Column struct { OrdinalPosition int // field_ordinal ColumnName string // column_name DataType string // data_type ColumnType string // column_type ColumnComment string // column_comment, NotNull bool // not_null IsPrimaryKey bool // is_primary_key IsAutoIncrment bool // is_auto_incrment IsDefaultCurrentTimestamp bool // is_default_currenttimestamp GoColumnName string // go field name GoColumnType string // go field type BigType int // 0 表示不生成where 1 表示比较类型 2表示比较类型+字符串 3表示比较类型,修改传入参数 GoConditionType string // 生成where 的类型参数 ProtoType string // protoType }
Column Column
type Table ¶
type Table struct { Database string TableName string // table name GoTableName string // go struct name PackageName string // package name Fields []*Column // columns GenerateWhereCol []*Column // GenerateWhereCol 生成where字段比较方法的列 PrimaryKey *Column // priomary_key column ImportTime bool // is need import time RelativePath string Protopkg string }
Table Table
func MysqlTable ¶
Click to show internal directories.
Click to hide internal directories.