Joining on array column
in this example posts can have multiple authors which are saved in an array field in the database
The above example does not work because join only supports
eq function; but I also do not see any other option in the functional variants. I would imagine something like this could work;
The first part would need to use the fn I suppose to "materialize" the post.userIds array, but then the users query should be able to fairly efficiently do a lookup.
Is something like this possible already?3 Replies
xenial-black•4mo ago
could you file an issue?
ratty-blush•2mo ago
@mees - did you log a ticket? Did you manage to solve this?
extended-salmonOP•2mo ago
I didn't.
Isn't it already covered with https://github.com/TanStack/db/issues/288 though?
e.g.
And I didn't solve it. I am now just looping over js arrays without tanstack db.
Perhaps there are use cases for the join in array still