Dushistov / couchbase-lite-rust

Lightweight, embedded, syncable NoSQL database engine wrapper for Rust
Apache License 2.0
22 stars 10 forks source link

Query deserializer feature #69

Open Dushistov opened 2 years ago

Dushistov commented 2 years ago

It would be nice to have optional functionality to decode query as whole, example:

while let Some(item) = query_iter.next()? {
    let (p1, p2, ...): (T1, T2, ...) = deserialize_with_serde(item)?;
}
#[derive(Deserialize)]
struct QueryResult {
   f1: T1,
   f2: T2,
...
}
while let Some(item) = query_iter.next()? {
    let res: QueryResult = deserialize_with_serde(item)?;
}
Dushistov commented 2 years ago

Initial implementation can be found here: #66 . What missed: