Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 472 Bytes

README.md

File metadata and controls

21 lines (17 loc) · 472 Bytes

mongoquery-rs

An incomplete Rust port of Python's mongoquery library.


Example

use mongoquery::{BaseQuerier, Querier};
use serde_json::{Value, json};

let object = json!({
    "item": "journal",
    "qty": 25,
    "size": { "h": 14, "w": 21, "uom": "cm" },
    "status": "A"
});
let querier = BaseQuerier::new(&json!({ "item": "journal"}));

assert!(querier.evaluate(Some(&object)).unwrap());