Struct pliantdb_core::connection::View [−][src]
Parameters to query a schema::View
.
Fields
key: Option<QueryKey<V::Key>>
Key filtering criteria.
access_policy: AccessPolicy
The view’s data access policy. The default value is AccessPolicy::UpdateBefore
.
Implementations
impl<'a, Cn, V> View<'a, Cn, V> where
V: View,
Cn: Connection,
[src]
V: View,
Cn: Connection,
#[must_use]pub fn with_key(self, key: V::Key) -> Self
[src]
Filters for entries in the view with key
.
#[must_use]pub fn with_keys(self, keys: Vec<V::Key>) -> Self
[src]
Filters for entries in the view with keys
.
#[must_use]pub fn with_key_range(self, range: Range<V::Key>) -> Self
[src]
Filters for entries in the view with the range keys
.
pub fn with_access_policy(self, policy: AccessPolicy) -> Self
[src]
Sets the access policy for queries.
pub async fn query(self) -> Result<Vec<Map<V::Key, V::Value>>, Error>
[src]
Executes the query and retrieves the results.
pub async fn query_with_docs(
self
) -> Result<Vec<MappedDocument<V::Key, V::Value>>, Error>
[src]
self
) -> Result<Vec<MappedDocument<V::Key, V::Value>>, Error>
Executes the query and retrieves the results with the associated Document
s.
pub async fn reduce(self) -> Result<V::Value, Error>
[src]
Executes a reduce over the results of the query
pub async fn reduce_grouped(
self
) -> Result<Vec<MappedValue<V::Key, V::Value>>, Error>
[src]
self
) -> Result<Vec<MappedValue<V::Key, V::Value>>, Error>
Executes a reduce over the results of the query
Auto Trait Implementations
impl<'a, Cn, V> RefUnwindSafe for View<'a, Cn, V> where
Cn: RefUnwindSafe,
<V as View>::Key: RefUnwindSafe,
Cn: RefUnwindSafe,
<V as View>::Key: RefUnwindSafe,
impl<'a, Cn, V> Send for View<'a, Cn, V> where
Cn: Sync,
Cn: Sync,
impl<'a, Cn, V> Sync for View<'a, Cn, V> where
Cn: Sync,
Cn: Sync,
impl<'a, Cn, V> Unpin for View<'a, Cn, V> where
<V as View>::Key: Unpin,
<V as View>::Key: Unpin,
impl<'a, Cn, V> UnwindSafe for View<'a, Cn, V> where
Cn: RefUnwindSafe,
<V as View>::Key: UnwindSafe,
Cn: RefUnwindSafe,
<V as View>::Key: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,