feat/search-all-terms #43
No reviewers
Labels
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
DenktMit-OSS/lt-crudular!43
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/search-all-terms"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
2e047e3e477adff7bd2e@ -62,0 +86,4 @@val positive = searchField.copy(not = false)val perTerm = value.filterNotNull().map { singleCondition(positive, it, mappers, dsl, keyAlias) }val terms = if (searchField.terms == CrudSearchTerms.ANY) DSL.or(perTerm) else DSL.and(perTerm)return if (searchField.not) terms.not() else termsQuestion about how
notapplies with a list of search terms on an array column, compared to a single search term: is the difference intended?For a single value,
notapplies to each element, inside theEXISTS(invalueCondition, line 307). For a list, this line applies it to the whole result, outside theEXISTS. The same term therefore gives a different result for aStringproperty than for aList<String>property.Example:
@CrudSearchField("keywords", rudSearchType.CONTAINS, not = true)and a book with the keywords{sci, fiction}:"sci"givesexists (... where not (value like '%sci%')): at least one keyword does not contain "sci". The book matches.["sci"]givesnot exists (... where value like '%sci%'): no keyword contains "sci". The book does not match.Good finding. The "not" now works as a real negation, so outside of the condition described by the annotation
7adff7bd2efd032f295b