photoprism/internal/query/subjects.go

15 lines
318 B
Go

package query
import (
"github.com/photoprism/photoprism/internal/entity"
)
// Subjects returns subjects from the index.
func Subjects(limit, offset int) (result entity.Subjects, err error) {
stmt := Db()
stmt = stmt.Order("id").Limit(limit).Offset(offset)
err = stmt.Find(&result).Error
return result, err
}