pub trait SyncDbConnection<T, P>: DbConnection<T, P> {
// Required methods
fn new(conn: T) -> Self
where Self: Sized;
fn tables(&self, schema: &str) -> Result<Vec<String>, Error>;
fn schemas(&self) -> Result<Vec<String>, Error>;
fn get_schema(
&self,
table_reference: &TableReference,
) -> Result<SchemaRef, Error>;
fn query_arrow(
&self,
sql: &str,
params: &[P],
projected_schema: Option<SchemaRef>,
) -> Result<SendableRecordBatchStream, GenericError>;
fn execute(&self, sql: &str, params: &[P]) -> Result<u64, GenericError>;
}Required Methods§
fn new(conn: T) -> Selfwhere
Self: Sized,
fn tables(&self, schema: &str) -> Result<Vec<String>, Error>
fn schemas(&self) -> Result<Vec<String>, Error>
Sourcefn get_schema(
&self,
table_reference: &TableReference,
) -> Result<SchemaRef, Error>
fn get_schema( &self, table_reference: &TableReference, ) -> Result<SchemaRef, Error>
Sourcefn query_arrow(
&self,
sql: &str,
params: &[P],
projected_schema: Option<SchemaRef>,
) -> Result<SendableRecordBatchStream, GenericError>
fn query_arrow( &self, sql: &str, params: &[P], projected_schema: Option<SchemaRef>, ) -> Result<SendableRecordBatchStream, GenericError>
Implementors§
impl SyncDbConnection<PooledConnection<DuckdbConnectionManager>, Box<dyn DuckDBSyncParameter>> for DuckDbConnection
Available on crate feature
duckdb only.