pub struct ConnectionConfiguration { /* private fields */ }

Implementations§

source§

impl ConnectionConfiguration

source

pub const DEFAULT_FETCH_SIZE: u32 = 10_000u32

Default value for the number of resultset lines that are fetched with a single FETCH roundtrip.

The value can be changed at runtime with Connection::set_fetch_size().

source

pub const DEFAULT_LOB_READ_LENGTH: u32 = 203_776u32

Default value for the number of bytes (for BLOBS and CLOBS) or 1-2-3-byte sequences (for NCLOBS) that are fetched in a single LOB READ roundtrip.

The value can be changed at runtime with Connection::set_lob_read_length().

source

pub const DEFAULT_LOB_WRITE_LENGTH: u32 = 203_776u32

Default value for the number of bytes that are written in a single LOB WRITE roundtrip.

The value can be changed at runtime with Connection::set_lob_write_length().

source

pub const MIN_BUFFER_SIZE: usize = 10_240usize

Minimal buffer size.

Each connection maintains its own re-use buffer into which each outgoing request and each incoming reply is serialized.

The buffer is automatically increased when necessary to cope with large requests or replies. The default minimum buffer size is chosen to be sufficient for many usecases, to avoid buffer increases.

source

pub const DEFAULT_MAX_BUFFER_SIZE: usize = 204_800usize

Default value for the maximum buffer size.

A large request or response will enforce a corresponding enlargement of the connection’s buffer. Oversized buffers are not kept for the whole lifetime of the connection, but shrinked after use to the configured maximum buffer size.

The value can be changed at runtime with Connection::set_max_buffer_size().

source

pub const DEFAULT_MIN_COMPRESSION_SIZE: usize = 5_120usize

Default value for the threshold size above which requests will be compressed.

source

pub fn is_auto_commit(&self) -> bool

Returns whether the connection uses auto-commit.

source

pub fn set_auto_commit(&mut self, ac: bool)

Defines whether the connection should use auto-commit.

source

pub fn with_auto_commit(self, ac: bool) -> Self

Builder-method for defining whether the connection should use auto-commit.

source

pub fn fetch_size(&self) -> u32

Returns the connection’s fetch size.

source

pub fn set_fetch_size(&mut self, fetch_size: u32)

Sets the connection’s fetch size.

source

pub fn with_fetch_size(self, fetch_size: u32) -> Self

Builder-method for setting the connection’s fetch size.

source

pub fn lob_read_length(&self) -> u32

Returns the connection’s lob read length.

source

pub fn set_lob_read_length(&mut self, lob_read_length: u32)

Sets the connection’s lob read length.

source

pub fn with_lob_read_length(self, lob_read_length: u32) -> Self

Builder-method for setting the connection’s lob read length.

source

pub fn lob_write_length(&self) -> u32

Returns the connection’s lob write length.

source

pub fn set_lob_write_length(&mut self, lob_write_length: u32)

Sets the connection’s lob write length.

source

pub fn with_lob_write_length(self, lob_write_length: u32) -> Self

Builder-method for setting the connection’s lob write length.

source

pub fn max_buffer_size(&self) -> usize

Returns the connection’s max buffer size.

See also [ConnectionConfiguration::DEFAULT_MIN_BUFFER_SIZE] and ConnectionConfiguration::DEFAULT_MAX_BUFFER_SIZE.

source

pub fn set_max_buffer_size(&mut self, max_buffer_size: usize)

Sets the connection’s max buffer size.

See also [ConnectionConfiguration::DEFAULT_MIN_BUFFER_SIZE] and ConnectionConfiguration::DEFAULT_MAX_BUFFER_SIZE.

source

pub fn with_max_buffer_size(self, max_buffer_size: usize) -> Self

Builder-method for setting the connection’s max buffer size.

See also [ConnectionConfiguration::DEFAULT_MIN_BUFFER_SIZE] and ConnectionConfiguration::DEFAULT_MAX_BUFFER_SIZE.

source

pub fn min_compression_size(&self) -> usize

Returns the connection’s min compression size.

See ConnectionConfiguration::DEFAULT_MIN_COMPRESSION_SIZE.

source

pub fn set_min_compression_size(&mut self, min_compression_size: usize)

Sets the connection’s min compression size.

See ConnectionConfiguration::DEFAULT_MIN_COMPRESSION_SIZE.

source

pub fn with_min_compression_size(self, min_compression_size: usize) -> Self

Builder-method for setting the connection’s min compression size.

See ConnectionConfiguration::DEFAULT_MIN_COMPRESSION_SIZE.

Trait Implementations§

source§

impl Clone for ConnectionConfiguration

source§

fn clone(&self) -> ConnectionConfiguration

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ConnectionConfiguration

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ConnectionConfiguration

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V