Question about Live Queries and when they update
From my testing, it appears that Live Queries only actually update if the main table being queried from are updated. Is this correct? So if I
useLiveQuery
with a large relational query that loads a bunch of nested stuff, if any of that nested stuff is updated, I won't get notified. Only if the top level table changes.
I'd love to know a little bit more detail about how this all works so that I can better understand in what situations the change listener fires. Is this documented anywhere?2 Replies
possibly related: https://github.com/drizzle-team/drizzle-orm/issues/2660
GitHub
[BUG]: useLiveQuery doesn't see change when querying joined tables ...
What version of drizzle-orm are you using? 0.31.2 What version of drizzle-kit are you using? 0.22.5 Describe the Bug I'm not positive if this is a bug or a feature request, but the docs around ...
seems like the change listener is only added to the main table, source here: https://github.com/drizzle-team/drizzle-orm/blob/64b3c85953d35bf37342ba8cb2b48f2ad08ee7a8/drizzle-orm/src/expo-sqlite/query.ts#L39
GitHub
drizzle-orm/drizzle-orm/src/expo-sqlite/query.ts at 64b3c85953d35bf...
Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅 - drizzle-team/drizzle-orm