query

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

package query implements data structures and helper functions for distributed query subsystem.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidQuery = errors.New("invalid query")

ErrInvalidQuery denotes a given query is empty or badly formatted.

Functions

func Validate

func Validate(q M) error

Validate validates a query.

Types

type M

type M map[string]interface{}

M is an unordered representation of a query. This type should be used when the order of the elements does not matter. This type is handled as a regular map[string]interface{} when encoding and decoding. Elements will be serialized in an undefined, random order. (extracted from https://godoc.org/go.mongodb.org/mongo-driver/bson#M)

func FromByte

func FromByte(data []byte) (M, error)

FromByte generates a query from a byte slice.

Jump to

Keyboard shortcuts

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