-
Notifications
You must be signed in to change notification settings - Fork 5
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
Need hoodie.database.on('change', change) and db.on('change', change) methods #24
Comments
i suggest the following additions to the api. as far as i know we can't track 'created' events for documents without huge additional effort because it might be that a document got created, and updated client-side before sync happened. we can say that the document got deleted because of a _deleted flag. if there are no objections ( @inator @janl ) i would start implementing it.
i have a little trouble executing the tests on my windows laptop. i could use some help for the final testing. (i need a linux setup soon :) )
|
i would also add a replicate method. this way you can work with data across all user accounts. (read-only) write operations have to be executed in a specific user database.
|
instead of var reportEvents = hoodie.database('reports').events();
reportEvents.on('report:update', function(doc) { /* ... */ });
reportEvents.on('report:remove', function(doc) { /* ... */ }); I'd do var reportsDb = hoodie.database('reports')
reportsDb.on('report:update', function(doc) { /* ... */ });
reportsDb.on('report:remove', function(doc) { /* ... */ }); |
@gr2m |
yeah you can do something like this: start listening on the first |
@nintra let’s make the The rest looks good, happy to help testing on *nix. |
My dream additions allow for _db_updates (couchDB-wide) and _changes (for individual dbs) to be exposed through the plugin api.
Could pass an object with type (updated, created, deleted) and other pertenent details much like: npm follow-db-updates:
https://npmjs.org/package/follow-db-updates
The text was updated successfully, but these errors were encountered: