pub struct DuckDbAthenaQueryBackend { /* private fields */ }Implementations§
Source§impl DuckDbAthenaQueryBackend
impl DuckDbAthenaQueryBackend
Sourcepub fn new(conn: Arc<Mutex<Connection>>) -> Self
pub fn new(conn: Arc<Mutex<Connection>>) -> Self
Create a backend that executes queries against the given shared DuckDB
connection. The caller retains an Arc<Mutex<Connection>> handle and
can use it to seed the database or share it across multiple backends.
Each query briefly locks the mutex to call Connection::try_clone,
which creates a lightweight handle to the same underlying database.
Trait Implementations§
Source§impl AthenaQueryBackend for DuckDbAthenaQueryBackend
impl AthenaQueryBackend for DuckDbAthenaQueryBackend
Source§fn execute_query(
&self,
sql: String,
) -> Pin<Box<dyn Future<Output = QueryResult> + Send>>
fn execute_query( &self, sql: String, ) -> Pin<Box<dyn Future<Output = QueryResult> + Send>>
Execute
sql and return the result asynchronously.Auto Trait Implementations§
impl Freeze for DuckDbAthenaQueryBackend
impl RefUnwindSafe for DuckDbAthenaQueryBackend
impl Send for DuckDbAthenaQueryBackend
impl Sync for DuckDbAthenaQueryBackend
impl Unpin for DuckDbAthenaQueryBackend
impl UnsafeUnpin for DuckDbAthenaQueryBackend
impl UnwindSafe for DuckDbAthenaQueryBackend
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> 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 moreCreates a shared type from an unshared type.