-
Notifications
You must be signed in to change notification settings - Fork 26
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
no diff event triggered when a row is deleted from table #19
Comments
Works fine for me. I have also just now updated the example to use the latest version of this package, 1.0.3. |
@numtel can you go into more details on what the Also, thanks for the awesome work on this package! |
_index is the row number in the result set, starting with 1
|
@numtel thanks for the quick response. I'm having a hard time understanding how to get the deleted row. For instance, this is what I get when I do a lookup (filtered to just show unique ID and the _index value).
After I do a
What I'm wondering is how to know what entry_id was deleted from the second update. Thanks for any and all help! If I add more results in (currently limited to 2), the deleted row _index is always the length of the total result. (e.g 2 if there are 2 results, 1000 if there are 1000 results) |
I am dealing with this currently as well. Technically if you know the index of what has been deleted and you have a clone of the database that can still be queried, you could run SELECT * FROM <table> LIMIT <index-1>, <index> (where In my case, I am using this as a way to keep a mysql database and a graph database in sync without polling every few seconds, it works with the exception of Any suggestions? |
@Koleok We ended up spying on the condition field to see deleted items in order to trigger a remove. See this https://github.com/NewSpring/heighliner-expression-engine/blob/master/lib/sync.js#L61-L74 |
I've forked mysql-live-select and meteor-mysql and completely changed the interface so that diffing is performed with respect to keys. See these: https://github.com/wj32/mysql-live-select |
Interesting. Are you going to update the test cases? It looks like you are now able to use a minimongo collection on the client? I've started a fork of pg-live-select that will unify the postgres and mysql interfaces. https://github.com/numtel/pg-live-select/tree/LiveSelectBase The meteor package will then be a generic subscribed array. https://github.com/numtel/meteor-subscribed-array I haven't got the diff algorithm moved to the subscribed array repo yet. The plan is to support diff algorithms pluggable by further packages. |
I was planning to update the test cases but I ran into some problems trying to get nodeunit working properly. And yes, you now subscribe by creating a Mongo.Collection on the client and using Meteor.subscribe. |
@wj32 that is pretty nice, moves it more in the direction of db swapping without changing application code |
Neverminded. |
i have a mysql instance running and the example https://github.com/numtel/reactive-mysql-example in place. whenever i execute an
INSERT
the event is shown properly, but when a row isDELETED
it doesn't.The text was updated successfully, but these errors were encountered: