Struct SqlzMsSqlPoolConnection
pub struct SqlzMsSqlPoolConnection { /* private fields */ }Expand description
Defines a sqlz MSSQL pool
Implementations§
§impl SqlzMsSqlPoolConnection
impl SqlzMsSqlPoolConnection
pub async fn execute(&self, stmt: Statement) -> Result<ExecResult, DbErr>
pub async fn execute(&self, stmt: Statement) -> Result<ExecResult, DbErr>
Execute a Statement on a MSSQL backend
pub async fn execute_unprepared(&self, sql: &str) -> Result<ExecResult, DbErr>
pub async fn execute_unprepared(&self, sql: &str) -> Result<ExecResult, DbErr>
Execute an unprepared SQL statement on a MSSQL backend
Uses the raw SQLBatch TDS path (not sp_executesql) so that temp tables created here are visible to subsequent queries on the same connection.
pub async fn query_one(
&self,
stmt: Statement,
) -> Result<Option<QueryResult>, DbErr>
pub async fn query_one( &self, stmt: Statement, ) -> Result<Option<QueryResult>, DbErr>
Get one result from a SQL query. Returns Option::None if no match was found
pub async fn query_all(
&self,
stmt: Statement,
) -> Result<Vec<QueryResult>, DbErr>
pub async fn query_all( &self, stmt: Statement, ) -> Result<Vec<QueryResult>, DbErr>
Get the results of a query returning them as a Vec<QueryResult>
pub async fn stream(&self, stmt: Statement) -> Result<QueryStream, DbErr>
pub async fn stream(&self, stmt: Statement) -> Result<QueryStream, DbErr>
Stream the results of executing a SQL query
pub async fn begin(
&self,
isolation_level: Option<IsolationLevel>,
access_mode: Option<AccessMode>,
) -> Result<DatabaseTransaction, DbErr>
pub async fn begin( &self, isolation_level: Option<IsolationLevel>, access_mode: Option<AccessMode>, ) -> Result<DatabaseTransaction, DbErr>
Bundle a set of SQL statements that execute together.
pub async fn transaction<F, T, E>(
&self,
callback: F,
isolation_level: Option<IsolationLevel>,
access_mode: Option<AccessMode>,
) -> Result<T, TransactionError<E>>
pub async fn transaction<F, T, E>( &self, callback: F, isolation_level: Option<IsolationLevel>, access_mode: Option<AccessMode>, ) -> Result<T, TransactionError<E>>
Create a MySQL transaction
pub async fn close(self) -> Result<(), DbErr>
pub async fn close(self) -> Result<(), DbErr>
Explicitly close the MSSQL connection
See Self::close_by_ref for usage with references.
pub async fn close_by_ref(&self) -> Result<(), DbErr>
pub async fn close_by_ref(&self) -> Result<(), DbErr>
Explicitly close the MSSQL connection
pub fn get_schema(&self) -> Option<&str>
pub fn get_schema(&self) -> Option<&str>
Get database schema that specified in the connection string
Trait Implementations§
§impl Clone for SqlzMsSqlPoolConnection
impl Clone for SqlzMsSqlPoolConnection
§fn clone(&self) -> SqlzMsSqlPoolConnection
fn clone(&self) -> SqlzMsSqlPoolConnection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SqlzMsSqlPoolConnection
impl !RefUnwindSafe for SqlzMsSqlPoolConnection
impl Send for SqlzMsSqlPoolConnection
impl Sync for SqlzMsSqlPoolConnection
impl Unpin for SqlzMsSqlPoolConnection
impl !UnwindSafe for SqlzMsSqlPoolConnection
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more