pub struct PostgresDriver { /* private fields */ }Expand description
Opens PostgreSQL connections.
The reference implementation of Driver: everything above the driver line
is written once, and this is what that line looks like from below.
Implementations§
Source§impl PostgresDriver
impl PostgresDriver
pub fn new(config: DatabaseConfig) -> Self
pub fn config(&self) -> &DatabaseConfig
Trait Implementations§
Source§impl Driver for PostgresDriver
impl Driver for PostgresDriver
Source§fn generation(&self) -> u64
fn generation(&self) -> u64
Which generation of credentials a connection opened now would belong to. Read more
fn dialect(&self) -> Arc<dyn Dialect> ⓘ
fn connect(&self) -> BoxFuture<'_, Result<Box<dyn DriverConnection>>>
Source§fn describe(&self) -> String
fn describe(&self) -> String
How this connection is described in an error or a log line. Read more
Source§fn max_connections(&self) -> usize
fn max_connections(&self) -> usize
How many connections the pool should allow at once.
Auto Trait Implementations§
impl !RefUnwindSafe for PostgresDriver
impl !UnwindSafe for PostgresDriver
impl Freeze for PostgresDriver
impl Send for PostgresDriver
impl Sync for PostgresDriver
impl Unpin for PostgresDriver
impl UnsafeUnpin for PostgresDriver
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