pub struct DuckdbConnectionManager { /* private fields */ }Expand description
An r2d2::ManageConnection for duckdb::Connections.
Implementations§
Source§impl DuckdbConnectionManager
impl DuckdbConnectionManager
Sourcepub fn file<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn file<P: AsRef<Path>>(path: P) -> Result<Self>
Creates a new DuckdbConnectionManager from file.
Sourcepub fn file_with_flags<P: AsRef<Path>>(path: P, config: Config) -> Result<Self>
pub fn file_with_flags<P: AsRef<Path>>(path: P, config: Config) -> Result<Self>
Creates a new DuckdbConnectionManager from file with flags.
Sourcepub fn memory_with_flags(config: Config) -> Result<Self>
pub fn memory_with_flags(config: Config) -> Result<Self>
Creates a new DuckdbConnectionManager from memory with flags.
Trait Implementations§
Source§impl ManageConnection for DuckdbConnectionManager
impl ManageConnection for DuckdbConnectionManager
Source§type Connection = Connection
type Connection = Connection
The connection type this manager deals with.
Source§fn connect(&self) -> Result<Self::Connection, Self::Error>
fn connect(&self) -> Result<Self::Connection, Self::Error>
Attempts to create a new connection.
Source§fn is_valid(&self, conn: &mut Self::Connection) -> Result<(), Self::Error>
fn is_valid(&self, conn: &mut Self::Connection) -> Result<(), Self::Error>
Determines if the connection is still connected to the database. Read more
Source§fn has_broken(&self, _: &mut Self::Connection) -> bool
fn has_broken(&self, _: &mut Self::Connection) -> bool
Quickly determines if the connection is no longer usable. Read more
Auto Trait Implementations§
impl Freeze for DuckdbConnectionManager
impl RefUnwindSafe for DuckdbConnectionManager
impl Send for DuckdbConnectionManager
impl Sync for DuckdbConnectionManager
impl Unpin for DuckdbConnectionManager
impl UnwindSafe for DuckdbConnectionManager
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more