Skip to content

Commit 2ad5b34

Browse files
committed
Renamed the upsert optarg with conflict
1 parent 398a98f commit 2ad5b34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

query_write.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type InsertOpts struct {
88
Durability interface{} `gorethink:"durability,omitempty"`
99
ReturnChanges interface{} `gorethink:"return_changes,omitempty"`
1010
CacheSize interface{} `gorethink:"cache_size,omitempty"`
11-
Upsert interface{} `gorethink:"upsert,omitempty"`
11+
Conflict interface{} `gorethink:"conflict,omitempty"`
1212
}
1313

1414
func (o *InsertOpts) toMap() map[string]interface{} {
@@ -19,7 +19,7 @@ func (o *InsertOpts) toMap() map[string]interface{} {
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,
2121
// or the optional argument return_changes, which will return the value of the row
22-
// you're inserting (and the old value if you use upsert) when set to true.
22+
// you're inserting when set to true.
2323
//
2424
// table.Insert(map[string]interface{}{"name": "Joe", "email": "[email protected]"}).RunWrite(sess)
2525
// table.Insert([]interface{}{map[string]interface{}{"name": "Joe"}, map[string]interface{}{"name": "Paul"}}).RunWrite(sess)

0 commit comments

Comments
 (0)