-
-
Notifications
You must be signed in to change notification settings - Fork 817
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
Notification callbacks #419
Comments
+1, this would be great to have. Polling my db way too much right now.. |
Huh, cool. I can't test right now, but it looks like it would be used with something like the following? var db = new sqlite3.Database(file, ['sqlite3.OPEN_READONLY']); db.on('insert', function() { |
That commit is missing a corresponding change in |
Is there a solution for this? On my web app I want to listen to data changes. |
This feature would be really nice to have. |
Any update on this feature? |
Would be awesome to see! |
I am able to get the events working (with this change: bpasero@1f1e2c8). However, this event does NOT work when multiple connections are used across multiple processes. I believe they only work for a single connection. |
Any update on this? |
Any update on this feature? It seems rather useful to have but why is this fallen on silent ears? |
There is an open PR to fix the implementation here: #1267 |
Merge it please 😢 I desperately need it! |
The PR is merged and will be released shortly 🙂 |
🥳 |
Sqlite features data-change notification callbacks that tell you when a particular table has been modified. This is super useful for writing realtime, reactive web servers, that notify all connected clients when data has changed. But there's no support for this notification API in node-sqlite3.
Would bindings for this be easy to add to node-sqlite3? I understand that sqlite runs in a different thread, so I imagine that the thread would need to communicate with the v8 thread, to call a notification method, and just pass it these parameters:
"insert"
,"delete"
, or"update"
describing the type of changerowid
of the rowThe text was updated successfully, but these errors were encountered: