Struct sqlx_core::mssql::MssqlConnection
source · [−]pub struct MssqlConnection { /* private fields */ }
Trait Implementations
sourceimpl<'c> Acquire<'c> for &'c mut MssqlConnection
impl<'c> Acquire<'c> for &'c mut MssqlConnection
type Database = Mssql
type Connection = &'c mut <Mssql as Database>::Connection
fn acquire(self) -> BoxFuture<'c, Result<Self::Connection, Error>>
fn begin(self) -> BoxFuture<'c, Result<Transaction<'c, Mssql>, Error>>
sourceimpl Connection for MssqlConnection
impl Connection for MssqlConnection
type Database = Mssql
type Options = MssqlConnectOptions
sourcefn close(self) -> BoxFuture<'static, Result<(), Error>>
fn close(self) -> BoxFuture<'static, Result<(), Error>>
Explicitly close this database connection. Read more
sourcefn ping(&mut self) -> BoxFuture<'_, Result<(), Error>>
fn ping(&mut self) -> BoxFuture<'_, Result<(), Error>>
Checks if a connection to the database is still valid.
sourcefn begin(
&mut self
) -> BoxFuture<'_, Result<Transaction<'_, Self::Database>, Error>> where
Self: Sized,
fn begin(
&mut self
) -> BoxFuture<'_, Result<Transaction<'_, Self::Database>, Error>> where
Self: Sized,
Begin a new transaction or establish a savepoint within the active transaction. Read more
sourcefn transaction<'a, F, R, E>(
&'a mut self,
callback: F
) -> BoxFuture<'a, Result<R, E>> where
for<'c> F: FnOnce(&'c mut Transaction<'_, Self::Database>) -> BoxFuture<'c, Result<R, E>> + 'a + Send + Sync,
Self: Sized,
R: Send,
E: From<Error> + Send,
fn transaction<'a, F, R, E>(
&'a mut self,
callback: F
) -> BoxFuture<'a, Result<R, E>> where
for<'c> F: FnOnce(&'c mut Transaction<'_, Self::Database>) -> BoxFuture<'c, Result<R, E>> + 'a + Send + Sync,
Self: Sized,
R: Send,
E: From<Error> + Send,
Execute the function inside a transaction. Read more
sourcefn cached_statements_size(&self) -> usize where
Self::Database: HasStatementCache,
fn cached_statements_size(&self) -> usize where
Self::Database: HasStatementCache,
The number of statements currently cached in the connection.
sourcefn clear_cached_statements(&mut self) -> BoxFuture<'_, Result<(), Error>> where
Self::Database: HasStatementCache,
fn clear_cached_statements(&mut self) -> BoxFuture<'_, Result<(), Error>> where
Self::Database: HasStatementCache,
Removes all statements from the cache, closing them on the server if needed. Read more
sourceimpl Debug for MssqlConnection
impl Debug for MssqlConnection
sourceimpl<'c> Executor<'c> for &'c mut MssqlConnection
impl<'c> Executor<'c> for &'c mut MssqlConnection
type Database = Mssql
sourcefn fetch_many<'e, 'q: 'e, E: 'q>(
self,
query: E
) -> BoxStream<'e, Result<Either<MssqlQueryResult, MssqlRow>, Error>> where
'c: 'e,
E: Execute<'q, Self::Database>,
fn fetch_many<'e, 'q: 'e, E: 'q>(
self,
query: E
) -> BoxStream<'e, Result<Either<MssqlQueryResult, MssqlRow>, Error>> where
'c: 'e,
E: Execute<'q, Self::Database>,
Execute multiple queries and return the generated results as a stream from each query, in a stream. Read more
sourcefn fetch_optional<'e, 'q: 'e, E: 'q>(
self,
query: E
) -> BoxFuture<'e, Result<Option<MssqlRow>, Error>> where
'c: 'e,
E: Execute<'q, Self::Database>,
fn fetch_optional<'e, 'q: 'e, E: 'q>(
self,
query: E
) -> BoxFuture<'e, Result<Option<MssqlRow>, Error>> where
'c: 'e,
E: Execute<'q, Self::Database>,
Execute the query and returns at most one row.
sourcefn prepare_with<'e, 'q: 'e>(
self,
sql: &'q str,
_parameters: &[MssqlTypeInfo]
) -> BoxFuture<'e, Result<MssqlStatement<'q>, Error>> where
'c: 'e,
fn prepare_with<'e, 'q: 'e>(
self,
sql: &'q str,
_parameters: &[MssqlTypeInfo]
) -> BoxFuture<'e, Result<MssqlStatement<'q>, Error>> where
'c: 'e,
Prepare the SQL query, with parameter type information, to inspect the type information about its parameters and results. Read more
sourcefn execute<'e, 'q: 'e, E: 'q>(
self,
query: E
) -> BoxFuture<'e, Result<<Self::Database as Database>::QueryResult, Error>> where
'c: 'e,
E: Execute<'q, Self::Database>,
fn execute<'e, 'q: 'e, E: 'q>(
self,
query: E
) -> BoxFuture<'e, Result<<Self::Database as Database>::QueryResult, Error>> where
'c: 'e,
E: Execute<'q, Self::Database>,
Execute the query and return the total number of rows affected.
sourcefn execute_many<'e, 'q: 'e, E: 'q>(
self,
query: E
) -> BoxStream<'e, Result<<Self::Database as Database>::QueryResult, Error>> where
'c: 'e,
E: Execute<'q, Self::Database>,
fn execute_many<'e, 'q: 'e, E: 'q>(
self,
query: E
) -> BoxStream<'e, Result<<Self::Database as Database>::QueryResult, Error>> where
'c: 'e,
E: Execute<'q, Self::Database>,
Execute multiple queries and return the rows affected from each query, in a stream.
sourcefn fetch<'e, 'q: 'e, E: 'q>(
self,
query: E
) -> BoxStream<'e, Result<<Self::Database as Database>::Row, Error>> where
'c: 'e,
E: Execute<'q, Self::Database>,
fn fetch<'e, 'q: 'e, E: 'q>(
self,
query: E
) -> BoxStream<'e, Result<<Self::Database as Database>::Row, Error>> where
'c: 'e,
E: Execute<'q, Self::Database>,
Execute the query and return the generated results as a stream.
sourcefn fetch_all<'e, 'q: 'e, E: 'q>(
self,
query: E
) -> BoxFuture<'e, Result<Vec<<Self::Database as Database>::Row>, Error>> where
'c: 'e,
E: Execute<'q, Self::Database>,
fn fetch_all<'e, 'q: 'e, E: 'q>(
self,
query: E
) -> BoxFuture<'e, Result<Vec<<Self::Database as Database>::Row>, Error>> where
'c: 'e,
E: Execute<'q, Self::Database>,
Execute the query and return all the generated results, collected into a Vec
.
sourceimpl From<MssqlConnection> for AnyConnection
impl From<MssqlConnection> for AnyConnection
sourcefn from(conn: MssqlConnection) -> Self
fn from(conn: MssqlConnection) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for MssqlConnection
impl Send for MssqlConnection
impl Sync for MssqlConnection
impl Unpin for MssqlConnection
impl UnwindSafe for MssqlConnection
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more