pub trait AsyncDbConnection<T, P>: DbConnection<T, P> + Sync {
// Required methods
fn new(conn: T) -> Self
where Self: Sized;
fn tables<'life0, 'life1, 'async_trait>(
&'life0 self,
schema: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn schemas<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_schema<'life0, 'life1, 'async_trait>(
&'life0 self,
table_reference: &'life1 TableReference,
) -> Pin<Box<dyn Future<Output = Result<SchemaRef, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn query_arrow<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [P],
projected_schema: Option<SchemaRef>,
) -> Pin<Box<dyn Future<Output = Result<SendableRecordBatchStream, GenericError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [P],
) -> Pin<Box<dyn Future<Output = Result<u64, GenericError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Required Methods§
fn new(conn: T) -> Selfwhere
Self: Sized,
fn tables<'life0, 'life1, 'async_trait>(
&'life0 self,
schema: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn schemas<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn get_schema<'life0, 'life1, 'async_trait>(
&'life0 self,
table_reference: &'life1 TableReference,
) -> Pin<Box<dyn Future<Output = Result<SchemaRef, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_schema<'life0, 'life1, 'async_trait>(
&'life0 self,
table_reference: &'life1 TableReference,
) -> Pin<Box<dyn Future<Output = Result<SchemaRef, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn query_arrow<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [P],
projected_schema: Option<SchemaRef>,
) -> Pin<Box<dyn Future<Output = Result<SendableRecordBatchStream, GenericError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn query_arrow<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [P],
projected_schema: Option<SchemaRef>,
) -> Pin<Box<dyn Future<Output = Result<SendableRecordBatchStream, GenericError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [P],
) -> Pin<Box<dyn Future<Output = Result<u64, GenericError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [P],
) -> Pin<Box<dyn Future<Output = Result<u64, GenericError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute the given SQL statement with parameters, returning the number of affected rows.
§Arguments
sql- The SQL statement.params- The parameters for the SQL statement.
Implementations on Foreign Types§
Source§impl AsyncDbConnection<Client, ()> for Client
Available on crate feature clickhouse only.
impl AsyncDbConnection<Client, ()> for Client
Available on crate feature
clickhouse only.Source§fn get_schema<'life0, 'life1, 'async_trait>(
&'life0 self,
table_reference: &'life1 TableReference,
) -> Pin<Box<dyn Future<Output = Result<SchemaRef, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_schema<'life0, 'life1, 'async_trait>(
&'life0 self,
table_reference: &'life1 TableReference,
) -> Pin<Box<dyn Future<Output = Result<SchemaRef, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn query_arrow<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sql: &'life1 str,
_params: &'life2 [()],
projected_schema: Option<SchemaRef>,
) -> Pin<Box<dyn Future<Output = Result<SendableRecordBatchStream, GenericError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn query_arrow<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sql: &'life1 str,
_params: &'life2 [()],
projected_schema: Option<SchemaRef>,
) -> Pin<Box<dyn Future<Output = Result<SendableRecordBatchStream, GenericError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [()],
) -> Pin<Box<dyn Future<Output = Result<u64, GenericError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sql: &'life1 str,
params: &'life2 [()],
) -> Pin<Box<dyn Future<Output = Result<u64, GenericError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute the given SQL statement with parameters, returning the number of affected rows.
§Arguments
sql- The SQL statement.params- The parameters for the SQL statement.
fn new(conn: Client) -> Selfwhere
Self: Sized,
fn tables<'life0, 'life1, 'async_trait>(
&'life0 self,
schema: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn schemas<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Implementors§
impl AsyncDbConnection<Connection, &'static (dyn ToSql + Sync)> for SqliteConnection
Available on crate feature
sqlite only.impl<'a> AsyncDbConnection<PooledConnection<'static, PostgresConnectionManager<MakeTlsConnector>>, &'a (dyn ToSql + Sync)> for PostgresConnection
Available on crate feature
postgres only.impl<'a> AsyncDbConnection<Conn, &'a (dyn ToValue + Sync)> for MySQLConnection
Available on crate feature
mysql only.impl<'a> AsyncDbConnection<Connection<'a>, Box<dyn ODBCSyncParameter>> for ODBCConnection<'a>where
'a: 'static,
Available on crate feature
odbc only.