| 1 | package rethinkdbscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ |
| 2 | |
| 3 | import ( |
| 4 | pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/ "gopkg.in/rethinkdb/rethinkdb-go.v6/ql2scip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/" |
| 5 | ) |
| 6 | |
| 7 | // InsertOpts contains the optional arguments for the Insert term |
| 8 | type InsertOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/InsertOpts# struct { |
| 9 | Durabilityscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/InsertOpts#Durability. interface{} `gorethink:"durability,omitempty"` |
| 10 | ReturnChangesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/InsertOpts#ReturnChanges. interface{} `gorethink:"return_changes,omitempty"` |
| 11 | Conflictscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/InsertOpts#Conflict. interface{} `gorethink:"conflict,omitempty"` |
| 12 | IgnoreWriteHookscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/InsertOpts#IgnoreWriteHook. interface{} `gorethink:"ignore_write_hook,omitempty"` |
| 13 | } |
| 14 | |
| 15 | func (o InsertOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/InsertOpts#) toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/InsertOpts#toMap().() map[string]interface{} { |
| 16 | return optArgsToMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/optArgsToMap().(o) |
| 17 | } |
| 18 | |
| 19 | // Insert documents into a table. Accepts a single document or an array |
| 20 | // of documents. |
| 21 | func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) Insertscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Insert().(arg interface{}, optArgs ...InsertOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/InsertOpts#) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# { |
| 22 | opts := map[string]interface{}{} |
| 23 | if len(optArgs) >= 1 { |
| 24 | opts = optArgs[0].toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/InsertOpts#toMap().() |
| 25 | } |
| 26 | return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Insert", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_INSERTscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_INSERT., []interface{}{Exprscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Expr().(arg)}, opts) |
| 27 | } |
| 28 | |
| 29 | // UpdateOpts contains the optional arguments for the Update term |
| 30 | type UpdateOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/UpdateOpts# struct { |
| 31 | Durabilityscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/UpdateOpts#Durability. interface{} `gorethink:"durability,omitempty"` |
| 32 | ReturnChangesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/UpdateOpts#ReturnChanges. interface{} `gorethink:"return_changes,omitempty"` |
| 33 | NonAtomicscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/UpdateOpts#NonAtomic. interface{} `gorethink:"non_atomic,omitempty"` |
| 34 | Conflictscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/UpdateOpts#Conflict. interface{} `gorethink:"conflict,omitempty"` |
| 35 | IgnoreWriteHookscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/UpdateOpts#IgnoreWriteHook. interface{} `gorethink:"ignore_write_hook,omitempty"` |
| 36 | } |
| 37 | |
| 38 | func (o UpdateOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/UpdateOpts#) toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/UpdateOpts#toMap().() map[string]interface{} { |
| 39 | return optArgsToMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/optArgsToMap().(o) |
| 40 | } |
| 41 | |
| 42 | // Update JSON documents in a table. Accepts a JSON document, a ReQL expression, |
| 43 | // or a combination of the two. You can pass options like returnChanges that will |
| 44 | // return the old and new values of the row you have modified. |
| 45 | func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) Updatescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Update().(arg interface{}, optArgs ...UpdateOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/UpdateOpts#) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# { |
| 46 | opts := map[string]interface{}{} |
| 47 | if len(optArgs) >= 1 { |
| 48 | opts = optArgs[0].toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/UpdateOpts#toMap().() |
| 49 | } |
| 50 | return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Update", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_UPDATEscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_UPDATE., []interface{}{funcWrapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrap().(arg)}, opts) |
| 51 | } |
| 52 | |
| 53 | // ReplaceOpts contains the optional arguments for the Replace term |
| 54 | type ReplaceOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ReplaceOpts# struct { |
| 55 | Durabilityscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ReplaceOpts#Durability. interface{} `gorethink:"durability,omitempty"` |
| 56 | ReturnChangesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ReplaceOpts#ReturnChanges. interface{} `gorethink:"return_changes,omitempty"` |
| 57 | NonAtomicscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ReplaceOpts#NonAtomic. interface{} `gorethink:"non_atomic,omitempty"` |
| 58 | IgnoreWriteHookscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ReplaceOpts#IgnoreWriteHook. interface{} `gorethink:"ignore_write_hook,omitempty"` |
| 59 | } |
| 60 | |
| 61 | func (o ReplaceOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ReplaceOpts#) toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ReplaceOpts#toMap().() map[string]interface{} { |
| 62 | return optArgsToMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/optArgsToMap().(o) |
| 63 | } |
| 64 | |
| 65 | // Replace documents in a table. Accepts a JSON document or a ReQL expression, |
| 66 | // and replaces the original document with the new one. The new document must |
| 67 | // have the same primary key as the original document. |
| 68 | func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) Replacescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Replace().(arg interface{}, optArgs ...ReplaceOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ReplaceOpts#) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# { |
| 69 | opts := map[string]interface{}{} |
| 70 | if len(optArgs) >= 1 { |
| 71 | opts = optArgs[0].toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ReplaceOpts#toMap().() |
| 72 | } |
| 73 | return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Replace", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_REPLACEscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_REPLACE., []interface{}{funcWrapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrap().(arg)}, opts) |
| 74 | } |
| 75 | |
| 76 | // DeleteOpts contains the optional arguments for the Delete term |
| 77 | type DeleteOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/DeleteOpts# struct { |
| 78 | Durabilityscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/DeleteOpts#Durability. interface{} `gorethink:"durability,omitempty"` |
| 79 | ReturnChangesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/DeleteOpts#ReturnChanges. interface{} `gorethink:"return_changes,omitempty"` |
| 80 | IgnoreWriteHookscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/DeleteOpts#IgnoreWriteHook. interface{} `gorethink:"ignore_write_hook,omitempty"` |
| 81 | } |
| 82 | |
| 83 | func (o DeleteOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/DeleteOpts#) toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/DeleteOpts#toMap().() map[string]interface{} { |
| 84 | return optArgsToMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/optArgsToMap().(o) |
| 85 | } |
| 86 | |
| 87 | // Delete one or more documents from a table. |
| 88 | func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) Deletescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Delete().(optArgs ...DeleteOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/DeleteOpts#) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# { |
| 89 | opts := map[string]interface{}{} |
| 90 | if len(optArgs) >= 1 { |
| 91 | opts = optArgs[0].toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/DeleteOpts#toMap().() |
| 92 | } |
| 93 | return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Delete", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_DELETEscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_DELETE., []interface{}{}, opts) |
| 94 | } |
| 95 | |
| 96 | // Sync ensures that writes on a given table are written to permanent storage. |
| 97 | // Queries that specify soft durability do not give such guarantees, so Sync |
| 98 | // can be used to ensure the state of these queries. A call to Sync does not |
| 99 | // return until all previous writes to the table are persisted. |
| 100 | func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) Syncscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Sync().(args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# { |
| 101 | return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Sync", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_SYNCscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_SYNC., args, map[string]interface{}{}) |
| 102 | } |