I want to know how to do a whereIn query in convex without scanning the whole table.
Trying to find a bunch of records by Ids in convex seems to be impossible.
The filter() function only allows q.eq and not q.in() to pass a list.
To be clear, I'm not talking about eager fetching relations. I'm talking about a single query. What if you have entities that many to many relationships. Whether you use a join/edge relation table or store an array of related entities, there's no way to fetch the dependent entities all at once
e.g. A.b_id = [x,y,z]
How do you query SELECT B WHERE B.id IN (x, y, x).
Using the convex-helper filter filter still scans the WHOLE table for b before filtering. In a large table this easily reaches the max documents read limit and max size (16mb) for a function read.
The only work around I've found is to call an action instead of a query in order to paginate, but actions have way lower limits than functions.
Help!