Skip to main content

Module mango

Module mango 

Source
Expand description

Query engine for RouchDB — Mango selectors and map/reduce views.

Provides two query mechanisms:

  1. Mango queries — CouchDB-compatible selector-based document matching with field projection, sorting, and pagination.

  2. Map/reduce views — Temporary (ad-hoc) views using Rust closures with built-in reduce functions (sum, count, stats) and custom reducers. Mango query engine — CouchDB-compatible selector-based document queries.

Supports the standard Mango operators: $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $exists, $regex, $elemMatch, $all, $size, $or, $and, $not, $nor, $mod, $type.

Structs§

BuiltIndex
A built in-memory index: sorted entries of (composite_key, doc_id).
CreateIndexResponse
Result of creating an index.
ExplainIndex
Description of the index used by a query.
ExplainResponse
Response from explain() describing how a query would be executed.
FindOptions
Options for a Mango find query.
FindResponse
Result of a find query.
IndexDefinition
Definition of a Mango index.
IndexFields
The fields portion of an index definition.
IndexInfo
Information about an existing index.

Enums§

SortDirection
SortField
A single sort field with direction.

Functions§

build_index
Build an index from all documents in an adapter.
find
Execute a Mango find query against an adapter.
matches_selector
Check if a document matches a Mango selector.