-
Notifications
You must be signed in to change notification settings - Fork 19
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
Differenciate insert and update events #10
Comments
I have been going through the arangochair code to see how it works and I think I see how it's possible to do this. If you look at the code inside index.js, you will see that it is polling the database change log every second or so by making a call to the logger-follow REST API endpoint. If you call this API within a REST client like Postman, or some such, you will see that inserts generally have a transaction ID (tid) of "0" and updates generally have a tid > 0. I can see how I could probably make this change seamlessly and I'm considering creating a pull request to add this functionality, but I'm posting the comment here first just in case the author has any advice to tell me that things are not as I have stated them herein. |
Okay, I have now completed the aforementioned enhancement and created a pull request. So now, instead of:
You can listen for 'insert' and 'update' changes separately, as in:
or just:
I also fixed some field parsing bugs I found. If you want to use the enhancement before the pull request gets merged, just go grab it from my forked arangochair project: https://github.com/yerboogieman/arangochair Cheers! |
Hello,
We're currently using arangochair (@voondo 's fork in fact, because of authentication issues) and are rather happy with it !
Nevertheless, it would be great to be able to subscribe to insert and update events separately.
This page says that "Separate events for insert and update are currently not possible but will be part of a future update."
Any roadmap for this please ?
Thanks
The text was updated successfully, but these errors were encountered: