Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added filterOpt and filterIf to Query. #1909

merged 1 commit into from May 19, 2018


Copy link

@Asamsig Asamsig commented May 19, 2018

Fixes #1820

Added examples to the documentation.

Created a new test class(QueryMethodTest) for filterOpt and filterIf. I had a hard time finding a good place to put the tests, so I decided on a clean test class.

@Asamsig Asamsig force-pushed the issue/1820-optional-filter branch from 046246b to 8af82d4 May 19, 2018
Added examples of both to the documentation.
@Asamsig Asamsig force-pushed the issue/1820-optional-filter branch from 8af82d4 to 4483227 May 19, 2018
@hvesalai hvesalai added this to the 3.3 milestone May 19, 2018
@hvesalai hvesalai merged commit 3b930b4 into slick:master May 19, 2018
3 checks passed => withFilter(a => f(a, v))).getOrElse(this)

/** Applies the given predicate, if the given boolean parameter evaluates to true,
* if the value is not present, the predicate will not be part of the query. */
Copy link

@kubukoz kubukoz May 25, 2018

Probably meant if the value evaluates to false - "not present" doesn't really match a boolean (I assume it's a copy-paste issue)

Copy link

@hvesalai hvesalai May 26, 2018

👍 I'll make the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants