photoprism/internal/query/query.go
Michael Mayer 1d667ada79 Backend: Add account API #225
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-03-28 15:29:17 +01:00

39 lines
682 B
Go

/*
This package contains PhotoPrism database queries.
Additional information can be found in our Developer Guide:
https://github.com/photoprism/photoprism/wiki
*/
package query
import (
"github.com/photoprism/photoprism/internal/event"
"github.com/jinzhu/gorm"
)
var log = event.Log
// About 1km ('good enough' for now)
const SearchRadius = 0.009
// Query searches given an originals path and a db instance.
type Query struct {
db *gorm.DB
}
// SearchCount is the total number of search hits.
type SearchCount struct {
Total int
}
// New returns a new Query type with a given path and db instance.
func New(db *gorm.DB) *Query {
q := &Query{
db: db,
}
return q
}