pipe

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Group

func Group(items ...bson.E) bson.D

Group 分组

func Lookup

func Lookup(field LookupField) bson.D

Lookup 查询

func Match

func Match(items ...bson.E) bson.D

func Project

func Project(items ...bson.E) bson.D

Project 选择

func Sort

func Sort(items ...bson.E) bson.D

Sort 排序

func Unwind

func Unwind(field UnwindField) bson.D

Unwind 查询

Types

type LookupField

type LookupField struct {
	From         string `bson:"from"`
	LocalField   string `bson:"localField"`
	ForeignField string `bson:"foreignField"`
	As           string `bson:"as"`
}

type Matcher

type Matcher struct {
	// contains filtered or unexported fields
}

func BuildMatcher

func BuildMatcher() *Matcher

func (*Matcher) Build

func (m *Matcher) Build() bson.D

func (*Matcher) IF

func (m *Matcher) IF(condition bool, e bson.E) *Matcher

func (*Matcher) Match

func (m *Matcher) Match(e bson.E) *Matcher

type UnwindField

type UnwindField struct {
	Path                       string `json:"path"`
	IncludeArrayIndex          string `json:"includeArrayIndex"`
	PreserveNullAndEmptyArrays bool   `json:"preserveNullAndEmptyArrays"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL