Struct bonsaidb_core::connection::View
source · [−]pub struct View<'a, Cn, V: SerializedView> {
pub key: Option<QueryKey<V::Key>>,
pub access_policy: AccessPolicy,
pub sort: Sort,
pub limit: Option<usize>,
/* private fields */
}Expand description
Parameters to query a schema::View.
Fields
key: Option<QueryKey<V::Key>>Key filtering criteria.
access_policy: AccessPolicyThe view’s data access policy. The default value is AccessPolicy::UpdateBefore.
sort: SortThe sort order of the query.
limit: Option<usize>The maximum number of results to return.
Implementations
Filters for entries in the view with keys.
Filters for entries in the view with the range keys.
Sets the access policy for queries.
Queries the view in descending order.
Sets the maximum number of results to return.
Executes the query and retrieves the results.
Executes the query and retrieves the results with the associated Documents.
pub async fn query_with_collection_docs(
self
) -> Result<MappedDocuments<CollectionDocument<V::Collection>, V>, Error> where
V::Collection: SerializedCollection,
<V::Collection as SerializedCollection>::Contents: Debug,
pub async fn query_with_collection_docs(
self
) -> Result<MappedDocuments<CollectionDocument<V::Collection>, V>, Error> where
V::Collection: SerializedCollection,
<V::Collection as SerializedCollection>::Contents: Debug,
Executes the query and retrieves the results with the associated CollectionDocuments.
Executes a reduce over the results of the query
Executes a reduce over the results of the query
Deletes all of the associated documents that match this view query.
Auto Trait Implementations
impl<'a, Cn, V> RefUnwindSafe for View<'a, Cn, V> where
Cn: RefUnwindSafe,
<V as View>::Key: RefUnwindSafe,
impl<'a, Cn, V> UnwindSafe for View<'a, Cn, V> where
Cn: RefUnwindSafe,
<V as View>::Key: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more