Skip to content

Commit

Permalink
fix parseDocumentJSONQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
danielchalef committed Aug 9, 2023
1 parent 2b5578d commit 85aa630
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/store/postgres/search_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func parseDocumentJSONQuery(qb bun.QueryBuilder, jq *JSONQuery, isOr bool) bun.Q
if len(jq.And) > 0 {
qb = qb.WhereGroup(" AND ", func(qq bun.QueryBuilder) bun.QueryBuilder {
for _, subQuery := range jq.And {
qq = parseJSONQuery(qq, subQuery, false)
qq = parseDocumentJSONQuery(qq, subQuery, false)
}
return qq
})
Expand All @@ -77,7 +77,7 @@ func parseDocumentJSONQuery(qb bun.QueryBuilder, jq *JSONQuery, isOr bool) bun.Q
if len(jq.Or) > 0 {
qb = qb.WhereGroup(" AND ", func(qq bun.QueryBuilder) bun.QueryBuilder {
for _, subQuery := range jq.Or {
qq = parseJSONQuery(qq, subQuery, true)
qq = parseDocumentJSONQuery(qq, subQuery, true)
}
return qq
})
Expand Down

0 comments on commit 85aa630

Please sign in to comment.