Type Alias Pool

Source
pub type Pool = Pool<Manager>;
Expand description

Type alias for using deadpool::managed::Pool with tokio_postgres.

Aliased Type§

pub struct Pool { /* private fields */ }

Trait Implementations§

Source§

impl CrudOps for Pool

CrudOps trait implementation for deadpool_postgres::Client

Source§

fn 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 + Send + Sync + 'async_trait, P: 'async_trait + for<'a> FromSql<'a> + Send + Sync, Self: 'async_trait, 'life0: 'async_trait,

Veritabanına yeni bir kayıt ekler.
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 + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Veritabanındaki mevcut bir kaydı günceller.
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 + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Veritabanından bir kaydı siler.
Source§

fn 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 + Send + Sync + 'async_trait, R: FromRow + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Belirtilen kriterlere uygun tek bir kaydı getirir.
Source§

fn 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 + Send + Sync + 'async_trait, R: FromRow + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Belirtilen kriterlere uygun tüm kayıtları getirir.
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 + Send + Sync + 'async_trait, F: FnOnce(&Row) -> Result<R, Error> + Send + Sync + 'async_trait, R: 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Belirtilen özel dönüşüm fonksiyonunu kullanarak tek bir kaydı getirir.
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 + Send + Sync + 'async_trait, F: Fn(&Row) -> R + Send + Sync + 'async_trait, R: 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Belirtilen özel dönüşüm fonksiyonunu kullanarak tüm kayıtları getirir.
Source§

impl PoolExtensions for Pool

Source§

fn 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 + Send + Sync + 'static + 'async_trait, P: 'async_trait + for<'a> FromSql<'a> + Send + Sync, Self: 'async_trait, 'life0: 'async_trait,

Inserts a new record into the database
Source§

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

Updates an existing record in the database
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 + Send + Sync + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Deletes a record from the database
Source§

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

Retrieves a single record from the database
Source§

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

Retrieves multiple records from the database