16 lines
281 B
Go
16 lines
281 B
Go
|
package database
|
||
|
|
||
|
import (
|
||
|
"database/sql"
|
||
|
|
||
|
_ "github.com/mattn/go-sqlite3"
|
||
|
|
||
|
"git.luj0ga.de/franconian/matrix-pretix/internal/config"
|
||
|
)
|
||
|
|
||
|
const DBDriverName = "sqlite3"
|
||
|
|
||
|
func Open(config *config.DatabaseConfig) (*sql.DB, error) {
|
||
|
return sql.Open(DBDriverName, config.Filename)
|
||
|
}
|