Documentation ¶
Overview ¶
Package dialect provides an interface for different SQL dialects
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDialect ¶
RegisterDialect registers a new SQL dialect
Types ¶
type Dialect ¶
type Dialect interface { VersionSQL() string // DataTypeOf returns the SQL data type of the given Go data type DataTypeOf(typ reflect.Value) string // IsTableExistSQL returns the SQL query that checks if a table exists IsTableExistSQL(tableName string) string DropTableSQL(tableName string) string }
Dialect is an interface that represents a SQL dialect
func GetDialect ¶
GetDialect retrieves a registered SQL dialect
type MysqlDialect ¶
type MysqlDialect struct { }
func (*MysqlDialect) DataTypeOf ¶
func (mysql *MysqlDialect) DataTypeOf(typ reflect.Value) string
func (*MysqlDialect) DropTableSQL ¶
func (mysql *MysqlDialect) DropTableSQL(tableName string) string
func (*MysqlDialect) IsTableExistSQL ¶
func (mysql *MysqlDialect) IsTableExistSQL(tableName string) string
func (*MysqlDialect) VersionSQL ¶
func (mysql *MysqlDialect) VersionSQL() string
Click to show internal directories.
Click to hide internal directories.