Trait TransactionOps

Source
pub trait TransactionOps {
Show 14 methods // Required methods fn tx_insert<'life0, 'async_trait, T, P>( &'life0 self, entity: T, ) -> Pin<Box<dyn Future<Output = Result<P, Error>> + Send + 'async_trait>> where T: SqlCommand + SqlParams + Debug + Send + 'static + 'async_trait, P: for<'a> FromSql<'a> + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait; fn tx_update<'life0, 'async_trait, T>( &'life0 self, entity: T, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>> where T: SqlCommand + UpdateParams + SqlParams + Debug + Send + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait; fn tx_delete<'life0, 'async_trait, T>( &'life0 self, entity: T, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>> where T: SqlCommand + SqlParams + Debug + Send + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait; fn tx_fetch<'life0, 'life1, 'async_trait, P, R>( &'life0 self, params: &'life1 P, ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>> where P: SqlQuery<R> + SqlParams + Debug + Send + Sync + Clone + 'static + 'async_trait, R: FromRow + Debug + Send + Sync + Clone + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn tx_fetch_all<'life0, 'life1, 'async_trait, P, R>( &'life0 self, params: &'life1 P, ) -> Pin<Box<dyn Future<Output = Result<Vec<R>, Error>> + Send + 'async_trait>> where P: SqlQuery<R> + SqlParams + Debug + Send + Sync + Clone + 'static + 'async_trait, R: FromRow + Debug + Send + Sync + Clone + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn tx_select<'life0, 'async_trait, T, F, R>( &'life0 self, entity: T, to_model: F, ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>> where T: SqlQuery<T> + SqlParams + Debug + Send + 'static + 'async_trait, F: Fn(&Row) -> Result<R, Error> + Send + Sync + 'static + 'async_trait, R: Send + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait; fn tx_select_all<'life0, 'async_trait, T, F, R>( &'life0 self, entity: T, to_model: F, ) -> Pin<Box<dyn Future<Output = Result<Vec<R>, Error>> + Send + 'async_trait>> where T: SqlQuery<T> + SqlParams + Debug + Send + 'static + 'async_trait, F: Fn(&Row) -> R + Send + Sync + 'static + 'async_trait, R: Send + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait; fn insert<'life0, 'async_trait, T>( &'life0 self, entity: T, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>> where T: SqlCommand + SqlParams + Debug + Send + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait; fn update<'life0, 'async_trait, T>( &'life0 self, entity: T, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>> where T: SqlCommand + UpdateParams + SqlParams + Debug + Send + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait; fn delete<'life0, 'async_trait, T>( &'life0 self, entity: T, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>> where T: SqlCommand + SqlParams + Debug + Send + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait; fn get<'life0, 'life1, 'async_trait, T>( &'life0 self, params: &'life1 T, ) -> Pin<Box<dyn Future<Output = Result<T, Error>> + Send + 'async_trait>> where T: SqlQuery<T> + FromRow + SqlParams + Debug + Send + Sync + Clone + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_all<'life0, 'life1, 'async_trait, T>( &'life0 self, params: &'life1 T, ) -> Pin<Box<dyn Future<Output = Result<Vec<T>, Error>> + Send + 'async_trait>> where T: SqlQuery<T> + FromRow + SqlParams + Debug + Send + Sync + Clone + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn select<'life0, 'async_trait, T, R, F>( &'life0 self, entity: T, to_model: F, ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>> where T: SqlQuery<T> + SqlParams + Debug + Send + 'static + 'async_trait, F: for<'a> Fn(&'a Row) -> Result<R, Error> + Send + Sync + 'static + 'async_trait, R: Send + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait; fn select_all<'life0, 'async_trait, T, R, F>( &'life0 self, entity: T, to_model: F, ) -> Pin<Box<dyn Future<Output = Result<Vec<R>, Error>> + Send + 'async_trait>> where T: SqlQuery<T> + SqlParams + Debug + Send + 'static + 'async_trait, F: Fn(&Row) -> R + Send + Sync + 'static + 'async_trait, R: Send + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait;
}
Expand description

TransactionOps trait, Transaction için CRUD işlemlerini extension method olarak sağlar Bu şekilde, herhangi bir Transaction nesnesi üzerinde doğrudan CRUD işlemleri yapılabilir

Required Methods§

Source

