pub struct Transaction { /* private fields */ }Implementations§
Source§impl Transaction
impl Transaction
pub async fn begin(conn: Connection) -> Result<Self, PgError>
pub async fn commit(self) -> Result<(), PgError>
pub async fn rollback(self) -> Result<(), PgError>
pub async fn query_raw( &self, sql: &str, params: &[&dyn ToSql], ) -> Result<Vec<Row>, PgError>
pub async fn execute_raw( &self, sql: &str, params: &[&dyn ToSql], ) -> Result<u64, PgError>
Trait Implementations§
Source§impl Drop for Transaction
impl Drop for Transaction
Source§impl Queryer for Transaction
impl Queryer for Transaction
async fn query_raw( &self, sql: &str, params: &[&dyn ToSql], ) -> Result<Vec<Row>, PgError>
async fn execute_raw( &self, sql: &str, params: &[&dyn ToSql], ) -> Result<u64, PgError>
async fn query<T: FromSql>( &self, sql: &str, params: &[&dyn ToSql], ) -> Result<Vec<Vec<T>>, PgError>
async fn query_as<T: FromRow>( &self, sql: &str, params: &[&dyn ToSql], ) -> Result<Vec<T>, PgError>
async fn query_one_as<T: FromRow>( &self, sql: &str, params: &[&dyn ToSql], ) -> Result<T, PgError>
async fn query_first_as<T: FromRow>( &self, sql: &str, params: &[&dyn ToSql], ) -> Result<Option<T>, PgError>
async fn query_first<T: FromSql>( &self, sql: &str, params: &[&dyn ToSql], ) -> Result<Option<T>, PgError>
Auto Trait Implementations§
impl !RefUnwindSafe for Transaction
impl !UnwindSafe for Transaction
impl Freeze for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnsafeUnpin for Transaction
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