Trait sqlx::ConnectOptions[][src]

pub trait ConnectOptions: 'static + Send + Sync + Debug + FromStr<Err = Error> {
    type Connection: Connection + ?Sized;
    pub fn connect(
        &self
    ) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Error>> + Send, Global>>
    where
        Self::Connection: Sized
;
pub fn log_statements(&mut self, level: LevelFilter) -> &mut Self;
pub fn log_slow_statements(
        &mut self,
        level: LevelFilter,
        duration: Duration
    ) -> &mut Self; pub fn disable_statement_logging(&mut self) -> &mut Self { ... } }

Associated Types

Loading content...

Required methods

pub fn connect(
    &self
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Error>> + Send, Global>> where
    Self::Connection: Sized
[src]

Establish a new database connection with the options specified by self.

pub fn log_statements(&mut self, level: LevelFilter) -> &mut Self[src]

Log executed statements with the specified level

pub fn log_slow_statements(
    &mut self,
    level: LevelFilter,
    duration: Duration
) -> &mut Self
[src]

Log executed statements with a duration above the specified duration at the specified level.

Loading content...

Provided methods

pub fn disable_statement_logging(&mut self) -> &mut Self[src]

Entirely disables statement logging (both slow and regular).

Loading content...

Implementors

impl ConnectOptions for AnyConnectOptions[src]

type Connection = AnyConnection

impl ConnectOptions for MssqlConnectOptions[src]

type Connection = MssqlConnection

impl ConnectOptions for MySqlConnectOptions[src]

type Connection = MySqlConnection

impl ConnectOptions for PgConnectOptions[src]

type Connection = PgConnection

impl ConnectOptions for SqliteConnectOptions[src]

type Connection = SqliteConnection

Loading content...