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

Take advantage of sqlite3_update_hook in testing #1405

Closed
insipx opened this issue Dec 11, 2024 · 1 comment
Closed

Take advantage of sqlite3_update_hook in testing #1405

insipx opened this issue Dec 11, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@insipx
Copy link
Contributor

insipx commented Dec 11, 2024

In testing parts of our codebase like consent_sync and probably other parts, it could be useful to have a foolproof way to track how many + which intents are in ToPublish/Publish/Deleted

We can take advantage of the sqlite3 https://www.sqlite.org/c3ref/update_hook.html update_hook function in tests to track this easier. it doesn't exist in diesel, so libsqlite3-sys would need to be pulled in, a new connection established based off the db path on the EncryptedMessageStore, and the hook registered. A common binding between webassembly/native can be created

@insipx insipx added the enhancement New feature or request label Dec 11, 2024
@insipx insipx added this to libxmtp Dec 11, 2024
@insipx
Copy link
Contributor Author

insipx commented Dec 11, 2024

Not really required, was able to accomplish effectively the same with TRIGGER, in #1366

@insipx insipx closed this as completed Dec 11, 2024
@github-project-automation github-project-automation bot moved this to Done in libxmtp Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

1 participant