Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Pass optargs to changes #112

Closed
danielcompton opened this issue Nov 15, 2015 · 0 comments
Closed

Pass optargs to changes #112

danielcompton opened this issue Nov 15, 2015 · 0 comments

Comments

@danielcompton
Copy link
Collaborator

changes currently doesn't support any optargs.

http://rethinkdb.com/api/javascript/changes/

There are four optional arguments to changes. ...

Starting with RethinkDB 2.2, state documents will only be sent if the includeStates option is true, even on point changefeeds. Initial values will only be sent if includeInitial is true. If includeStates is true and includeInitial is false, the first document on the feed will be {state: 'ready'}.

From http://rethinkdb.com/blog/2.2-release/

Note: this is a breaking change. Please update your applications to explicitly turn on includeInitial when you need it.

From the driver mailing list:

Atomic Changefeeds

We’ve added a new optarg include_initial to the .changes()
command. When set to false (the default), you only receive changes
to the data. When set to true, you also receive the initial
values of the data. So if you write
r.table('test').changes(include_initial: true), you’ll receive all
the rows in test, and then atomically switch over to receiving
changes for those rows. Changes can be interspersed with initial
values, but you’ll never get a change for a row you haven’t seen an
initial value for yet. It’s “atomic” because you’re guaranteed not to
miss any changes — if a write W occurs to a row, either the initial
value for that row will include W or you’ll see a change
corresponding to W. (Compare this to reading the value and then
opening a changefeed, where you can miss writes that occur between the
two reads.)

We’ve also changed the behavior of point changefeeds (.get.changes)
and ordered limit changefeeds (.order_by.limit.changes). Those
changefeeds previously always included initial values, whereas other
changefeeds never included initial values. Now all changefeeds
default to not including initial values, so you have to explicitly
turn them on if you want them.

danielcompton added a commit that referenced this issue Apr 13, 2016
- Rename changes arg from table to xs
- Add a new arity to changes to pass optargs

Fixes #112, Fixes #76
danielcompton added a commit that referenced this issue Apr 13, 2016
- Rename changes arg from table to xs
- Add a new arity to changes to pass optargs

Fixes #112, Fixes #76
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant