New Features:
- [
#15
]: support multi dimensional filter options to be filtered in group
Example:
use venndb::{Any, VennDB};
#[derive(Debug, VennDB)]
pub struct Value {
#[venndb(filter)]
pub foo: String,
pub bar: u32,
}
let db = ValueDB::from_iter([
Value {
foo: "a".to_owned(),
bar: 8,
},
Value {
foo: "b".to_owned(),
bar: 12,
},
Value {
foo: "c".to_owned(),
bar: 16,
},
].into_Iter()).unwrap();
let mut query = db.query();
query.foo(MyString("a".to_owned()));
query.foo(MyString("c".to_owned()));
let values: Vec<_> = query.execute().unwrap().iter().collect();
assert_eq!(values.len(), 2);
assert_eq!(values[0].bar, 8);
assert_eq!(values[0].bar, 16);