pub struct OdbcConnectOptions { /* private fields */ }Expand description
Connection options for an ODBC data source.
Implementations§
Source§impl OdbcConnectOptions
impl OdbcConnectOptions
Sourcepub fn connection_string(&self) -> &str
pub fn connection_string(&self) -> &str
Returns the normalized ODBC connection string.
Sourcepub fn buffer_settings(&mut self, settings: OdbcBufferSettings) -> &mut Self
pub fn buffer_settings(&mut self, settings: OdbcBufferSettings) -> &mut Self
Sets the buffer configuration for this connection.
Sourcepub fn buffer_settings_ref(&self) -> &OdbcBufferSettings
pub fn buffer_settings_ref(&self) -> &OdbcBufferSettings
Returns the current buffer settings.
Sourcepub fn batch_size(&mut self, batch_size: usize) -> &mut Self
pub fn batch_size(&mut self, batch_size: usize) -> &mut Self
Sets the number of rows fetched in each batch.
Sourcepub fn max_column_size(&mut self, max_column_size: Option<usize>) -> &mut Self
pub fn max_column_size(&mut self, max_column_size: Option<usize>) -> &mut Self
Sets the maximum buffered column size, or None for unbuffered fetching.
Sourcepub fn log_statements(&mut self, level: LevelFilter) -> &mut Self
pub fn log_statements(&mut self, level: LevelFilter) -> &mut Self
Sets regular statement logging level.
Sourcepub fn log_slow_statements(
&mut self,
level: LevelFilter,
duration: Duration,
) -> &mut Self
pub fn log_slow_statements( &mut self, level: LevelFilter, duration: Duration, ) -> &mut Self
Sets slow statement logging level and threshold.
Sourcepub fn connect_blocking(&self) -> Result<OdbcConnection>
pub fn connect_blocking(&self) -> Result<OdbcConnection>
Opens a blocking ODBC connection.
The full SQLx async connection/executor API will be layered on top of this during the port.
Trait Implementations§
Source§impl Clone for OdbcConnectOptions
impl Clone for OdbcConnectOptions
Source§fn clone(&self) -> OdbcConnectOptions
fn clone(&self) -> OdbcConnectOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OdbcConnectOptions
impl ConnectOptions for OdbcConnectOptions
type Connection = OdbcConnection
Source§async fn connect(&self) -> Result<Self::Connection, Error>
async fn connect(&self) -> Result<Self::Connection, Error>
Establish a new database connection with the options specified by
self.Source§fn log_statements(self, level: LevelFilter) -> Self
fn log_statements(self, level: LevelFilter) -> Self
Log executed statements with the specified
levelSource§fn log_slow_statements(self, level: LevelFilter, duration: Duration) -> Self
fn log_slow_statements(self, level: LevelFilter, duration: Duration) -> Self
Log executed statements with a duration above the specified
duration
at the specified level.Source§fn to_url_lossy(&self) -> Url
fn to_url_lossy(&self) -> Url
Get a connection URL that may be used to connect to the same database as this
ConnectOptions. Read moreSource§fn disable_statement_logging(self) -> Self
fn disable_statement_logging(self) -> Self
Entirely disables statement logging (both slow and regular).
Source§impl Debug for OdbcConnectOptions
impl Debug for OdbcConnectOptions
Source§impl FromStr for OdbcConnectOptions
impl FromStr for OdbcConnectOptions
Source§impl<'a> TryFrom<&'a AnyConnectOptions> for OdbcConnectOptions
impl<'a> TryFrom<&'a AnyConnectOptions> for OdbcConnectOptions
Auto Trait Implementations§
impl Freeze for OdbcConnectOptions
impl RefUnwindSafe for OdbcConnectOptions
impl Send for OdbcConnectOptions
impl Sync for OdbcConnectOptions
impl Unpin for OdbcConnectOptions
impl UnsafeUnpin for OdbcConnectOptions
impl UnwindSafe for OdbcConnectOptions
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