Filter improvement exploration

Changed the rating filter to allow for more than just an equality check.  This progresses #29.
This commit is contained in:
Stash Dev
2019-03-24 15:11:58 -07:00
parent c1f1a6ccff
commit b1db98bd1f
22 changed files with 339 additions and 54 deletions

View File

@@ -164,8 +164,11 @@ func (qb *SceneQueryBuilder) Query(sceneFilter *SceneFilterType, findFilter *Fin
}
if rating := sceneFilter.Rating; rating != nil {
whereClauses = append(whereClauses, "rating = ?")
args = append(args, *sceneFilter.Rating)
clause, count := getIntCriterionWhereClause("rating", *sceneFilter.Rating)
whereClauses = append(whereClauses, clause)
if count == 1 {
args = append(args, sceneFilter.Rating.Value)
}
}
if resolutionFilter := sceneFilter.Resolution; resolutionFilter != nil {