Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open to a PR to support sqlite3_update_hook, sqlite3_commit_hook, sqlite3_rollback_hook? #187

Open
hborders opened this issue Nov 21, 2023 · 2 comments

Comments

@hborders
Copy link

I'd like to add support for sqlite3_update_hook and sqlite3_commit_hook and sqlite3_rollback_hook, and ideally, I'd like to do so as part of this project. Do you have any contribution guidelines?

I think implementing the sqlite3_update_hook API is most important because it could avoid a re-query when dependent data changes. Similar APIs exist in SqlBrite and SqlDelight Query (which requires users to maintain their own dependencies outside sqlite, and which notifies outside sqlite after the transaction completes in Transacter), but they always requery all data. Instead, a sqlite3_update_hook could allow a client to requery only the data that changed rather than the entire data set.

If including API that doesn't exist either directly or in spirit within Android or AndroidX is not within the bounds of this project, do you have any advice for how to add sqlite_*_hook support to a project consuming requery/sqlite-android?

Thanks!

@npurushe
Copy link
Contributor

npurushe commented Dec 4, 2023

Hi yes that makes sense to me since its an optional hook, feel free to open a PR. I think this can be implemented similarly to SQLiteFunction.

@jdicami
Copy link
Contributor

jdicami commented Jul 29, 2024

Hello,

We were also looking to have the update hook supported. I opened a PR here 194.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants