pub struct Postgres { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Executor for Postgres
impl Executor for Postgres
type T = Postgres
async fn new(url: &str) -> Selfwhere
Self: Sized,
fn db<'q>(&'q self) -> &'q Pool<Self::T>
fn to_sql<'q>(&self, statement: &'q Statement<'q, Self::T>) -> Result<String>
async fn execute<'q>(&self, sql: &'q str) -> Result<()>
async fn insert<'q>(&self, statement: &'q Statement<'q, Self::T>) -> Result<()>
async fn insert_as<'q, O>( &self, statement: &'q Statement<'q, Self::T>, ) -> Result<O>
async fn update<'q>(&self, statement: &'q Statement<'q, Self::T>) -> Result<()>
async fn count<'q>(&self, statement: &'q Statement<'q, Self::T>) -> Result<u64>
async fn delete<'q>(&self, statement: &'q Statement<'q, Self::T>) -> Result<()>
async fn query_all<'q, O, T: 'q + Encode<'q, Self::T> + Type<Self::T>>( &self, sql: &str, args: Vec<T>, ) -> Result<Vec<O>>
async fn query_one<'q, O, T: 'q + Encode<'q, Self::T> + Type<Self::T>>( &self, sql: &str, args: Vec<T>, ) -> Result<O>
async fn all<'q, O>( &self, statement: &'q Statement<'q, Self::T>, ) -> Result<Vec<O>>
async fn first<'q, O>(&self, statement: &'q Statement<'q, Self::T>) -> Result<O>
async fn paginate<'q, O>( &self, statement: &'q Statement<'q, Self::T>, ) -> Result<Pagination<O>>
Auto Trait Implementations§
impl Freeze for Postgres
impl !RefUnwindSafe for Postgres
impl Send for Postgres
impl Sync for Postgres
impl Unpin for Postgres
impl UnsafeUnpin for Postgres
impl !UnwindSafe for Postgres
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more