mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-05-12 04:19:40 +08:00
feat: refactor database dialect handling and add stubs for unsupported features
This commit is contained in:
13
database/driver.go
Normal file
13
database/driver.go
Normal file
@@ -0,0 +1,13 @@
|
||||
//go:build !sqlite_glebarez
|
||||
|
||||
package database
|
||||
|
||||
import (
|
||||
_ "github.com/ncruces/go-sqlite3/embed"
|
||||
"github.com/ncruces/go-sqlite3/gormlite"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
func GetDialect(dsn string) gorm.Dialector {
|
||||
return gormlite.Open(dsn)
|
||||
}
|
||||
Reference in New Issue
Block a user