forked from mirror/gorm
Adding GetDialect function (#1869)
This commit is contained in:
parent
35efe68ba7
commit
9044197ef9
|
@ -72,6 +72,12 @@ func RegisterDialect(name string, dialect Dialect) {
|
|||
dialectsMap[name] = dialect
|
||||
}
|
||||
|
||||
// GetDialect gets the dialect for the specified dialect name
|
||||
func GetDialect(name string) (dialect Dialect, ok bool) {
|
||||
dialect, ok = dialectsMap[name]
|
||||
return
|
||||
}
|
||||
|
||||
// ParseFieldStructForDialect get field's sql data type
|
||||
var ParseFieldStructForDialect = func(field *StructField, dialect Dialect) (fieldValue reflect.Value, sqlType string, size int, additionalType string) {
|
||||
// Get redirected field type
|
||||
|
|
Loading…
Reference in New Issue