@@ -151,6 +151,15 @@ func (t Term) IsEmpty(args ...interface{}) Term {
151151 return constructMethodTerm (t , "IsEmpty" , p .Term_IS_EMPTY , args , map [string ]interface {}{})
152152}
153153
154+ // UnionOpts contains the optional arguments for the Slice term
155+ type UnionOpts struct {
156+ Interleave interface {} `gorethink:"interleave,omitempty"`
157+ }
158+
159+ func (o * UnionOpts ) toMap () map [string ]interface {} {
160+ return optArgsToMap (o )
161+ }
162+
154163// Union concatenates two sequences.
155164func Union (args ... interface {}) Term {
156165 return constructRootTerm ("Union" , p .Term_UNION , args , map [string ]interface {}{})
@@ -161,6 +170,18 @@ func (t Term) Union(args ...interface{}) Term {
161170 return constructMethodTerm (t , "Union" , p .Term_UNION , args , map [string ]interface {}{})
162171}
163172
173+ // UnionWithOpts like Union concatenates two sequences however allows for optional
174+ // arguments to be passed.
175+ func UnionWithOpts (optArgs UnionOpts , args ... interface {}) Term {
176+ return constructRootTerm ("Union" , p .Term_UNION , args , optArgs .toMap ())
177+ }
178+
179+ // UnionWithOpts like Union concatenates two sequences however allows for optional
180+ // arguments to be passed.
181+ func (t Term ) UnionWithOpts (optArgs UnionOpts , args ... interface {}) Term {
182+ return constructMethodTerm (t , "Union" , p .Term_UNION , args , optArgs .toMap ())
183+ }
184+
164185// Sample selects a given number of elements from a sequence with uniform random
165186// distribution. Selection is done without replacement.
166187func (t Term ) Sample (args ... interface {}) Term {
0 commit comments