pub struct DuckDbRedshiftQueryBackend { /* private fields */ }Implementations§
Source§impl DuckDbRedshiftQueryBackend
impl DuckDbRedshiftQueryBackend
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 RedshiftQueryBackend for DuckDbRedshiftQueryBackend
impl RedshiftQueryBackend for DuckDbRedshiftQueryBackend
Source§fn execute_statement(
&self,
sql: String,
) -> Pin<Box<dyn Future<Output = StatementResult> + Send>>
fn execute_statement( &self, sql: String, ) -> Pin<Box<dyn Future<Output = StatementResult> + Send>>
Execute a single SQL statement and return the result asynchronously.
Source§fn batch_execute(
&self,
sqls: Vec<String>,
) -> Pin<Box<dyn Future<Output = StatementResult> + Send>>
fn batch_execute( &self, sqls: Vec<String>, ) -> Pin<Box<dyn Future<Output = StatementResult> + Send>>
Execute a batch of SQL statements sequentially.
Batch executions typically do not return a result set.
Auto Trait Implementations§
impl Freeze for DuckDbRedshiftQueryBackend
impl RefUnwindSafe for DuckDbRedshiftQueryBackend
impl Send for DuckDbRedshiftQueryBackend
impl Sync for DuckDbRedshiftQueryBackend
impl Unpin for DuckDbRedshiftQueryBackend
impl UnsafeUnpin for DuckDbRedshiftQueryBackend
impl UnwindSafe for DuckDbRedshiftQueryBackend
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.