Documentation ¶
Index ¶
- func Limit(num int) func(bson.A) bson.A
- func Lookup(from string, localField string, foreignField string, as string) func(bson.A) bson.A
- func Match(fields Operation) func(bson.A) (a bson.A)
- func Pipe(pipeline bson.A, steps ...func(bson.A) bson.A) bson.A
- func Project(fields Operation) func(bson.A) bson.A
- func ReplaceRoot(fields Operation) func(bson.A) bson.A
- func Skip(num int) func(bson.A) bson.A
- func Sort(fields Operation) func(bson.A) bson.A
- func Unwind(fields Operation) func(bson.A) bson.A
- func UnwindSingle(field string) func(bson.A) bson.A
- type Operation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Pipe ¶
The Pipe functions similar to the RxJS pipe function (https://rxjs-dev.firebaseapp.com/api/index/function/pipe) in that it accepts a set of functions as parameters. Each function receives as its input, the output of the previous function. The allows you to chain together functions that have the same bson.A signature and create elaborate aggregate pipelines that get injected into the MongoDB driver. The Pipe function accepts an initial state as its first parameter.
func ReplaceRoot ¶
The Project function builds the $project operator into a pipeline
Types ¶
Click to show internal directories.
Click to hide internal directories.