Trait sqlx_core_oldapi::connection::ConnectOptions
source · pub trait ConnectOptions: 'static + Send + Sync + FromStr<Err = Error> + Debug + Clone {
type Connection: Connection + ?Sized;
// Required methods
fn connect(&self) -> BoxFuture<'_, Result<Self::Connection, Error>>
where Self::Connection: Sized;
fn log_statements(&mut self, level: LevelFilter) -> &mut Self;
fn log_slow_statements(
&mut self,
level: LevelFilter,
duration: Duration
) -> &mut Self;
// Provided method
fn disable_statement_logging(&mut self) -> &mut Self { ... }
}
Required Associated Types§
type Connection: Connection + ?Sized
Required Methods§
sourcefn connect(&self) -> BoxFuture<'_, Result<Self::Connection, Error>>where
Self::Connection: Sized,
fn connect(&self) -> BoxFuture<'_, Result<Self::Connection, Error>>where
Self::Connection: Sized,
Establish a new database connection with the options specified by self
.
sourcefn log_statements(&mut self, level: LevelFilter) -> &mut Self
fn log_statements(&mut self, level: LevelFilter) -> &mut Self
Log executed statements with the specified level
sourcefn log_slow_statements(
&mut self,
level: LevelFilter,
duration: Duration
) -> &mut Self
fn log_slow_statements( &mut self, level: LevelFilter, duration: Duration ) -> &mut Self
Log executed statements with a duration above the specified duration
at the specified level
.
Provided Methods§
sourcefn disable_statement_logging(&mut self) -> &mut Self
fn disable_statement_logging(&mut self) -> &mut Self
Entirely disables statement logging (both slow and regular).
Object Safety§
This trait is not object safe.
Implementors§
source§impl ConnectOptions for AnyConnectOptions
impl ConnectOptions for AnyConnectOptions
type Connection = AnyConnection
source§impl ConnectOptions for MssqlConnectOptions
Available on crate feature mssql
only.
impl ConnectOptions for MssqlConnectOptions
Available on crate feature
mssql
only.type Connection = MssqlConnection
source§impl ConnectOptions for MySqlConnectOptions
Available on crate feature mysql
only.
impl ConnectOptions for MySqlConnectOptions
Available on crate feature
mysql
only.type Connection = MySqlConnection
source§impl ConnectOptions for PgConnectOptions
Available on crate feature postgres
only.
impl ConnectOptions for PgConnectOptions
Available on crate feature
postgres
only.type Connection = PgConnection
source§impl ConnectOptions for SqliteConnectOptions
Available on crate feature sqlite
only.
impl ConnectOptions for SqliteConnectOptions
Available on crate feature
sqlite
only.