Skip to content

v0.8.0.0

Compare
Choose a tag to compare
@mfenniak mfenniak released this 21 Oct 02:26
· 223 commits to master since this release

Features

  • Upgrade to support RethinkDB version 1.15. PR #173 & Issue #171
    • New Group method can be used for grouping on an index value, or between 1 and 3 different key values.
    • Count aggregate now supports a predicate for counting only matching rows.
    • Max, Min, Avg, Sum, Count, and Contains aggregates are now fully supported. Previously only Avg and Sum aggregates were supported.
  • Support for serializing and deserializing TimeSpan data types, which was added to the Newtonsoft serializer but not the basic serialization implementation. PR #152
  • Expressions now support the addition of DateTime and TimeSpan objects, as well as DateTime and DateTimeOffset's Add methods (eg. AddHours, AddDays). PR #152, Issue #158 Note, AddMonths is not supported.
  • Support for multi-index creation. Issue #160 & PR #161
  • Support for OrderBy on indexes. Issue #162
  • A type-safe object model has been added for secondary indexes. Calling table.IndexDefine("index-name", o => o.IndexedField) will return an IIndex<TRecord, TIndexType> interface. This object can be used to create or drop the index (.IndexCreate, .IndexDrop), but more importantly provides type-consistency for operations that can use the index, such as .GetAll, .Between, .OrderBy, .EqJoin, and .Group. It also removes the need for explicitly specifying the index type in the generic .Group method. Issue #163.

Breaking Changes

  • PR #173 contained a number of breaking changes to maintain consistency with RethinkDB driver changes on other platforms and remove functionality that is no longer supported by RethinkDB.
    • Remove base parameter from Reduce(); it's been removed in RethinkDB and instead an error occurs when attempting to reduce an empty sequence, and the only element is returned when reducing a single-element sequence. Part of PR #173.
    • UpdateAndReturnValues, InsertAndReturnValues, and DeleteAndReturnValues have all been renamed to "...ReturnChanges", and their return value has changed to support returning multiple changes. These changes are for compatibility and to maintain consistency with other RethinkDB drivers. Part of PR #173.
    • GroupedMapReduce has been removed for consistency with other RethinkDB drivers. .Group(...).Map(...).Reduce(...) can be used as an alternative. Part of PR #173.
    • GroupBy and its prebuilt aggregates have been removed for consistency with other RethinkDB drivers. .Group() followed by an aggregate can be used instead. Part of PR #173.
  • Explicitly supplying 'null' for the query method GetAll's indexName parameter (eg. .GetAll("3", null)) is now ambiguous between a "string" and "IIndex" second parameter; to resolve this, disambiguate the function call with an explicit cast (eg. .GetAll("3", (string)null)). Issue #163.
  • OrderBy and OrderByDescending overloads that took both a memberReferenceExpression and an indexName were removed. The index always has priority, so rewrite such queries to have an OrderBy the index, and .ThenBy() the member field if required. Issue #163.