You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the documentation for useLiveQuery for expo-sqlite it may be helpful to include a reference to these two cases in which the update hook will not invoked, which means that change listeners will not be notified of changes.
"the update hook is not invoked when conflicting rows are deleted because of an ON CONFLICT REPLACE clause"
"Nor is the update hook invoked when rows are deleted using the truncate optimization"
The truncate optimization can be avoided by adding .returning() or .where() to the drizzle orm delete statement.
I was trying to figure out why my query results were not changing even when I deleted entire tables from my database, and the truncate optimization was the reason. I'm suggesting that this be included in your documentation because I think it might save other developers debugging time.
If you like this idea, I am happy to draft a PR which adds documentation of this functionality.
The text was updated successfully, but these errors were encountered:
In the documentation for useLiveQuery for expo-sqlite it may be helpful to include a reference to these two cases in which the update hook will not invoked, which means that change listeners will not be notified of changes.
Both above quotes are taken from the sqlite update_hook documentation.
The truncate optimization can be avoided by adding
.returning()
or.where()
to the drizzle orm delete statement.I was trying to figure out why my query results were not changing even when I deleted entire tables from my database, and the truncate optimization was the reason. I'm suggesting that this be included in your documentation because I think it might save other developers debugging time.
If you like this idea, I am happy to draft a PR which adds documentation of this functionality.
The text was updated successfully, but these errors were encountered: