Documentation ¶
Overview ¶
Package builder help us to write aggregate,filter,update maps simpler.
Index ¶
- func S(operators ...Operator) bson.M
- type BaseOperator
- type Operator
- func Bucket(groupBy, boundaries, def, output interface{}) Operator
- func BucketAuto(groupBy, buckets, output, granularity interface{}) Operator
- func CollStats(latencyStats, storageStats, count interface{}) Operator
- func CurrentOp(allUsers, idleConnections, idleCursors, idleSessions, localOps interface{}) Operator
- func Group(ID interface{}, params bson.M) Operator
- func Lookup(from, localField, foreignField, as interface{}) Operator
- func Merge(into, on, let, whenMatched, whenNotMatched interface{}) Operator
- func New(key string, val interface{}) Operator
- func ReplaceRoot(newRoot interface{}) Operator
- func Sample(size interface{}) Operator
- func UncorrelatedLookup(from, let, pipeline, as interface{}) Operator
- func Unwind(path, includeArrayIndex, preserveNullAndEmptyArrays interface{}) Operator
- type SMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseOperator ¶
type BaseOperator struct {
// contains filtered or unexported fields
}
BaseOperator is simple base operator that implemented Operator.
func (*BaseOperator) GetKey ¶
func (operator *BaseOperator) GetKey() string
GetKey function return operator's key.
func (*BaseOperator) GetVal ¶
func (operator *BaseOperator) GetVal() interface{}
GetVal method return operator's value.
type Operator ¶
type Operator interface { GetKey() string GetVal() interface{} }
Operator is interface that should implement by each struct that want to be an operator.
func Bucket ¶
func Bucket(groupBy, boundaries, def, output interface{}) Operator
Bucket function return mongo $bucket operator to using in aggregates.
func BucketAuto ¶
func BucketAuto(groupBy, buckets, output, granularity interface{}) Operator
BucketAuto function return mongo $bucketAuto operator to using in aggregates.
func CollStats ¶
func CollStats(latencyStats, storageStats, count interface{}) Operator
CollStats function return mongo $collStats operator to using in aggregates.
func CurrentOp ¶
func CurrentOp(allUsers, idleConnections, idleCursors, idleSessions, localOps interface{}) Operator
CurrentOp function return mongo $currentOp operator to using in aggregates.
func Lookup ¶
func Lookup(from, localField, foreignField, as interface{}) Operator
Lookup function return mongo $lookup operator to using in aggregates.
func Merge ¶
func Merge(into, on, let, whenMatched, whenNotMatched interface{}) Operator
Merge function return mongo $merge operator to using in aggregates.
func ReplaceRoot ¶
func ReplaceRoot(newRoot interface{}) Operator
ReplaceRoot function return mongo $replaceRoot operator to using in aggregates.
func Sample ¶
func Sample(size interface{}) Operator
Sample function return mongo sample operator to using in aggregates.
func UncorrelatedLookup ¶
func UncorrelatedLookup(from, let, pipeline, as interface{}) Operator
UncorrelatedLookup function return mongo $lookup operator to using in aggregates.