Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Regarding changefeeds - is there a way to tell when you've consumed all the initial data and are now receiving update diffs?


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.


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


Not at the moment, but we're on it -- see https://github.com/rethinkdb/rethinkdb/issues/3579.


Wouldn't setting a limit to more than the table/result size work?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: