Skip to content

Add ability to filter by composite IDs

Problem to solve

We have no easy way to filter for sets of composite IDs (e.g. those with two or more parts). There are easy ways to add this functionality in an a generic way, but it is currently missing.

Intended users

Further details

More performant queries, more declarative code, fewer N+1 traps.

Proposal

Add a mechanism to write queries equivalent to:

where (x,y) in VALUES

This can be done by rewriting to:

where ((a = a_0 and b = b_0) or (a = a_1 and b = b_1) or ...)

What does success look like, and how can we measure that?

We can easily query for composite IDs without N+1 queries

see: #12905 (closed)