pub struct DeadpoolPostgresAdapter { /* private fields */ }Expand description
Production-oriented Postgres adapter backed by a deadpool-postgres pool.
Implementations§
Source§impl DeadpoolPostgresAdapter
impl DeadpoolPostgresAdapter
pub fn new(pool: Pool) -> Self
pub fn with_schema(pool: Pool, schema: DbSchema) -> Self
pub fn pool(&self) -> &Pool
pub fn builder() -> DeadpoolPostgresBuilder
pub async fn plan_migrations( &self, schema: &DbSchema, ) -> Result<SchemaMigrationPlan, RustAuthError>
pub async fn validate_connection(&self) -> Result<(), RustAuthError>
pub async fn compile_migrations( &self, schema: &DbSchema, ) -> Result<String, RustAuthError>
Trait Implementations§
Source§impl Clone for DeadpoolPostgresAdapter
impl Clone for DeadpoolPostgresAdapter
Source§fn clone(&self) -> DeadpoolPostgresAdapter
fn clone(&self) -> DeadpoolPostgresAdapter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl DbAdapter for DeadpoolPostgresAdapter
impl DbAdapter for DeadpoolPostgresAdapter
fn id(&self) -> &str
fn capabilities(&self) -> AdapterCapabilities
fn create<'a>(&'a self, query: Create) -> AdapterFuture<'a, DbRecord>
fn find_one<'a>(&'a self, query: FindOne) -> AdapterFuture<'a, Option<DbRecord>>
fn find_many<'a>(&'a self, query: FindMany) -> AdapterFuture<'a, Vec<DbRecord>>
fn count<'a>(&'a self, query: Count) -> AdapterFuture<'a, u64>
fn update<'a>(&'a self, query: Update) -> AdapterFuture<'a, Option<DbRecord>>
fn update_many<'a>(&'a self, query: UpdateMany) -> AdapterFuture<'a, u64>
fn delete<'a>(&'a self, query: Delete) -> AdapterFuture<'a, ()>
fn delete_many<'a>(&'a self, query: DeleteMany) -> AdapterFuture<'a, u64>
fn transaction<'a>( &'a self, callback: TransactionCallback<'a>, ) -> AdapterFuture<'a, ()>
fn create_schema<'a>( &'a self, schema: &'a DbSchema, _file: Option<&'a str>, ) -> AdapterFuture<'a, Option<SchemaCreation>>
fn run_migrations<'a>(&'a self, schema: &'a DbSchema) -> AdapterFuture<'a, ()>
fn run_plugin_migrations<'a>( &'a self, _migrations: &'a [PluginMigration], ) -> Pin<Box<dyn Future<Output = Result<(), RustAuthError>> + Send + 'a>>
Source§impl Debug for DeadpoolPostgresAdapter
impl Debug for DeadpoolPostgresAdapter
Source§impl From<&DeadpoolPostgresAdapter> for DeadpoolPostgresRateLimitStore
impl From<&DeadpoolPostgresAdapter> for DeadpoolPostgresRateLimitStore
Source§fn from(adapter: &DeadpoolPostgresAdapter) -> Self
fn from(adapter: &DeadpoolPostgresAdapter) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for DeadpoolPostgresAdapter
impl !UnwindSafe for DeadpoolPostgresAdapter
impl Freeze for DeadpoolPostgresAdapter
impl Send for DeadpoolPostgresAdapter
impl Sync for DeadpoolPostgresAdapter
impl Unpin for DeadpoolPostgresAdapter
impl UnsafeUnpin for DeadpoolPostgresAdapter
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