pub trait ViewAccessor<E: QueryEngine>: Send + Sync {
type View: View;
// Required methods
fn engine(&self) -> &E;
fn find_many(&self) -> ViewFindManyOperation<E, Self::View>;
fn find_first(&self) -> ViewFindFirstOperation<E, Self::View>;
fn count(&self) -> ViewCountOperation<E, Self::View>;
}Expand description
A view accessor that provides query operations for a specific view.
This is typically generated by the proc-macro for each view.
Required Associated Types§
Required Methods§
Sourcefn find_many(&self) -> ViewFindManyOperation<E, Self::View>
fn find_many(&self) -> ViewFindManyOperation<E, Self::View>
Start a find_many query.
Sourcefn find_first(&self) -> ViewFindFirstOperation<E, Self::View>
fn find_first(&self) -> ViewFindFirstOperation<E, Self::View>
Start a find_first query.
Sourcefn count(&self) -> ViewCountOperation<E, Self::View>
fn count(&self) -> ViewCountOperation<E, Self::View>
Count records in the view.