For some workloads, it might be better to allow a view to always be mapped rather than the default lazy evaluation. Unique views already follow this process, but there's no reason this couldn't be extended to any arbitrary view.
Add a provided function to ViewSchema:
fn lazy(&self) -> bool {
true
}
Change the logic where documents are saved to not only look for unique views, but also any views that are lazy. This will require changing/adding APIs/data structures in Schematic to support this.
Add a new view that can be tested with queries that always have AccessPolicy::NoUpdate to ensure the values are always updated.
For some workloads, it might be better to allow a view to always be mapped rather than the default lazy evaluation. Unique views already follow this process, but there's no reason this couldn't be extended to any arbitrary view.
Add a provided function to
ViewSchema
:AccessPolicy::NoUpdate
to ensure the values are always updated.