Struct pliantdb::local::core::connection::View[][src]

pub struct View<'a, Cn, V> where
    V: View
{ pub key: Option<QueryKey<<V as View>::Key>>, pub access_policy: AccessPolicy, // some fields omitted }

Parameters to query a schema::View.

Fields

key: Option<QueryKey<<V as View>::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]

#[must_use]pub fn with_key(self, key: <V as View>::Key) -> View<'a, Cn, V>[src]

Filters for entries in the view with key.

#[must_use]pub fn with_keys(self, keys: Vec<<V as View>::Key, Global>) -> View<'a, Cn, V>[src]

Filters for entries in the view with keys.

#[must_use]pub fn with_key_range(self, range: Range<<V as View>::Key>) -> View<'a, Cn, V>[src]

Filters for entries in the view with the range keys.

pub fn with_access_policy(self, policy: AccessPolicy) -> View<'a, Cn, V>[src]

Sets the access policy for queries.

pub async fn query(
    self
) -> Result<Vec<Map<<V as View>::Key, <V as View>::Value>, Global>, Error>
[src]

Executes the query and retrieves the results.

pub async fn query_with_docs(
    self
) -> Result<Vec<MappedDocument<<V as View>::Key, <V as View>::Value>, Global>, Error>
[src]

Executes the query and retrieves the results with the associated Documents.

pub async fn reduce(self) -> Result<<V as View>::Value, Error>[src]

Executes a reduce over the results of the query

pub async fn reduce_grouped(
    self
) -> Result<Vec<MappedValue<<V as View>::Key, <V as View>::Value>, Global>, Error>
[src]

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

impl<'a, Cn, V> Send for View<'a, Cn, V> where
    Cn: Sync

impl<'a, Cn, V> Sync for View<'a, Cn, V> where
    Cn: Sync

impl<'a, Cn, V> Unpin for View<'a, Cn, V> where
    <V as View>::Key: Unpin

impl<'a, Cn, V> UnwindSafe for View<'a, Cn, V> where
    Cn: RefUnwindSafe,
    <V as View>::Key: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,