I’ve been noticing that the query functions for triplit are not as advanced or easy to use as in most other database libraries. I’ve made a small write up with a full code example comparison at the end with my thoughts and comparisons in this thread.
To start with an example, here is my Triplit schema that I’m using. This is for a very simple receipt splitting app. Users can have receipts, which have a list of items. Each item can be associated with specific people who ate that item. An item can have multiple people if they all shared a specific item, so there is a many to many relation with the item_people
table. For simplicity, I am excluding a users table and auth/etc.
I am going to use InstantDB as a direct comparison, but also I have to note that many other libraries like Prisma, Drizzle, Remult, ElectricSQL, Convex ents, etc. have the functionality that I will show from InstantDB, but is missing from Triplit. I am coming here after trying out those, so it feels like a s