Struct sqlx::mssql::MssqlConnectOptions
source ยท pub struct MssqlConnectOptions { /* private fields */ }
Available on crate feature
mssql
only.Implementationsยง
sourceยงimpl MssqlConnectOptions
impl MssqlConnectOptions
pub fn new() -> MssqlConnectOptions
pub fn host(self, host: &str) -> MssqlConnectOptions
pub fn port(self, port: u16) -> MssqlConnectOptions
pub fn username(self, username: &str) -> MssqlConnectOptions
pub fn password(self, password: &str) -> MssqlConnectOptions
pub fn database(self, database: &str) -> MssqlConnectOptions
Trait Implementationsยง
sourceยงimpl Clone for MssqlConnectOptions
impl Clone for MssqlConnectOptions
sourceยงfn clone(&self) -> MssqlConnectOptions
fn clone(&self) -> MssqlConnectOptions
Returns a copy 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 moresourceยงimpl ConnectOptions for MssqlConnectOptions
impl ConnectOptions for MssqlConnectOptions
type Connection = MssqlConnection
sourceยงfn connect(
&self
) -> Pin<Box<dyn Future<Output = Result<<MssqlConnectOptions as ConnectOptions>::Connection, Error>> + Send, Global>>where
<MssqlConnectOptions as ConnectOptions>::Connection: Sized,
fn connect( &self ) -> Pin<Box<dyn Future<Output = Result<<MssqlConnectOptions as ConnectOptions>::Connection, Error>> + Send, Global>>where <MssqlConnectOptions as ConnectOptions>::Connection: Sized,
Establish a new database connection with the options specified by
self
.sourceยงfn log_statements(&mut self, level: LevelFilter) -> &mut MssqlConnectOptions
fn log_statements(&mut self, level: LevelFilter) -> &mut MssqlConnectOptions
Log executed statements with the specified
level
sourceยงfn log_slow_statements(
&mut self,
level: LevelFilter,
duration: Duration
) -> &mut MssqlConnectOptions
fn log_slow_statements( &mut self, level: LevelFilter, duration: Duration ) -> &mut MssqlConnectOptions
Log executed statements with a duration above the specified
duration
at the specified level
.sourceยงfn disable_statement_logging(&mut self) -> &mut Self
fn disable_statement_logging(&mut self) -> &mut Self
Entirely disables statement logging (both slow and regular).
sourceยงimpl Debug for MssqlConnectOptions
impl Debug for MssqlConnectOptions
sourceยงimpl Default for MssqlConnectOptions
impl Default for MssqlConnectOptions
sourceยงfn default() -> MssqlConnectOptions
fn default() -> MssqlConnectOptions
Returns the โdefault valueโ for a type. Read more
sourceยงimpl From<MssqlConnectOptions> for AnyConnectOptions
impl From<MssqlConnectOptions> for AnyConnectOptions
sourceยงfn from(options: MssqlConnectOptions) -> AnyConnectOptions
fn from(options: MssqlConnectOptions) -> AnyConnectOptions
Converts to this type from the input type.
sourceยงimpl FromStr for MssqlConnectOptions
impl FromStr for MssqlConnectOptions
sourceยงimpl TryFrom<AnyConnectOptions> for MssqlConnectOptions
impl TryFrom<AnyConnectOptions> for MssqlConnectOptions
sourceยงfn try_from(
value: AnyConnectOptions
) -> Result<MssqlConnectOptions, <MssqlConnectOptions as TryFrom<AnyConnectOptions>>::Error>
fn try_from( value: AnyConnectOptions ) -> Result<MssqlConnectOptions, <MssqlConnectOptions as TryFrom<AnyConnectOptions>>::Error>
Performs the conversion.