Skip to content

Commit

Permalink
docs and tag
Browse files Browse the repository at this point in the history
  • Loading branch information
bchavez committed Oct 22, 2015
1 parent b813430 commit 0a4ea10
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,21 @@ public void get_a_poco()
}
*/
```
You should be able to follow any examples found in the official [ReQL documentation](http://www.rethinkdb.com/api/javascript/) with this driver.

#### Known deviations from official JavaScript API documentation
There are some known deviations in both the Java Driver and this driver from the official JavaScript API documentation.
#### Documentation
You should be able to follow any examples found in the official [ReQL documentation](http://www.rethinkdb.com/api/javascript/) for the ***Java*** driver. However, the official **Java** driver documentation is *unavailable* at the time of this writing.

__Specifying optional arguments in getAll()__
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:

##### Optional arguments with getAll()
```javascript
r.table('marvel').getAll('man_of_steel', {index:'code_name'}).run(conn, callback)
```
To specify the same index as in the sample, use ```.optArg(```
The **Java** and **C#** driver use `.optArg()` to specify optional arguments. The equivalent query in **Java** (and **C#**) is shown below:
```csharp
Cursor<Foo> foo = r.db(DbName).table("marvel").getAll("man_of_steel").optArg("index", "code_name").run<Foo>(conn);
Cursor<Foo> foo = r.db(DbName).table("marvel").getAll("man_of_steel")
.optArg("index", "code_name")
.run<Foo>(conn);
```


Expand Down
2 changes: 1 addition & 1 deletion Source/Builder/NuGet/RethinkDb.Driver.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<releaseNotes>
History
v0.0.5-alpha3
* Cursor support for sequence / partial results (ex: getAll).
* Cursor support for sequence / partial results (example getAll).
* Make .run dynamic.
* Added faster .runCursor for queries expecting a cursor.

Expand Down

0 comments on commit 0a4ea10

Please sign in to comment.