-
-
Notifications
You must be signed in to change notification settings - Fork 619
Closed
Description
DESCRIPTION:
Currently, the filterNot method cannot be used like the filter method, controlling it with a logical condition or optional value (filterIf/filterOpt). It would be nice to be able to add a where not clause to a query by adding the method to the method call chain (relying on the input condition in the form of a boolean or option value).
EXPECTED RESULT:
Ability to use the filterNotIf(boolean condition)(f)/filterNotOpt(optional value)(f) method in the query builder method call chain.
Example:
Table.filter(_.column1 === "value1").filterNotIf(condition)(Table2.filter(_.column2 === "value2).exists)
ACTUAL RESULT:
Currently, it is necessary to assign a query to a variable, add a condition, e.g. in the form of an if, and use the filterNot method on a variable in one of the paths.
Example:
val query = Table.filter(_.column1 === "value1")
if (condition) query.filterNot(Table2.filter(_.column2 === "value2).exists) else query
I would be happy to contribute. :)
manfredi-giordano
Metadata
Metadata
Assignees
Labels
No labels