Debian Codegraph @

query_aggregation.go

raw symbols SCIP
1 package rethinkdbscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/
2
3 import 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`/"
4
5 // Aggregation
6 // These commands are used to compute smaller values from large sequences.
7
8 // Reduce produces a single value from a sequence through repeated application
9 // of a reduction function
10 //
11 // It takes one argument of type `func (r.Term, r.Term) interface{}`, for
12 // example this query sums all elements in an array:
13 //
14 // r.Expr([]int{1,3,6}).Reduce(func (left, right r.Term) interface{} {
15 // return left.Add(right)
16 // })
17 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) Reducescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Reduce().(args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
18 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Reduce", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_REDUCEscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_REDUCE., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(args), map[string]interface{}{})
19 }
20
21 // DistinctOpts contains the optional arguments for the Distinct term
22 type DistinctOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/DistinctOpts# struct {
23 Indexscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/DistinctOpts#Index. interface{} `rethinkdb:"index,omitempty"`
24 }
25
26 func (o DistinctOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/DistinctOpts#) toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/DistinctOpts#toMap().() map[string]interface{} {
27 return optArgsToMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/optArgsToMap().(o)
28 }
29
30 // Distinct removes duplicate elements from the sequence.
31 func Distinctscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Distinct().(arg interface{}, optArgs ...DistinctOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/DistinctOpts#) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
32 opts := map[string]interface{}{}
33 if len(optArgs) >= 1 {
34 opts = optArgs[0].toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/DistinctOpts#toMap().()
35 }
36 return constructRootTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructRootTerm().("Distinct", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_DISTINCTscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_DISTINCT., []interface{}{arg}, opts)
37 }
38
39 // Distinct removes duplicate elements from the sequence.
40 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) Distinctscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Distinct().(optArgs ...DistinctOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/DistinctOpts#) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
41 opts := map[string]interface{}{}
42 if len(optArgs) >= 1 {
43 opts = optArgs[0].toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/DistinctOpts#toMap().()
44 }
45 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Distinct", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_DISTINCTscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_DISTINCT., []interface{}{}, opts)
46 }
47
48 // GroupOpts contains the optional arguments for the Group term
49 type GroupOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/GroupOpts# struct {
50 Indexscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/GroupOpts#Index. interface{} `rethinkdb:"index,omitempty"`
51 Multiscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/GroupOpts#Multi. interface{} `rethinkdb:"multi,omitempty"`
52 }
53
54 func (o GroupOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/GroupOpts#) toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/GroupOpts#toMap().() map[string]interface{} {
55 return optArgsToMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/optArgsToMap().(o)
56 }
57
58 // Group takes a stream and partitions it into multiple groups based on the
59 // fields or functions provided. Commands chained after group will be
60 // called on each of these grouped sub-streams, producing grouped data.
61 func Groupscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Group().(fieldOrFunctions ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
62 return constructRootTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructRootTerm().("Group", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_GROUPscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_GROUP., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(fieldOrFunctions), map[string]interface{}{})
63 }
64
65 // MultiGroup takes a stream and partitions it into multiple groups based on the
66 // fields or functions provided. Commands chained after group will be
67 // called on each of these grouped sub-streams, producing grouped data.
68 //
69 // Unlike Group single documents can be assigned to multiple groups, similar
70 // to the behavior of multi-indexes. When the grouping value is an array, documents
71 // will be placed in each group that corresponds to the elements of the array. If
72 // the array is empty the row will be ignored.
73 func MultiGroupscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MultiGroup().(fieldOrFunctions ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
74 return constructRootTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructRootTerm().("Group", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_GROUPscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_GROUP., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(fieldOrFunctions), map[string]interface{}{
75 "multi": true,
76 })
77 }
78
79 // GroupByIndex takes a stream and partitions it into multiple groups based on the
80 // fields or functions provided. Commands chained after group will be
81 // called on each of these grouped sub-streams, producing grouped data.
82 func GroupByIndexscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/GroupByIndex().(index interface{}, fieldOrFunctions ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
83 return constructRootTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructRootTerm().("Group", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_GROUPscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_GROUP., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(fieldOrFunctions), map[string]interface{}{
84 "index": index,
85 })
86 }
87
88 // MultiGroupByIndex takes a stream and partitions it into multiple groups based on the
89 // fields or functions provided. Commands chained after group will be
90 // called on each of these grouped sub-streams, producing grouped data.
91 //
92 // Unlike Group single documents can be assigned to multiple groups, similar
93 // to the behavior of multi-indexes. When the grouping value is an array, documents
94 // will be placed in each group that corresponds to the elements of the array. If
95 // the array is empty the row will be ignored.
96 func MultiGroupByIndexscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MultiGroupByIndex().(index interface{}, fieldOrFunctions ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
97 return constructRootTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructRootTerm().("Group", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_GROUPscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_GROUP., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(fieldOrFunctions), map[string]interface{}{
98 "index": index,
99 "mutli": true,
100 })
101 }
102
103 // Group takes a stream and partitions it into multiple groups based on the
104 // fields or functions provided. Commands chained after group will be
105 // called on each of these grouped sub-streams, producing grouped data.
106 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) Groupscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Group().(fieldOrFunctions ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
107 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Group", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_GROUPscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_GROUP., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(fieldOrFunctions), map[string]interface{}{})
108 }
109
110 // MultiGroup takes a stream and partitions it into multiple groups based on the
111 // fields or functions provided. Commands chained after group will be
112 // called on each of these grouped sub-streams, producing grouped data.
113 //
114 // Unlike Group single documents can be assigned to multiple groups, similar
115 // to the behavior of multi-indexes. When the grouping value is an array, documents
116 // will be placed in each group that corresponds to the elements of the array. If
117 // the array is empty the row will be ignored.
118 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) MultiGroupscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#MultiGroup().(fieldOrFunctions ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
119 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Group", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_GROUPscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_GROUP., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(fieldOrFunctions), map[string]interface{}{
120 "multi": true,
121 })
122 }
123
124 // GroupByIndex takes a stream and partitions it into multiple groups based on the
125 // fields or functions provided. Commands chained after group will be
126 // called on each of these grouped sub-streams, producing grouped data.
127 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) GroupByIndexscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#GroupByIndex().(index interface{}, fieldOrFunctions ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
128 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Group", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_GROUPscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_GROUP., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(fieldOrFunctions), map[string]interface{}{
129 "index": index,
130 })
131 }
132
133 // MultiGroupByIndex takes a stream and partitions it into multiple groups based on the
134 // fields or functions provided. Commands chained after group will be
135 // called on each of these grouped sub-streams, producing grouped data.
136 //
137 // Unlike Group single documents can be assigned to multiple groups, similar
138 // to the behavior of multi-indexes. When the grouping value is an array, documents
139 // will be placed in each group that corresponds to the elements of the array. If
140 // the array is empty the row will be ignored.
141 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) MultiGroupByIndexscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#MultiGroupByIndex().(index interface{}, fieldOrFunctions ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
142 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Group", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_GROUPscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_GROUP., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(fieldOrFunctions), map[string]interface{}{
143 "index": index,
144 "mutli": true,
145 })
146 }
147
148 // Ungroup takes a grouped stream or grouped data and turns it into an array of
149 // objects representing the groups. Any commands chained after Ungroup will
150 // operate on this array, rather than operating on each group individually.
151 // This is useful if you want to e.g. order the groups by the value of their
152 // reduction.
153 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) Ungroupscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Ungroup().(args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
154 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Ungroup", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_UNGROUPscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_UNGROUP., args, map[string]interface{}{})
155 }
156
157 // Contains returns whether or not a sequence contains all the specified values,
158 // or if functions are provided instead, returns whether or not a sequence
159 // contains values matching all the specified functions.
160 func Containsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Contains().(args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
161 return constructRootTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructRootTerm().("Contains", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_CONTAINSscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_CONTAINS., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(args), map[string]interface{}{})
162 }
163
164 // Contains returns whether or not a sequence contains all the specified values,
165 // or if functions are provided instead, returns whether or not a sequence
166 // contains values matching all the specified functions.
167 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) Containsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Contains().(args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
168 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Contains", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_CONTAINSscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_CONTAINS., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(args), map[string]interface{}{})
169 }
170
171 // Aggregators
172 // These standard aggregator objects are to be used in conjunction with Group.
173
174 // Count the number of elements in the sequence. With a single argument,
175 // count the number of elements equal to it. If the argument is a function,
176 // it is equivalent to calling filter before count.
177 func Countscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Count().(args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
178 return constructRootTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructRootTerm().("Count", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_COUNTscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_COUNT., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(args), map[string]interface{}{})
179 }
180
181 // Count the number of elements in the sequence. With a single argument,
182 // count the number of elements equal to it. If the argument is a function,
183 // it is equivalent to calling filter before count.
184 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) Countscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Count().(args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
185 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Count", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_COUNTscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_COUNT., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(args), map[string]interface{}{})
186 }
187
188 // Sum returns the sum of all the elements of a sequence. If called with a field
189 // name, sums all the values of that field in the sequence, skipping elements of
190 // the sequence that lack that field. If called with a function, calls that
191 // function on every element of the sequence and sums the results, skipping
192 // elements of the sequence where that function returns null or a non-existence
193 // error.
194 func Sumscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Sum().(args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
195 return constructRootTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructRootTerm().("Sum", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_SUMscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_SUM., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(args), map[string]interface{}{})
196 }
197
198 // Sum returns the sum of all the elements of a sequence. If called with a field
199 // name, sums all the values of that field in the sequence, skipping elements of
200 // the sequence that lack that field. If called with a function, calls that
201 // function on every element of the sequence and sums the results, skipping
202 // elements of the sequence where that function returns null or a non-existence
203 // error.
204 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) Sumscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Sum().(args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
205 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Sum", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_SUMscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_SUM., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(args), map[string]interface{}{})
206 }
207
208 // Avg returns the average of all the elements of a sequence. If called with a field
209 // name, averages all the values of that field in the sequence, skipping elements of
210 // the sequence that lack that field. If called with a function, calls that function
211 // on every element of the sequence and averages the results, skipping elements of the
212 // sequence where that function returns null or a non-existence error.
213 func Avgscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Avg().(args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
214 return constructRootTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructRootTerm().("Avg", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_AVGscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_AVG., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(args), map[string]interface{}{})
215 }
216
217 // Avg returns the average of all the elements of a sequence. If called with a field
218 // name, averages all the values of that field in the sequence, skipping elements of
219 // the sequence that lack that field. If called with a function, calls that function
220 // on every element of the sequence and averages the results, skipping elements of the
221 // sequence where that function returns null or a non-existence error.
222 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) Avgscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Avg().(args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
223 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Avg", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_AVGscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_AVG., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(args), map[string]interface{}{})
224 }
225
226 // MinOpts contains the optional arguments for the Min term
227 type MinOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MinOpts# struct {
228 Indexscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MinOpts#Index. interface{} `rethinkdb:"index,omitempty"`
229 }
230
231 func (o MinOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MinOpts#) toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MinOpts#toMap().() map[string]interface{} {
232 return optArgsToMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/optArgsToMap().(o)
233 }
234
235 // Min finds the minimum of a sequence. If called with a field name, finds the element
236 // of that sequence with the smallest value in that field. If called with a function,
237 // calls that function on every element of the sequence and returns the element
238 // which produced the smallest value, ignoring any elements where the function
239 // returns null or produces a non-existence error.
240 func Minscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Min().(args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
241 return constructRootTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructRootTerm().("Min", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_MINscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_MIN., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(args), map[string]interface{}{})
242 }
243
244 // Min finds the minimum of a sequence. If called with a field name, finds the element
245 // of that sequence with the smallest value in that field. If called with a function,
246 // calls that function on every element of the sequence and returns the element
247 // which produced the smallest value, ignoring any elements where the function
248 // returns null or produces a non-existence error.
249 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) Minscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Min().(args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
250 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Min", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_MINscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_MIN., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(args), map[string]interface{}{})
251 }
252
253 // MinIndex finds the minimum of a sequence. If called with a field name, finds the element
254 // of that sequence with the smallest value in that field. If called with a function,
255 // calls that function on every element of the sequence and returns the element
256 // which produced the smallest value, ignoring any elements where the function
257 // returns null or produces a non-existence error.
258 func MinIndexscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MinIndex().(index interface{}, args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
259 return constructRootTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructRootTerm().("Min", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_MINscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_MIN., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(args), map[string]interface{}{
260 "index": index,
261 })
262 }
263
264 // MinIndex finds the minimum of a sequence. If called with a field name, finds the element
265 // of that sequence with the smallest value in that field. If called with a function,
266 // calls that function on every element of the sequence and returns the element
267 // which produced the smallest value, ignoring any elements where the function
268 // returns null or produces a non-existence error.
269 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) MinIndexscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#MinIndex().(index interface{}, args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
270 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Min", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_MINscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_MIN., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(args), map[string]interface{}{
271 "index": index,
272 })
273 }
274
275 // MaxOpts contains the optional arguments for the Max term
276 type MaxOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MaxOpts# struct {
277 Indexscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MaxOpts#Index. interface{} `rethinkdb:"index,omitempty"`
278 }
279
280 func (o MaxOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MaxOpts#) toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MaxOpts#toMap().() map[string]interface{} {
281 return optArgsToMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/optArgsToMap().(o)
282 }
283
284 // Max finds the maximum of a sequence. If called with a field name, finds the element
285 // of that sequence with the largest value in that field. If called with a function,
286 // calls that function on every element of the sequence and returns the element
287 // which produced the largest value, ignoring any elements where the function
288 // returns null or produces a non-existence error.
289 func Maxscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Max().(args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
290 return constructRootTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructRootTerm().("Max", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_MAXscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_MAX., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(args), map[string]interface{}{})
291 }
292
293 // Max finds the maximum of a sequence. If called with a field name, finds the element
294 // of that sequence with the largest value in that field. If called with a function,
295 // calls that function on every element of the sequence and returns the element
296 // which produced the largest value, ignoring any elements where the function
297 // returns null or produces a non-existence error.
298 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) Maxscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Max().(args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
299 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Max", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_MAXscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_MAX., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(args), map[string]interface{}{})
300 }
301
302 // MaxIndex finds the maximum of a sequence. If called with a field name, finds the element
303 // of that sequence with the largest value in that field. If called with a function,
304 // calls that function on every element of the sequence and returns the element
305 // which produced the largest value, ignoring any elements where the function
306 // returns null or produces a non-existence error.
307 func MaxIndexscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/MaxIndex().(index interface{}, args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
308 return constructRootTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructRootTerm().("Max", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_MAXscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_MAX., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(args), map[string]interface{}{
309 "index": index,
310 })
311 }
312
313 // MaxIndex finds the maximum of a sequence. If called with a field name, finds the element
314 // of that sequence with the largest value in that field. If called with a function,
315 // calls that function on every element of the sequence and returns the element
316 // which produced the largest value, ignoring any elements where the function
317 // returns null or produces a non-existence error.
318 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) MaxIndexscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#MaxIndex().(index interface{}, args ...interface{}) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
319 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Max", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_MAXscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_MAX., funcWrapArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrapArgs().(args), map[string]interface{}{
320 "index": index,
321 })
322 }
323
324 // FoldOpts contains the optional arguments for the Fold term
325 type FoldOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/FoldOpts# struct {
326 Emitscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/FoldOpts#Emit. interface{} `rethinkdb:"emit,omitempty"`
327 FinalEmitscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/FoldOpts#FinalEmit. interface{} `rethinkdb:"final_emit,omitempty"`
328 }
329
330 func (o FoldOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/FoldOpts#) toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/FoldOpts#toMap().() map[string]interface{} {
331 return optArgsToMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/optArgsToMap().(o)
332 }
333
334 // Fold applies a function to a sequence in order, maintaining state via an
335 // accumulator. The Fold command returns either a single value or a new sequence.
336 //
337 // In its first form, Fold operates like Reduce, returning a value by applying a
338 // combining function to each element in a sequence, passing the current element
339 // and the previous reduction result to the function. However, Fold has the
340 // following differences from Reduce:
341 // - it is guaranteed to proceed through the sequence from first element to last.
342 // - it passes an initial base value to the function with the first element in
343 // place of the previous reduction result.
344 //
345 // In its second form, Fold operates like ConcatMap, returning a new sequence
346 // rather than a single value. When an emit function is provided, Fold will:
347 // - proceed through the sequence in order and take an initial base value, as above.
348 // - for each element in the sequence, call both the combining function and a
349 // separate emitting function with the current element and previous reduction result.
350 // - optionally pass the result of the combining function to the emitting function.
351 //
352 // If provided, the emitting function must return a list.
353 func (t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) Foldscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#Fold().(base, fn interface{}, optArgs ...FoldOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/FoldOpts#) Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# {
354 opts := map[string]interface{}{}
355 if len(optArgs) >= 1 {
356 opts = optArgs[0].toMapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/FoldOpts#toMap().()
357 }
358
359 args := []interface{}{base, funcWrapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/funcWrap().(fn)}
360
361 return constructMethodTermscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/constructMethodTerm().(t, "Fold", pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_FOLDscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_FOLD., args, opts)
362 }