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