feat: add support for azuresql dialect (#487)

pull/488/head
Stephen Blackstone 2023-03-28 23:15:15 -04:00 committed by GitHub
parent 8574431aad
commit 49c55f0f98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

2
db.go
View File

@ -22,7 +22,7 @@ func OpenDBWithDriver(driver string, dbstring string) (*sql.DB, error) {
}
switch driver {
case "postgres", "pgx", "sqlite3", "sqlite", "mysql", "sqlserver", "clickhouse", "vertica":
case "postgres", "pgx", "sqlite3", "sqlite", "mysql", "sqlserver", "clickhouse", "vertica", "azuresql":
return sql.Open(driver, dbstring)
default:
return nil, fmt.Errorf("unsupported driver %s", driver)

View File

@ -22,7 +22,7 @@ func SetDialect(s string) error {
d = dialect.Mysql
case "sqlite3", "sqlite":
d = dialect.Sqlite3
case "mssql":
case "mssql", "azuresql":
d = dialect.Sqlserver
case "redshift":
d = dialect.Redshift