bonsaidb icon indicating copy to clipboard operation
bonsaidb copied to clipboard

Support retrieivng mapped/projected data from a document

Open ecton opened this issue 3 years ago • 1 comments

We should offer a way to return data that is a query within the documents.

My current thoughts on this is to adopt an approach similar to GraphQL. A simple "Queryable" trait that allows a collection to respond to individual field queries, and a "Mutable" trait that allows mutation operations to be written.

When designing the traits, we should consider how a proc-macro could be used to generate the traits automatically by annotating a type with the extra information needed.

ecton avatar Feb 11 '22 13:02 ecton

As per Discord, a proc-macro that allowed mapping/projecting data would also be able to provide basic View code generation.

ecton avatar Mar 24 '22 19:03 ecton