Struct chuchi_postgres::table::table::TableWithConn
source · pub struct TableWithConn<'a> { /* private fields */ }
Implementations§
source§impl TableWithConn<'_>
impl TableWithConn<'_>
pub async fn select<R>(
&self,
filter: impl Borrow<Filter<'_>>,
) -> Result<Vec<R>, Error>where
R: FromRowOwned + NamedColumns,
pub async fn select_one<R>(
&self,
filter: impl Borrow<Filter<'_>>,
) -> Result<R, Error>where
R: FromRowOwned + NamedColumns,
pub async fn select_opt<R>(
&self,
filter: impl Borrow<Filter<'_>>,
) -> Result<Option<R>, Error>where
R: FromRowOwned + NamedColumns,
pub async fn count( &self, column: &str, filter: impl Borrow<Filter<'_>>, ) -> Result<u32, Error>
pub async fn insert<U>(&self, item: &U) -> Result<(), Error>where
U: ToRow,
pub async fn insert_many<U, I>(&self, items: I) -> Result<(), Error>
pub async fn update<U>(
&self,
item: &U,
filter: impl Borrow<WhereFilter<'_>>,
) -> Result<(), Error>where
U: ToRow,
pub async fn delete( &self, filter: impl Borrow<WhereFilter<'_>>, ) -> Result<(), Error>
pub fn conn(&self) -> &Connection<'_>
Trait Implementations§
source§impl<'a> Clone for TableWithConn<'a>
impl<'a> Clone for TableWithConn<'a>
source§fn clone(&self) -> TableWithConn<'a>
fn clone(&self) -> TableWithConn<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> Freeze for TableWithConn<'a>
impl<'a> !RefUnwindSafe for TableWithConn<'a>
impl<'a> Send for TableWithConn<'a>
impl<'a> Sync for TableWithConn<'a>
impl<'a> Unpin for TableWithConn<'a>
impl<'a> !UnwindSafe for TableWithConn<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)