pub struct DuckDbConnectionPool { /* private fields */ }Available on crate feature
duckdb only.Implementations§
Source§impl DuckDbConnectionPool
impl DuckDbConnectionPool
Sourcepub fn db_path(&self) -> &str
pub fn db_path(&self) -> &str
Get the dataset path. Returns :memory: if the in memory database is used.
Sourcepub fn new_memory() -> Result<Self, Error>
pub fn new_memory() -> Result<Self, Error>
Create a new DuckDbConnectionPool from memory.
§Arguments
access_mode- The access mode for the connection pool
§Returns
- A new
DuckDbConnectionPool
§Errors
DuckDBConnectionSnafu- If there is an error creating the connection poolConnectionPoolSnafu- If there is an error creating the connection pool
Sourcepub fn new_file(path: &str, access_mode: &AccessMode) -> Result<Self, Error>
pub fn new_file(path: &str, access_mode: &AccessMode) -> Result<Self, Error>
Create a new DuckDbConnectionPool from a file.
§Arguments
path- The path to the fileaccess_mode- The access mode for the connection pool
§Returns
- A new
DuckDbConnectionPool
§Errors
DuckDBConnectionSnafu- If there is an error creating the connection poolConnectionPoolSnafu- If there is an error creating the connection pool
pub fn with_unsupported_type_action(self, action: UnsupportedTypeAction) -> Self
pub fn set_attached_databases(self, databases: &[Arc<str>]) -> Self
pub fn with_connection_setup_queries(self, queries: Vec<Arc<str>>) -> Self
Sourcepub fn connect_sync(
self: Arc<Self>,
) -> Result<Box<dyn DbConnection<PooledConnection<DuckdbConnectionManager>, DuckDBParameter>>, Error>
pub fn connect_sync( self: Arc<Self>, ) -> Result<Box<dyn DbConnection<PooledConnection<DuckdbConnectionManager>, DuckDBParameter>>, Error>
Create a new DuckDbConnectionPool from a database URL.
§Errors
DuckDBConnectionSnafu- If there is an error creating the connection pool
pub fn mode(&self) -> Mode
pub fn get_attachments(&self) -> Result<Option<Arc<DuckDBAttachments>>, Error>
Trait Implementations§
Source§impl Clone for DuckDbConnectionPool
impl Clone for DuckDbConnectionPool
Source§fn clone(&self) -> DuckDbConnectionPool
fn clone(&self) -> DuckDbConnectionPool
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl DbConnectionPool<PooledConnection<DuckdbConnectionManager>, Box<dyn DuckDBSyncParameter>> for DuckDbConnectionPool
impl DbConnectionPool<PooledConnection<DuckdbConnectionManager>, Box<dyn DuckDBSyncParameter>> for DuckDbConnectionPool
fn connect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn DbConnection<PooledConnection<DuckdbConnectionManager>, DuckDBParameter>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn join_push_down(&self) -> JoinPushDown
Auto Trait Implementations§
impl Freeze for DuckDbConnectionPool
impl !RefUnwindSafe for DuckDbConnectionPool
impl Send for DuckDbConnectionPool
impl Sync for DuckDbConnectionPool
impl Unpin for DuckDbConnectionPool
impl !UnwindSafe for DuckDbConnectionPool
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request