Skip to content
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

Update for compatibility and support for RethinkDB 1.15 #173

Merged
merged 17 commits into from
Oct 21, 2014

Conversation

mfenniak
Copy link
Owner

This PR will bring rethinkdb-net up-to-date with the latest RethinkDB. The latest RethinkDB is version 1.15; we support version 1.11. The majority of the driver's functionality does work just fine in RethinkDB 1.15, but there are a few upstream breaking changes that haven't been kept up-to-date.

This work does not include supporting new features introduced in RethinkDB, except for the new grouping and aggregation features that replace the support that rethinkdb-net already had. Changes to rethinkdb-net:

  • Remove "base" option from Reduce(); it's been removed upstream and the reduce operation now only works on queries with one or more items being returned.
  • Support multiple changes in [Update/Delete/Insert]AndReturnChanges (which is renamed from Update/Delete/Insert]AndReturnValues to match upstream changes)
  • Count() now supports a predicate for counting only rows that match a certain function.
  • GroupedMapReduce has been removed. The same functionality can be achieved now with separate .Group().Map().Reduce() functions chained together.
  • .GroupBy has been removed.
  • .Group() has been added to match other drivers. It can group on an index, or 1, 2, or 3 mapping functions. It returns a special query type that causes connection.Run() to return a dictionary with the grouping results.
  • Max, Min, Avg, Sum, Count, and Contains aggregates are supported. They work on both sequence queries and grouping queries.

This will fix issue #171.

...AndReturnValues changed to ...AndReturnChanges, and return DML object
updated to support multiple updates in the operation via Changes array.
@mfenniak mfenniak self-assigned this Oct 20, 2014
@mfenniak
Copy link
Owner Author

@dragan -- Hi Dale. Any chance you'd be able to update rethinkdb-net's TeamCity environment to RethinkDB 1.15.1? :-)

Introduces a new datum converter for grouped data,
DictionaryDatumConverterFactory, which only supports $reql_type$
GROUPED_DATA, not generic IDictionary support.  Some more of the old
grouping support is commented out with #if...#endif until all new
grouping support is completed.
@dragan
Copy link
Collaborator

dragan commented Oct 20, 2014

Yup, I should be able to do it this evening.

Note that the behaviour of Count when no records match the predicate in
the grouped query is surprising.  I've written to the rethinkdb
Google Group for confirmation that the behaviour is as-designed.
IGroupingDictionary is a type that's only supported for read, it's
automatically returned from Group() queries and grouped aggregations, and
it's also used by rethinkdb-net-newtonsoft because the GROUPED_DATA
reql_type has a special format that can't be intrinsically guessed by the
JSON parser.  IGroupingDictionary<,> is an IDictionary<,> so it shouldn't
even be noticed by the consumers.
Allows user-defined aggregations using grouped-map-reduce, rather than
just the RethinkDB pretty supported aggregations.
mfenniak added a commit that referenced this pull request Oct 21, 2014
Backwards-incompatible update to support RethinkDB v1.15
@mfenniak mfenniak merged commit addeaf4 into master Oct 21, 2014
@mfenniak mfenniak deleted the rethinkdb_1.15 branch October 21, 2014 01:18
@dragan
Copy link
Collaborator

dragan commented Oct 21, 2014

@mfenniak RethinkDB has been updated to 1.15.1 on the build agent.

@mfenniak
Copy link
Owner Author

Thanks @dragan!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants