Documentation
¶
Index ¶
Constants ¶
View Source
const ( Mysql = "mysql" Sqlite3 = "sqlite3" Postgresql = "postgresql" )
View Source
const ( UpperLetterStartIdx = 65 LowerLetterStartIdx = 97 )
Variables ¶
This section is empty.
Functions ¶
func ConvertHumpToUnderline ¶
ConvertHumpToUnderline 将驼峰英文命名转换为下划线英文命名
func ParseKeywordAndArgument ¶
Types ¶
type Dialect ¶
type Dialect interface { // GetName 获取数据表的名称 GetName() string // NewColumn 创建一个字段 NewColumn() column.Column // GetType 判断指定类型是否存在 GetType(typ string) (string, bool) // ConvertDefaultType 获取数据库默认类型 ConvertDefaultType(val reflect.Value) string // GenerateCreatingColumnSQL 生成创建数据表的 SQL 语句 GenerateCreatingTableSQL(tabName string, columns []column.Column, engName ...string) string // GenerateQueryingTableSQL 生成检查数据表是否存在的 SQL 语句 GenerateQueryingTableSQL(dbName, tabName string) string }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.