pub struct KineticaPoolOptions /* private fields */ Implementations
Source
pub fn max_connections(self, max: u32) -> Self
Set the maximum number of connections in the pool (default: 10).
Source
pub fn min_connections(self, min: u32) -> Self
Set the minimum number of connections to maintain (default: 0).
Source
pub fn acquire_timeout(self, timeout: Duration) -> Self
Set the timeout for acquiring a connection from the pool (default: 30s).
Source
pub fn idle_timeout(self, timeout: Option<Duration>) -> Self
Set the idle timeout for connections (default: 600s). Set to None to disable idle timeout.
Source
pub fn max_lifetime(self, lifetime: Option<Duration>) -> Self
Set the maximum lifetime of connections (default: 1800s). Set to None to disable max lifetime.
Source
pub fn connection_url(&self) -> String
Build the connection URL string.
Source
pub fn connect_options(&self) -> Result<PgConnectOptions, SqlxError>
Build PgConnectOptions from the current settings.
Source
pub async fn connect(&self) -> Result<KineticaPool, SqlxError>
Connect and create a connection pool.
Trait Implementations
Source
impl Clone for KineticaPoolOptions
Source
fn clone(&self) -> KineticaPoolOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource