Skip to content

Commit

Permalink
Adding GetDialect function (go-gorm#1869)
Browse files Browse the repository at this point in the history
  • Loading branch information
illyabusigin authored and jinzhu committed May 2, 2018
1 parent 35efe68 commit 9044197
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9044197

Please sign in to comment.