Trait aries_askar::QueryBackend[][src]

pub trait QueryBackend: Send {
    fn count<'q>(
        &'q mut self,
        kind: EntryKind,
        category: &'q str,
        tag_filter: Option<TagFilter>
    ) -> BoxFuture<'q, Result<i64, Error>>;
fn fetch<'q>(
        &'q mut self,
        kind: EntryKind,
        category: &'q str,
        name: &'q str,
        for_update: bool
    ) -> BoxFuture<'q, Result<Option<Entry>, Error>>;
fn fetch_all<'q>(
        &'q mut self,
        kind: EntryKind,
        category: &'q str,
        tag_filter: Option<TagFilter>,
        limit: Option<i64>,
        for_update: bool
    ) -> BoxFuture<'q, Result<Vec<Entry>, Error>>;
fn remove_all<'q>(
        &'q mut self,
        kind: EntryKind,
        category: &'q str,
        tag_filter: Option<TagFilter>
    ) -> BoxFuture<'q, Result<i64, Error>>;
fn update<'q>(
        &'q mut self,
        kind: EntryKind,
        operation: EntryOperation,
        category: &'q str,
        name: &'q str,
        value: Option<&'q [u8]>,
        tags: Option<&'q [EntryTag]>,
        expiry_ms: Option<i64>
    ) -> BoxFuture<'q, Result<(), Error>>;
fn close(self, commit: bool) -> BoxFuture<'static, Result<(), Error>>; }

Query from a generic backend implementation

Required methods

fn count<'q>(
    &'q mut self,
    kind: EntryKind,
    category: &'q str,
    tag_filter: Option<TagFilter>
) -> BoxFuture<'q, Result<i64, Error>>
[src]

Count the number of matching records in the store

fn fetch<'q>(
    &'q mut self,
    kind: EntryKind,
    category: &'q str,
    name: &'q str,
    for_update: bool
) -> BoxFuture<'q, Result<Option<Entry>, Error>>
[src]

Fetch a single record from the store by category and name

fn fetch_all<'q>(
    &'q mut self,
    kind: EntryKind,
    category: &'q str,
    tag_filter: Option<TagFilter>,
    limit: Option<i64>,
    for_update: bool
) -> BoxFuture<'q, Result<Vec<Entry>, Error>>
[src]

Fetch all matching records from the store

fn remove_all<'q>(
    &'q mut self,
    kind: EntryKind,
    category: &'q str,
    tag_filter: Option<TagFilter>
) -> BoxFuture<'q, Result<i64, Error>>
[src]

Remove all matching records from the store

fn update<'q>(
    &'q mut self,
    kind: EntryKind,
    operation: EntryOperation,
    category: &'q str,
    name: &'q str,
    value: Option<&'q [u8]>,
    tags: Option<&'q [EntryTag]>,
    expiry_ms: Option<i64>
) -> BoxFuture<'q, Result<(), Error>>
[src]

Insert or replace a record in the store

fn close(self, commit: bool) -> BoxFuture<'static, Result<(), Error>>[src]

Close the current store session

Loading content...

Implementors

impl QueryBackend for AnyQueryBackend[src]

This is supported on crate feature any only.
Loading content...