Skip to main content

query_view

Function query_view 

Source
pub async fn query_view(
    adapter: &dyn Adapter,
    map_fn: &dyn Fn(&Value) -> Vec<(Value, Value)>,
    reduce_fn: Option<&ReduceFn>,
    opts: ViewQueryOptions,
) -> Result<ViewResult>
Expand description

Run a temporary (ad-hoc) map/reduce query.

The map_fn receives a document JSON and returns emitted key-value pairs.