mirror of
https://github.com/navidrome/navidrome.git
synced 2026-05-05 23:37:28 +00:00
Using squirrel to generalize SQL search
This commit is contained in:
parent
d3af7e689d
commit
c2448d3880
10 changed files with 134 additions and 34 deletions
|
|
@ -11,6 +11,8 @@ import (
|
|||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
const batchSize = 100
|
||||
|
||||
var once sync.Once
|
||||
|
||||
func Db() orm.Ormer {
|
||||
|
|
@ -66,6 +68,7 @@ func initORM(dbPath string) error {
|
|||
orm.RegisterModel(new(Checksum))
|
||||
orm.RegisterModel(new(Property))
|
||||
orm.RegisterModel(new(Playlist))
|
||||
orm.RegisterModel(new(Search))
|
||||
err := orm.RegisterDataBase("default", "sqlite3", dbPath)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue