gorm/dialect/dialect.go

24 lines
300 B
Go
Raw Normal View History

2013-11-14 13:35:17 +04:00
package dialect
type Dialect interface {
}
func NewDialect(driver string) *Dialect {
var d Dialect
switch driver {
case "postgres":
d = postgres{}
case "mysql":
d = mysql{}
case "sqlite3":
d = sqlite3{}
}
return &d
}
type mysql struct{}
type postgres struct{}
type sqlite3 struct{}