Struct atuin_server::database::Postgres
source · [−]pub struct Postgres { /* private fields */ }
Implementations
Trait Implementations
sourceimpl Database for Postgres
impl Database for Postgres
fn get_session<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Session>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_user<'life0, 'life1, 'async_trait>(
&'life0 self,
username: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<User>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_session_user<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<User>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn count_history<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 User
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn count_history_cached<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 User
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn count_history_range<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 User,
start: NaiveDateTime,
end: NaiveDateTime
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn count_history_year<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 User,
year: i32
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn count_history_month<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 User,
month: NaiveDate
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn count_history_day<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 User,
day: NaiveDate
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn list_history<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 User,
created_after: NaiveDateTime,
since: NaiveDateTime,
host: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<Vec<History>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn add_history<'life0, 'life1, 'async_trait>(
&'life0 self,
history: &'life1 [NewHistory]
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn add_user<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 NewUser
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn add_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 NewSession
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_user_session<'life0, 'life1, 'async_trait>(
&'life0 self,
u: &'life1 User
) -> Pin<Box<dyn Future<Output = Result<Session>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn oldest_history<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 User
) -> Pin<Box<dyn Future<Output = Result<History>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn calendar<'life0, 'life1, 'async_trait>(
&'life0 self,
user: &'life1 User,
period: TimePeriod,
year: u64,
month: u64
) -> Pin<Box<dyn Future<Output = Result<HashMap<u64, TimePeriodInfo>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations
impl !RefUnwindSafe for Postgres
impl Send for Postgres
impl Sync for Postgres
impl Unpin for Postgres
impl !UnwindSafe for Postgres
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more