Struct hdbconnect_impl::ConnectionConfiguration
source · pub struct ConnectionConfiguration { /* private fields */ }Implementations§
source§impl ConnectionConfiguration
impl ConnectionConfiguration
sourcepub const DEFAULT_FETCH_SIZE: u32 = 10_000u32
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().
sourcepub const DEFAULT_LOB_READ_LENGTH: u32 = 203_776u32
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().
sourcepub const DEFAULT_LOB_WRITE_LENGTH: u32 = 203_776u32
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().
sourcepub const MIN_BUFFER_SIZE: usize = 10_240usize
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.
sourcepub const DEFAULT_MAX_BUFFER_SIZE: usize = 204_800usize
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().
sourcepub const DEFAULT_MIN_COMPRESSION_SIZE: usize = 5_120usize
pub const DEFAULT_MIN_COMPRESSION_SIZE: usize = 5_120usize
Default value for the threshold size above which requests will be compressed.
sourcepub fn is_auto_commit(&self) -> bool
pub fn is_auto_commit(&self) -> bool
Returns whether the connection uses auto-commit.
sourcepub fn set_auto_commit(&mut self, ac: bool)
pub fn set_auto_commit(&mut self, ac: bool)
Defines whether the connection should use auto-commit.
sourcepub fn with_auto_commit(self, ac: bool) -> Self
pub fn with_auto_commit(self, ac: bool) -> Self
Builder-method for defining whether the connection should use auto-commit.
sourcepub fn fetch_size(&self) -> u32
pub fn fetch_size(&self) -> u32
Returns the connection’s fetch size.
sourcepub fn set_fetch_size(&mut self, fetch_size: u32)
pub fn set_fetch_size(&mut self, fetch_size: u32)
Sets the connection’s fetch size.
sourcepub fn with_fetch_size(self, fetch_size: u32) -> Self
pub fn with_fetch_size(self, fetch_size: u32) -> Self
Builder-method for setting the connection’s fetch size.
sourcepub fn lob_read_length(&self) -> u32
pub fn lob_read_length(&self) -> u32
Returns the connection’s lob read length.
sourcepub fn set_lob_read_length(&mut self, lob_read_length: u32)
pub fn set_lob_read_length(&mut self, lob_read_length: u32)
Sets the connection’s lob read length.
sourcepub fn with_lob_read_length(self, lob_read_length: u32) -> Self
pub fn with_lob_read_length(self, lob_read_length: u32) -> Self
Builder-method for setting the connection’s lob read length.
sourcepub fn lob_write_length(&self) -> u32
pub fn lob_write_length(&self) -> u32
Returns the connection’s lob write length.
sourcepub fn set_lob_write_length(&mut self, lob_write_length: u32)
pub fn set_lob_write_length(&mut self, lob_write_length: u32)
Sets the connection’s lob write length.
sourcepub fn with_lob_write_length(self, lob_write_length: u32) -> Self
pub fn with_lob_write_length(self, lob_write_length: u32) -> Self
Builder-method for setting the connection’s lob write length.
sourcepub fn max_buffer_size(&self) -> usize
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.
sourcepub fn set_max_buffer_size(&mut self, max_buffer_size: usize)
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.
sourcepub fn with_max_buffer_size(self, max_buffer_size: usize) -> Self
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.
sourcepub fn min_compression_size(&self) -> usize
pub fn min_compression_size(&self) -> usize
Returns the connection’s min compression size.
sourcepub fn set_min_compression_size(&mut self, min_compression_size: usize)
pub fn set_min_compression_size(&mut self, min_compression_size: usize)
Sets the connection’s min compression size.
sourcepub fn with_min_compression_size(self, min_compression_size: usize) -> Self
pub fn with_min_compression_size(self, min_compression_size: usize) -> Self
Builder-method for setting the connection’s min compression size.
Trait Implementations§
source§impl Clone for ConnectionConfiguration
impl Clone for ConnectionConfiguration
source§fn clone(&self) -> ConnectionConfiguration
fn clone(&self) -> ConnectionConfiguration
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more