plabayo / venndb

in memory Rust database to query your data like a Venn diagram
https://venndb.rs
Apache License 2.0
91 stars 1 forks source link

support `any` filter #3

Closed GlenDC closed 6 months ago

GlenDC commented 6 months ago

Consider:

#[derive(Debug, VennDB)]
pub struct Employee {
    #[venndb(filter, any)]
   pub country: Option<String>,
}

We need to find a way to generate code such that one can say:

let db = EmployeeDB::from_iter(/* ... */);
let mut query = db.query();
query.country("US".into());

// get all employees which are in US or have the "Any" country defined...
// whatever that means
let employees = query.exec()...