Skip to content

Commit

Permalink
Add join to intCriterionHandler (stashapp#4414)
Browse files Browse the repository at this point in the history
* Add join to intCriterionHandler
* Add join to floatCriterionHandler
  • Loading branch information
bayured authored and dogwithakeyboard committed Feb 18, 2024
1 parent 8be79b9 commit 74eb09e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/sqlite/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,9 @@ func getPathSearchClauseMany(pathColumn, basenameColumn, p string, addWildcards,
func intCriterionHandler(c *models.IntCriterionInput, column string, addJoinFn func(f *filterBuilder)) criterionHandlerFunc {
return func(ctx context.Context, f *filterBuilder) {
if c != nil {
if addJoinFn != nil {
addJoinFn(f)
}
clause, args := getIntCriterionWhereClause(column, *c)
f.addWhere(clause, args...)
}
Expand All @@ -551,6 +554,9 @@ func intCriterionHandler(c *models.IntCriterionInput, column string, addJoinFn f
func floatCriterionHandler(c *models.FloatCriterionInput, column string, addJoinFn func(f *filterBuilder)) criterionHandlerFunc {
return func(ctx context.Context, f *filterBuilder) {
if c != nil {
if addJoinFn != nil {
addJoinFn(f)
}
clause, args := getFloatCriterionWhereClause(column, *c)
f.addWhere(clause, args...)
}
Expand Down

0 comments on commit 74eb09e

Please sign in to comment.