You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Replaced `ResultRows`/`ResultRow` with `Cursor`, `Cursor` has the `Next`, `All` and `One` methods which stores the relevant value in the value pointed at by result. For more information check the examples.
6
+
- Changed the time constants (Days and Months) to package globals instead of functions
7
+
- Added the `Args` term and changed the arguments for many terms to `args ...interface{}` to allow argument splicing
8
+
- Added the `Changes` term and support for the feed response type
9
+
- Added the `Random` term
10
+
- Added the `Http` term
11
+
- The second argument for `Slice` is now optional
12
+
-`EqJoin` now accepts a function as its first argument
13
+
-`Nth` now returns a selection
14
+
15
+
## v0.2 (RethinkDB v1.12) - 13 April 2014
4
16
5
17
* Changed `Connect` to use `ConnectOpts` instead of `map[string]interface{}`
6
18
* Migrated to new `Group`/`Ungroup` functions, these replace `GroupedMapReduce` and `GroupBy`
@@ -13,8 +25,8 @@
13
25
14
26
## v0.1 (RethinkDB v1.11) - 27 November 2013
15
27
16
-
* Added noreply writes
17
-
* Added the new terms `index_status`, `index_wait` and `sync`
18
-
* Added the profile flag to the run functions
19
-
* Optional arguments are now structs instead of key, pair strings. Almost all of the struct fields are of type interface{} as they can have terms inside them. For example: `r.TableCreateOpts{ PrimaryKey: r.Expr("index") }`
20
-
* Returned arrays are now properly loaded into ResultRows. In the past when running `r.Expr([]interface{}{1,2,3})` would require you to use `RunRow` followed by `Scan`. You can now use `Run` followed by `ScanAll`
28
+
* Added noreply writes
29
+
* Added the new terms `index_status`, `index_wait` and `sync`
30
+
* Added the profile flag to the run functions
31
+
* Optional arguments are now structs instead of key, pair strings. Almost all of the struct fields are of type interface{} as they can have terms inside them. For example: `r.TableCreateOpts{ PrimaryKey: r.Expr("index") }`
32
+
* Returned arrays are now properly loaded into ResultRows. In the past when running `r.Expr([]interface{}{1,2,3})` would require you to use `RunRow` followed by `Scan`. You can now use `Run` followed by `ScanAll`
Copy file name to clipboardExpand all lines: README.md
+44-31Lines changed: 44 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,10 @@ GoRethink - RethinkDB Driver for Go [ driver for [RethinkDB](http://www.rethinkdb.com/) made by [Daniel Cannon](http://github.com/dancannon) and based off of Christopher Hesse's [RethinkGo](https://github.com/christopherhesse/rethinkgo) driver.
5
5
6
-
Current version: v0.2.1 (RethinkDB v1.12)
7
6
8
-
**Version 0.2 introduced some BC breaking changes, for more information check the [change log](CHANGELOG.md)**
7
+
Current version: v0.3 (RethinkDB v1.13)
8
+
9
+
**Version 0.3 introduced some API changes, for more information check the [change log](CHANGELOG.md)**
9
10
10
11
## Installation
11
12
@@ -67,36 +68,36 @@ A pre-configured [Pool](http://godoc.org/github.com/dancannon/gorethink#Pool) in
67
68
68
69
This library is based on the official drivers so the code on the [API](http://www.rethinkdb.com/api/) page should require very few changes to work.
69
70
70
-
To view full documentation for the query functions check the [GoDoc](http://godoc.org/github.com/dancannon/gorethink#RqlTerm)
71
+
To view full documentation for the query functions check the [GoDoc](http://godoc.org/github.com/dancannon/gorethink#Term)
ResultRows also has the function `Next` which is used to iterate through a result set. If a partial sequence is returned by the server Next will automatically fetch the result of the sequence.
126
+
Cursors have a number of methods available for accessing the query results
134
127
135
-
Example:
128
+
-`Next` retrieves the next document from the result set, blocking if necessary.
129
+
-`All` retrieves all documents from the result set into the provided slice.
130
+
-`One` retrieves the first document from the result se.
0 commit comments