Rust mock-store is a simple Rust in-memory mock-store for testing and prototyping (with modql implementation).
Do not use this in production code.
mock-store uses modql for filtering capability. It's also a great way to experiment with modql.
Example | Library Scope | Limitations
See examples/readme.rs for the full working source.
```rs // -- Store is Send + Sync (backed by Arc/Mutex). let store = Store::new();
// -- Insert the objects. store.insert(Ticket { id: 1, title: "Ticket AAA".tostring(), })?; store.insert(Ticket { id: 1, title: "Ticket BBB".tostring(), })?;
// -- List all tickets (no filter).
let alltickets = store.list::
// -- List with filter (using modql: https://github.com/jeremychone/rust-modql)
let filter: FilterGroup = vec![("title", OpValString::Contains("AA".tostring())).into()].into();
let doubleatickets = store.list::
// -- Update with filter.
let filter: FilterGroup = vec![("title", OpValString::Contains("BB".tostring())).into()].into();
let count = store.update::
// -- List all tickets again.
let alltickets = store.list::
// -- Delete is: store.delete::
```