Struct mysql_async_support_rt::SqlOverSsh [−][src]
pub struct SqlOverSsh;
Expand description
Runs SQL over an SSH connection.
Implementations
pub async fn exec<'f, Queries>(
&'f self,
db_address: SocketAddr,
db_schema_cred: DbSchemaCred<'f>,
queries: Queries
) -> Result<<Queries as FnWithPool<'_>>::Output, <Queries as FnWithPool<'_>>::Error> where
Queries: FnWithPool<'f>,
pub async fn exec<'f, Queries>(
&'f self,
db_address: SocketAddr,
db_schema_cred: DbSchemaCred<'f>,
queries: Queries
) -> Result<<Queries as FnWithPool<'_>>::Output, <Queries as FnWithPool<'_>>::Error> where
Queries: FnWithPool<'f>,
Runs queries specified by the parameter through a new DB connection pool.
Parameters
db_address
: Address to connect to the database server.db_schema_cred
: Credentials to access a database schema.queries
: Async function that runs queries against the database.
Note
For some reason pool.get_conn()
doesn’t work at the same time, so the
future cannot use futures::join!()
to run multiple queries
concurrently.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SqlOverSsh
impl Send for SqlOverSsh
impl Sync for SqlOverSsh
impl Unpin for SqlOverSsh
impl UnwindSafe for SqlOverSsh
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V