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

Filtering by existence of all values in a set, in a set of objects #499

Open
marioaae opened this issue Feb 5, 2021 · 0 comments
Open

Comments

@marioaae
Copy link

marioaae commented Feb 5, 2021

Hi everyone,
I'm very new to slick and I'm stuck trying to do a filter.

In scala, I have the following Set[String]:

["providerA", "providerB"]

And the following Rep[JsValue]:

[{"provider": "providerA", "id": "abc"}, {"provider": "providerB", "id": "zdf"}]
[{"provider": "providerA", "id": "tqr"}]
[{"provider": "providerB", "id": "xgu"}]

I would like to filter/find the rows which have all the providers from the Set[String] (providerA and providerB). In this case only the first row would be part of the result. The id in this case is irrelevant to the filter.

Thanks for your help!

@marioaae marioaae changed the title Filtering by existence of any value in a set, in an set of objects Filtering by existence of all values in a set, in a set of objects Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant