2022-10-15 21:54:11 +02:00
|
|
|
package get
|
2020-04-30 20:07:03 +02:00
|
|
|
|
|
|
|
import (
|
|
|
|
"sync"
|
|
|
|
|
|
|
|
"github.com/photoprism/photoprism/internal/query"
|
|
|
|
)
|
|
|
|
|
|
|
|
var onceQuery sync.Once
|
|
|
|
|
|
|
|
func initQuery() {
|
|
|
|
services.Query = query.New(Config().Db())
|
|
|
|
}
|
|
|
|
|
|
|
|
func Query() *query.Query {
|
|
|
|
onceQuery.Do(initQuery)
|
|
|
|
|
|
|
|
return services.Query
|
|
|
|
}
|