fn tx_insert<'life0, 'async_trait, T, P>( &'life0 self, entity: T, ) -> Pin<Box<dyn Future<Output = Result<P, Error>> + Send + 'async_trait>>
where T: SqlCommand + SqlParams + Debug + Send + 'static + 'async_trait, P: for<'a> FromSql<'a> + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Insert method, yeni bir kayıt eklemek için kullanılır

Source

fn tx_update<'life0, 'async_trait, T>( &'life0 self, entity: T, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where T: SqlCommand + UpdateParams + SqlParams + Debug + Send + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Update method, mevcut bir kaydı güncellemek için kullanılır

Source

fn tx_delete<'life0, 'async_trait, T>( &'life0 self, entity: T, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where T: SqlCommand + SqlParams + Debug + Send + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Delete method, bir kaydı silmek için kullanılır

Source

fn tx_fetch<'life0, 'life1, 'async_trait, P, R>( &'life0 self, params: &'life1 P, ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>
where P: SqlQuery<R> + SqlParams + Debug + Send + Sync + Clone + 'static + 'async_trait, R: FromRow + Debug + Send + Sync + Clone + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch method, tek bir kayıt getirmek için kullanılır

Source

fn tx_fetch_all<'life0, 'life1, 'async_trait, P, R>( &'life0 self, params: &'life1 P, ) -> Pin<Box<dyn Future<Output = Result<Vec<R>, Error>> + Send + 'async_trait>>
where P: SqlQuery<R> + SqlParams + Debug + Send + Sync + Clone + 'static + 'async_trait, R: FromRow + Debug + Send + Sync + Clone + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch All method, birden fazla kayıt getirmek için kullanılır

Source

fn tx_select<'life0, 'async_trait, T, F, R>( &'life0 self, entity: T, to_model: F, ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>
where T: SqlQuery<T> + SqlParams + Debug + Send + 'static + 'async_trait, F: Fn(&Row) -> Result<R, Error> + Send + Sync + 'static + 'async_trait, R: Send + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Select method, özel dönüşüm fonksiyonu ile tek bir kayıt getirmek için kullanılır

Source

fn tx_select_all<'life0, 'async_trait, T, F, R>( &'life0 self, entity: T, to_model: F, ) -> Pin<Box<dyn Future<Output = Result<Vec<R>, Error>> + Send + 'async_trait>>
where T: SqlQuery<T> + SqlParams + Debug + Send + 'static + 'async_trait, F: Fn(&Row) -> R + Send + Sync + 'static + 'async_trait, R: Send + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Select All method, özel dönüşüm fonksiyonu ile birden fazla kayıt getirmek için kullanılır

Source

fn insert<'life0, 'async_trait, T>( &'life0 self, entity: T, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where T: SqlCommand + SqlParams + Debug + Send + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

👎Deprecated since 0.2.0: Renamed to tx_insert. Please use tx_insert function instead.
Source

fn update<'life0, 'async_trait, T>( &'life0 self, entity: T, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where T: SqlCommand + UpdateParams + SqlParams + Debug + Send + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

👎Deprecated since 0.2.0: Renamed to tx_update. Please use tx_update function instead.
Source

fn delete<'life0, 'async_trait, T>( &'life0 self, entity: T, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where T: SqlCommand + SqlParams + Debug + Send + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

👎Deprecated since 0.2.0: Renamed to tx_delete. Please use tx_delete function instead.
Source

fn get<'life0, 'life1, 'async_trait, T>( &'life0 self, params: &'life1 T, ) -> Pin<Box<dyn Future<Output = Result<T, Error>> + Send + 'async_trait>>
where T: SqlQuery<T> + FromRow + SqlParams + Debug + Send + Sync + Clone + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

👎Deprecated since 0.2.0: Renamed to tx_fetch. Please use tx_fetch function instead.
Source

fn get_all<'life0, 'life1, 'async_trait, T>( &'life0 self, params: &'life1 T, ) -> Pin<Box<dyn Future<Output = Result<Vec<T>, Error>> + Send + 'async_trait>>
where T: SqlQuery<T> + FromRow + SqlParams + Debug + Send + Sync + Clone + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

👎Deprecated since 0.2.0: Renamed to tx_fetch_all. Please use tx_fetch_all function instead.
Source

fn select<'life0, 'async_trait, T, R, F>( &'life0 self, entity: T, to_model: F, ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>
where T: SqlQuery<T> + SqlParams + Debug + Send + 'static + 'async_trait, F: for<'a> Fn(&'a Row) -> Result<R, Error> + Send + Sync + 'static + 'async_trait, R: Send + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

👎Deprecated since 0.2.0: Renamed to tx_select. Please use tx_select function instead.
Source

fn select_all<'life0, 'async_trait, T, R, F>( &'life0 self, entity: T, to_model: F, ) -> Pin<Box<dyn Future<Output = Result<Vec<R>, Error>> + Send + 'async_trait>>
where T: SqlQuery<T> + SqlParams + Debug + Send + 'static + 'async_trait, F: Fn(&Row) -> R + Send + Sync + 'static + 'async_trait, R: Send + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

👎Deprecated since 0.2.0: Renamed to tx_select_all. Please use tx_select_all function instead.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§