Documentation ¶
Index ¶
- func CreateIndexKey(this Dialect, key string, cols []ColumnMeta) (s string)
- func CreatePrimaryKey(this Dialect, key string, cols []ColumnMeta) (s string)
- func CreateTableSQL(this Dialect, schemaName, tableName string, ifNotExists bool, suffix string) string
- func CreateUniqueKey(this Dialect, key string, cols []ColumnMeta) (s string)
- func DeleteSQL(this Dialect, schemaName, tableName string) string
- func DropTableSQL(this Dialect, schemaName, tableName string, ifExists bool) string
- func InsertAndReturnId(this Dialect, exec exec_queryer, query string, args ...interface{}) (id int64, err error)
- func InsertSQL(this Dialect, schemaName, tableName string, suffix string) string
- func QuoteField(f string) string
- func Register(name string, newf newDialect)
- func SelectSQL(this Dialect, schemaName, tableName string) string
- func UpdateSQL(this Dialect, schemaName, tableName string) string
- type ColumnMeta
- type Dialect
- type Execer
- type Queryer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateIndexKey ¶
func CreateIndexKey(this Dialect, key string, cols []ColumnMeta) (s string)
func CreatePrimaryKey ¶
func CreatePrimaryKey(this Dialect, key string, cols []ColumnMeta) (s string)
func CreateTableSQL ¶
func CreateUniqueKey ¶
func CreateUniqueKey(this Dialect, key string, cols []ColumnMeta) (s string)
func DropTableSQL ¶
func InsertAndReturnId ¶
func QuoteField ¶
Types ¶
type ColumnMeta ¶
type Dialect ¶
type Dialect interface { QuoteField(f string) string QuoteTable(schemaName, tableName string) string BindVar(i int) string BindAutoIncrVar() string InsertAndReturnId(exec exec_queryer, query string, args ...interface{}) (int64, error) PrimaryKeyStr() string UniqueKeyStr() string NormalKeyStr() string CreateSchema(schemaName string, ifNotExists bool) string CreateColumnStr(col ColumnMeta) string CreatePrimaryKey(key string, cols ...ColumnMeta) string CreateUniqueKey(key string, cols ...ColumnMeta) string CreateIndexKey(key string, cols ...ColumnMeta) string CreateTableSQL(schemaName, tableName string, ifNotExists bool, params map[string]string) string DropTableSQL(schemaName, tableName string, ifExists bool) string TruncateTableSQL(schemaName, tableName string) string InsertSQL(schemaName, tableName string, autoincr ColumnMeta) string UpdateSQL(schemaName, tableName string) string SelectSQL(schemaName, tableName string) string DeleteSQL(schemaName, tableName string) string }
Click to show internal directories.
Click to hide internal directories.