-
-
Notifications
You must be signed in to change notification settings - Fork 131
Home
RethinkDb.Driver is a ReQL driver for RethinkDB. This driver is closely ported from the official Java driver.
This C# driver strives for 100% API compatibility and ReQL completeness.
NuGet Package RethinkDb.Driver
Install-Package RethinkDb.Driver -Pre
If you're using CoreCLR, you may need to manually restore Microsoft.Extensions.Logging references from:
dnu restore --fallbacksource https://www.myget.org/F/aspnetvnext/api/v2/
You should be able to follow any examples found in the official ReQL documentation for the Java driver. However, the official Java driver documentation is unavailable at the time of this writing.
In the meantime, the ReQL JavaScript API documentation can suffice. However, there are some known deviations between the official Java API and JavaScript APIs. For example, specifying optional arguments:
r.table('marvel').getAll('man_of_steel', {index:'code_name'})
.run(conn, callback)The Java driver (and C# driver supports) the use of .optArg() method calls to specify optional arguments. The equivalent query in Java (and C#) is shown below:
Cursor<Foo> foo = r.db(DbName).table("marvel")
.getAll("man_of_steel")
.optArg("index", "code_name")
.run<Foo>(conn);The C# driver also supports anonymous typed optional arguments. ReQL expressions in other drivers usually specify optional arguments last. The following syntax follows this convention via indexers. The equivalent query above can also be written as:
Cursor<Foo> foo = r.db(DbName).table("marvel")
.getAll("man_of_steel")[new {index="code_name"}]
.run<Foo>(conn);- Home
- Query Examples
- Logging
- Connections & Pooling
- Extra C# Features
- GOTCHA Goblins!
- LINQ to ReQL Provider
- Differences
- Java ReQL API Documentation