realm-swift icon indicating copy to clipboard operation
realm-swift copied to clipboard

`containsAll` for Query API

Open jeanbaptistebeau opened this issue 2 years ago • 1 comments

Problem

I see that a containsAny function was implemented for querying collections in Query API. In a scenario where, for instance, we want to query objects that have several tags, it would be useful to have a containsAll function.

(See Query.swift)

Solution

A containsAll function whose returned query is true if the collection contains ALL of the given objects.

Note that a current workaround is to use several contains queries assembled with && operators.

How important is this improvement for you?

I'd like to see it, but have a workaround

jeanbaptistebeau avatar Sep 08 '22 08:09 jeanbaptistebeau

Hi @jeanbaptistebeau I would add this to the backlog so we can discuss this with the team, given that there is already a workaround so no need to rush it. Thanks you for the suggestion.

dianaafanador3 avatar Sep 14 '22 16:09 dianaafanador3