atuin_client::databaseTrait Database
Source pub trait Database:
Send
+ Sync
+ 'static {
Show 16 methods
// Required methods
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
h: &'life1 History,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn save_bulk<'life0, 'life1, 'async_trait>(
&'life0 self,
h: &'life1 [History],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<History>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
filters: &'life1 [FilterMode],
context: &'life2 Context,
max: Option<usize>,
unique: bool,
include_deleted: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<History>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn range<'life0, 'async_trait>(
&'life0 self,
from: OffsetDateTime,
to: OffsetDateTime,
) -> Pin<Box<dyn Future<Output = Result<Vec<History>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
h: &'life1 History,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn history_count<'life0, 'async_trait>(
&'life0 self,
include_deleted: bool,
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn last<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<History>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn before<'life0, 'async_trait>(
&'life0 self,
timestamp: OffsetDateTime,
count: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<History>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete<'life0, 'async_trait>(
&'life0 self,
h: History,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_rows<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [HistoryId],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn deleted<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<History>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
search_mode: SearchMode,
filter: FilterMode,
context: &'life1 Context,
query: &'life2 str,
filter_options: OptFilters,
) -> Pin<Box<dyn Future<Output = Result<Vec<History>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn query_history<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<History>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn all_with_count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(History, i32)>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stats<'life0, 'life1, 'async_trait>(
&'life0 self,
h: &'life1 History,
) -> Pin<Box<dyn Future<Output = Result<HistoryStats>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}