couchbase-lite-rust icon indicating copy to clipboard operation
couchbase-lite-rust copied to clipboard

Query deserializer feature

Open Dushistov opened this issue 2 years ago • 1 comments

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 avatar Feb 25 '22 09:02 Dushistov

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

  • tests
  • feature to make it optional
  • replace bunch of todo! with help of usage of serde-fleece

Dushistov avatar Feb 25 '22 09:02 Dushistov