Debian Codegraph @

query_select.go

raw symbols SCIP
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 // DB references a database.
8 func DBscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/DB().(args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
9 return constructRootTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructRootTerm().("DB", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_DBscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_DB., args, map[string]interface{}{})
10 }
11
12 // TableOpts contains the optional arguments for the Table term
13 type TableOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/TableOpts# struct {
14 ReadModescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/TableOpts#ReadMode. interface{} `rethinkdb:"read_mode,omitempty"`
15 UseOutdatedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/TableOpts#UseOutdated. interface{} `rethinkdb:"use_outdated,omitempty"` // Deprecated
16 IdentifierFormatscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/TableOpts#IdentifierFormat. interface{} `rethinkdb:"identifier_format,omitempty"`
17 }
18
19 func (o TableOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/TableOpts#) toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/TableOpts#toMap().() map[string]interface{} {
20 return optArgsToMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/optArgsToMap().(o)
21 }
22
23 // Table selects all documents in a table. This command can be chained with
24 // other commands to do further processing on the data.
25 //
26 // There are two optional arguments.
27 // - useOutdated: if true, this allows potentially out-of-date data to be
28 // returned, with potentially faster reads. It also allows you to perform reads
29 // from a secondary replica if a primary has failed. Default false.
30 // - identifierFormat: possible values are name and uuid, with a default of name.
31 // If set to uuid, then system tables will refer to servers, databases and tables
32 // by UUID rather than name. (This only has an effect when used with system tables.)
33 func Tablescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Table().(name interface{}, optArgs ...TableOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/TableOpts#) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
34 opts := map[string]interface{}{}
35 if len(optArgs) >= 1 {
36 opts = optArgs[0].toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/TableOpts#toMap().()
37 }
38 return constructRootTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructRootTerm().("Table", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_TABLEscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_TABLE., []interface{}{name}, opts)
39 }
40
41 // Table selects all documents in a table. This command can be chained with
42 // other commands to do further processing on the data.
43 //
44 // There are two optional arguments.
45 // - useOutdated: if true, this allows potentially out-of-date data to be
46 // returned, with potentially faster reads. It also allows you to perform reads
47 // from a secondary replica if a primary has failed. Default false.
48 // - identifierFormat: possible values are name and uuid, with a default of name.
49 // If set to uuid, then system tables will refer to servers, databases and tables
50 // by UUID rather than name. (This only has an effect when used with system tables.)
51 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) Tablescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Table().(name interface{}, optArgs ...TableOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/TableOpts#) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
52 opts := map[string]interface{}{}
53 if len(optArgs) >= 1 {
54 opts = optArgs[0].toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/TableOpts#toMap().()
55 }
56 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Table", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_TABLEscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_TABLE., []interface{}{name}, opts)
57 }
58
59 // Get gets a document by primary key. If nothing was found, RethinkDB will return a nil value.
60 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) Getscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Get().(args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
61 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Get", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_GETscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_GET., args, map[string]interface{}{})
62 }
63
64 // GetAllOpts contains the optional arguments for the GetAll term
65 type GetAllOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/GetAllOpts# struct {
66 Indexscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/GetAllOpts#Index. interface{} `rethinkdb:"index,omitempty"`
67 }
68
69 func (o GetAllOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/GetAllOpts#) toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/GetAllOpts#toMap().() map[string]interface{} {
70 return optArgsToMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/optArgsToMap().(o)
71 }
72
73 // GetAll gets all documents where the given value matches the value of the primary
74 // index. Multiple values can be passed this function if you want to select multiple
75 // documents. If the documents you are fetching have composite keys then each
76 // argument should be a slice. For more information see the examples.
77 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) GetAllscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#GetAll().(keys ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
78 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "GetAll", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_GET_ALLscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_GET_ALL., keys, map[string]interface{}{})
79 }
80
81 // GetAllByIndex gets all documents where the given value matches the value of
82 // the requested index.
83 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) GetAllByIndexscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#GetAllByIndex().(index interface{}, keys ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
84 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "GetAll", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_GET_ALLscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_GET_ALL., keys, map[string]interface{}{"index": index})
85 }
86
87 // BetweenOpts contains the optional arguments for the Between term
88 type BetweenOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/BetweenOpts# struct {
89 Indexscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/BetweenOpts#Index. interface{} `rethinkdb:"index,omitempty"`
90 LeftBoundscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/BetweenOpts#LeftBound. interface{} `rethinkdb:"left_bound,omitempty"`
91 RightBoundscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/BetweenOpts#RightBound. interface{} `rethinkdb:"right_bound,omitempty"`
92 }
93
94 func (o BetweenOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/BetweenOpts#) toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/BetweenOpts#toMap().() map[string]interface{} {
95 return optArgsToMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/optArgsToMap().(o)
96 }
97
98 // Between gets all documents between two keys. Accepts three optional arguments:
99 // index, leftBound, and rightBound. If index is set to the name of a secondary
100 // index, between will return all documents where that index’s value is in the
101 // specified range (it uses the primary key by default). leftBound or rightBound
102 // may be set to open or closed to indicate whether or not to include that endpoint
103 // of the range (by default, leftBound is closed and rightBound is open).
104 //
105 // You may also use the special constants r.minval and r.maxval for boundaries,
106 // which represent “less than any index key” and “more than any index key”
107 // respectively. For instance, if you use r.minval as the lower key, then between
108 // will return all documents whose primary keys (or indexes) are less than the
109 // specified upper key.
110 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) Betweenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Between().(lowerKey, upperKey interface{}, optArgs ...BetweenOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/BetweenOpts#) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
111 opts := map[string]interface{}{}
112 if len(optArgs) >= 1 {
113 opts = optArgs[0].toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/BetweenOpts#toMap().()
114 }
115 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Between", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_BETWEENscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_BETWEEN., []interface{}{lowerKey, upperKey}, opts)
116 }
117
118 // FilterOpts contains the optional arguments for the Filter term
119 type FilterOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/FilterOpts# struct {
120 Defaultscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/FilterOpts#Default. interface{} `rethinkdb:"default,omitempty"`
121 }
122
123 func (o FilterOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/FilterOpts#) toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/FilterOpts#toMap().() map[string]interface{} {
124 return optArgsToMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/optArgsToMap().(o)
125 }
126
127 // Filter gets all the documents for which the given predicate is true.
128 //
129 // Filter can be called on a sequence, selection, or a field containing an array
130 // of elements. The return type is the same as the type on which the function was
131 // called on. The body of every filter is wrapped in an implicit `.default(false)`,
132 // and the default value can be changed by passing the optional argument `default`.
133 // Setting this optional argument to `r.error()` will cause any non-existence
134 // errors to abort the filter.
135 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) Filterscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Filter().(f interface{}, optArgs ...FilterOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/FilterOpts#) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
136 opts := map[string]interface{}{}
137 if len(optArgs) >= 1 {
138 opts = optArgs[0].toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/FilterOpts#toMap().()
139 }
140 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Filter", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_FILTERscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_FILTER., []interface{}{funcWrapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrap().(f)}, opts)
141 }