7 ms·
Regarding changefeeds - is there a way to tell when you've consumed all the initial data and are now receiving update diffs?
by moatra 12y ago
Regarding changefeeds - is there a way to tell when you've consumed all the initial data and are now receiving update diffs?
- coffeemug 12y agoYes. 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.
- moatra 12y agoAh, 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/ 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