add OpenDialect
This commit is contained in:
parent
720f2e2f6d
commit
d029b1ca86
|
@ -55,6 +55,10 @@ type Dialect interface {
|
|||
DataSourceName() string
|
||||
}
|
||||
|
||||
func OpenDialect(dialect Dialect) (*DB, error) {
|
||||
return Open(dialect.DriverName(), dialect.DataSourceName())
|
||||
}
|
||||
|
||||
type Base struct {
|
||||
dialect Dialect
|
||||
driverName string
|
||||
|
|
Loading…
Reference in New Issue