mongo

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidInput = errors.New("odata syntax error")

ErrInvalidInput Client errors

Functions

func ODataCount

func ODataCount(collection *mongo.Collection) (int64, error)

ODataCount runs a collection.Count() function based on $count odata parameter

func ODataQuery

func ODataQuery(connectionIDs []string, query url.Values, object interface{}, collection *mongo.Collection, countTotal bool) (int64, error)

ODataQuery creates a mongo query based on odata parameters nolint :gocyclo

Types

type Query

type Query struct {
	Filter bson.M
	Select bson.M
	Limit  int
	Skip   int
	Sort   bson.D
}

func GetODataQuery

func GetODataQuery(connectionIDs []string, query url.Values) (Query, error)

Jump to

Keyboard shortcuts

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