mongo

package
v4.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package mongo helps to create mongo BSON filters using the TSL package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Walk

func Walk(n tsl.Node) (b bson.D, err error)

Walk travel the TSL tree to create mongo-go-driver bson select operators.

Users can call the Walk method to filter a mongo Find.

// Prepare filter
filter, _ := mongo.Walk(tree)

// Run query
cur, _ := collection.Find(ctx, filter)

mongo-go-driver: https://go.mongodb.org/mongo-driver

Types

This section is empty.

Jump to

Keyboard shortcuts

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