Skip to content

Commit 398a98f

Browse files
committed
Renamed ReturnVals to ReturnChanges
1 parent 5f0abf7 commit 398a98f

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

query_write.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import (
55
)
66

77
type InsertOpts struct {
8-
Durability interface{} `gorethink:"durability,omitempty"`
9-
ReturnVals interface{} `gorethink:"return_vals,omitempty"`
10-
CacheSize interface{} `gorethink:"cache_size,omitempty"`
11-
Upsert interface{} `gorethink:"upsert,omitempty"`
8+
Durability interface{} `gorethink:"durability,omitempty"`
9+
ReturnChanges interface{} `gorethink:"return_changes,omitempty"`
10+
CacheSize interface{} `gorethink:"cache_size,omitempty"`
11+
Upsert interface{} `gorethink:"upsert,omitempty"`
1212
}
1313

1414
func (o *InsertOpts) toMap() map[string]interface{} {
@@ -18,7 +18,7 @@ func (o *InsertOpts) toMap() map[string]interface{} {
1818
// Insert JSON documents into a table. Accepts a single JSON document or an array
1919
// of documents. You may also pass the optional argument durability with value
2020
// 'hard' or 'soft', to override the table or query's default durability setting,
21-
// or the optional argument return_vals, which will return the value of the row
21+
// or the optional argument return_changes, which will return the value of the row
2222
// you're inserting (and the old value if you use upsert) when set to true.
2323
//
2424
// table.Insert(map[string]interface{}{"name": "Joe", "email": "[email protected]"}).RunWrite(sess)
@@ -32,9 +32,9 @@ func (t Term) Insert(arg interface{}, optArgs ...InsertOpts) Term {
3232
}
3333

3434
type UpdateOpts struct {
35-
Durability interface{} `gorethink:"durability,omitempty"`
36-
ReturnVals interface{} `gorethink:"return_vals,omitempty"`
37-
NotAtomic interface{} `gorethink:"non_atomic,omitempty"`
35+
Durability interface{} `gorethink:"durability,omitempty"`
36+
ReturnChanges interface{} `gorethink:"return_changes,omitempty"`
37+
NotAtomic interface{} `gorethink:"non_atomic,omitempty"`
3838
}
3939

4040
func (o *UpdateOpts) toMap() map[string]interface{} {
@@ -44,7 +44,7 @@ func (o *UpdateOpts) toMap() map[string]interface{} {
4444
// Update JSON documents in a table. Accepts a JSON document, a RQL expression,
4545
// or a combination of the two. The optional argument durability with value
4646
// 'hard' or 'soft' will override the table or query's default durability setting.
47-
// The optional argument return_vals will return the old and new values of the
47+
// The optional argument return_changes will return the old and new values of the
4848
// row you're modifying when set to true (only valid for single-row updates).
4949
// The optional argument non_atomic lets you permit non-atomic updates.
5050
func (t Term) Update(arg interface{}, optArgs ...UpdateOpts) Term {
@@ -56,9 +56,9 @@ func (t Term) Update(arg interface{}, optArgs ...UpdateOpts) Term {
5656
}
5757

5858
type ReplaceOpts struct {
59-
Durability interface{} `gorethink:"durability,omitempty"`
60-
ReturnVals interface{} `gorethink:"return_vals,omitempty"`
61-
NotAtomic interface{} `gorethink:"non_atomic,omitempty"`
59+
Durability interface{} `gorethink:"durability,omitempty"`
60+
ReturnChanges interface{} `gorethink:"return_changes,omitempty"`
61+
NotAtomic interface{} `gorethink:"non_atomic,omitempty"`
6262
}
6363

6464
func (o *ReplaceOpts) toMap() map[string]interface{} {
@@ -69,7 +69,7 @@ func (o *ReplaceOpts) toMap() map[string]interface{} {
6969
// and replaces the original document with the new one. The new document must
7070
// have the same primary key as the original document. The optional argument
7171
// durability with value 'hard' or 'soft' will override the table or query's
72-
// default durability setting. The optional argument return_vals will return
72+
// default durability setting. The optional argument return_changes will return
7373
// the old and new values of the row you're modifying when set to true (only
7474
// valid for single-row replacements). The optional argument non_atomic lets
7575
// you permit non-atomic updates.
@@ -82,15 +82,15 @@ func (t Term) Replace(arg interface{}, optArgs ...ReplaceOpts) Term {
8282
}
8383

8484
type DeleteOpts struct {
85-
Durability interface{} `gorethink:"durability,omitempty"`
86-
ReturnVals interface{} `gorethink:"return_vals,omitempty"`
85+
Durability interface{} `gorethink:"durability,omitempty"`
86+
ReturnChanges interface{} `gorethink:"return_changes,omitempty"`
8787
}
8888

8989
func (o *DeleteOpts) toMap() map[string]interface{} {
9090
return optArgsToMap(o)
9191
}
9292

93-
// Delete one or more documents from a table. The optional argument return_vals
93+
// Delete one or more documents from a table. The optional argument return_changes
9494
// will return the old value of the row you're deleting when set to true (only
9595
// valid for single-row deletes). The optional argument durability with value
9696
// 'hard' or 'soft' will override the table or query's default durability setting.

0 commit comments

Comments
 (0)