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

General callback after any successful action ? #803

Open
zedtux opened this issue May 3, 2022 · 2 comments
Open

General callback after any successful action ? #803

zedtux opened this issue May 3, 2022 · 2 comments

Comments

@zedtux
Copy link

zedtux commented May 3, 2022

First of all, thank you for this library 👍.

I'm brainstorming the synching of two instances of my app, and one option could be to replicate each data successfully inserted in the database so that the other instance can apply the updates too.

Is there any kind of global callback which would be triggered on a successful db.transaction(), insert, update, or destroy ?

@mceachen
Copy link
Member

I don't believe this is built-in.

I wrapped all DB calls to go through a wrapper class that ensures the db is open, handles nested transactions, and catches and logs all db errors. I'd suggest that approach: you then have as much flexibility as you need.

@zedtux
Copy link
Author

zedtux commented May 13, 2022

Thank you for your comment

@zedtux zedtux closed this as completed May 13, 2022
@zedtux zedtux reopened this May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants