Re:RethinkDB 1.16: cluster management API, realtime push
by moatra on Friday January 30, 2015 @07:01PM
(#8975281)
Regarding changefeeds - is there a way to tell when you've consumed all the initial data and are now receiving update diffs?
[ Parent
| on HN ]
Re:RethinkDB 1.16: cluster management API, realtime push
by coffeemug on Friday January 30, 2015 @07:10PM
(#8975311)
Yes. When you're getting initial data you'll get a document of the form `{ new_val: data }`. When you're getting changes, the document is of the form `{ new_val: data, old_val: data }`. Note that in the former case, the `old_data` field is missing.
Re:RethinkDB 1.16: cluster management API, realtime push
by moatra on Friday January 30, 2015 @11:16PM
(#8975866)
Ah, thanks. It looks like only a few query types actually return an initial result set: between, min, max, and order_by/limit ( http://rethinkdb.com/docs/changefeeds/python/ )
Is there a way to get an entire table as the initial result set before getting update diffs? Something like:
r.table("users").between(-Infinity, Infinity).changes().run() // Not actually valid
Re:RethinkDB 1.16: cluster management API, realtime push
by coffeemug on Saturday January 31, 2015 @12:06AM
(#8975956)
Not at the moment, but we're on it -- see https://github.com/rethinkdb/rethinkdb/issues/3579.