mongoq

package module
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 10 Imported by: 0

README

Go Report Card

mongoq

This is a simple library for converting query strings to mongo queries using Go's AST parser.

Installation

Checkout the repository and run:

go get github.com/qwerty-iot/mongoq

Usage

import "github.com/qwerty-iot/mongoq"

query, _ := mongoq.ParseQuery("name == Andrew && age >= 5")

fmt.Println("%v\n", query)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OnErrorCallback func(originalExpression string, err error)

Functions

func ParseQuery

func ParseQuery(expr string) (bson.M, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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