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

Implementation of sqlite3_update_hook #260

Closed
mqudsi opened this issue Apr 15, 2017 · 2 comments
Closed

Implementation of sqlite3_update_hook #260

mqudsi opened this issue Apr 15, 2017 · 2 comments

Comments

@mqudsi
Copy link
Contributor

mqudsi commented Apr 15, 2017

I'm posting this because of the comment in the code requesting that issues be created for use cases requiring access to the underlying sqlite3 handle.

I do not see an implementation for sqlite3_update_hook. It is exposed in sqlite3_sys as follows:

pub unsafe extern fn sqlite3_update_hook(p: *mut sqlite3,
                                     f: Option<sqlite3_update_hook_callback>,
                                     p: *mut c_void)
                                     -> *mut c_void

We have a unique-ish use case where integration with a system is performed by opening the sqlite3 db for read while the main module writes to the database. Update notifications are required to trigger a re-scan of rows in question. I don't think this functionality is currently implemented in rusqlite; I don't know whether it would be something you'd be interested in implementing.

Thank you.

gwenn added a commit to gwenn/rusqlite that referenced this issue Apr 25, 2017
First draft (no tested and a memory leak)
gwenn added a commit that referenced this issue Mar 24, 2018
Implementation of sqlite3_update_hook #260
@gwenn
Copy link
Collaborator

gwenn commented Aug 17, 2018

rusqlite 0.14 released

@gwenn gwenn closed this as completed Aug 17, 2018
@mqudsi
Copy link
Contributor Author

mqudsi commented Aug 17, 2018

Thanks!

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

No branches or pull requests

2 participants