pub struct DatabaseConfig {Show 13 fields
pub allow_create: bool,
pub sorted_duplicates: bool,
pub key_prefixing: bool,
pub temporary: bool,
pub transactional: bool,
pub read_only: bool,
pub node_max_entries: i32,
pub deferred_write: bool,
pub btree_comparator: Option<ConfigComparator>,
pub duplicate_comparator: Option<ConfigComparator>,
pub override_btree_comparator: bool,
pub override_duplicate_comparator: bool,
pub triggers: Vec<Arc<dyn Trigger>>,
}Expand description
Configuration for a database.
Fields§
§allow_create: boolAllow database creation if it doesn’t exist.
sorted_duplicates: boolEnable sorted duplicates.
key_prefixing: boolEnable key prefixing compression.
temporary: boolDatabase is temporary (not persisted).
transactional: boolDatabase operations are transactional.
read_only: boolDatabase is read-only.
node_max_entries: i32Maximum entries per node.
deferred_write: boolDeferred write: skip WAL logging; flush only at eviction/checkpoint.
btree_comparator: Option<ConfigComparator>User-supplied B-tree key comparator (DBI-14).
JE DatabaseImpl.btreeComparator. None = unsigned-byte order.
duplicate_comparator: Option<ConfigComparator>User-supplied duplicate-data comparator (DBI-14).
JE DatabaseImpl.duplicateComparator.
override_btree_comparator: boolJE DatabaseConfig.overrideBtreeComparator: replace a persisted
comparator instead of rejecting a mismatch.
override_duplicate_comparator: boolJE DatabaseConfig.overrideDuplicateComparator.
triggers: Vec<Arc<dyn Trigger>>User-supplied database / transaction triggers, fired in registration order (DB-TRIG).
JE DatabaseConfig.setTriggers / getTriggers (a List<Trigger>).
Runtime-registered only: not persisted, not replicated — see
crate::trigger.
Implementations§
Source§impl DatabaseConfig
impl DatabaseConfig
Sourcepub fn set_allow_create(&mut self, allow_create: bool) -> &mut Self
pub fn set_allow_create(&mut self, allow_create: bool) -> &mut Self
Sets the allow_create flag.
Sourcepub fn set_sorted_duplicates(&mut self, sorted_duplicates: bool) -> &mut Self
pub fn set_sorted_duplicates(&mut self, sorted_duplicates: bool) -> &mut Self
Sets the sorted_duplicates flag.
Sourcepub fn set_key_prefixing(&mut self, key_prefixing: bool) -> &mut Self
pub fn set_key_prefixing(&mut self, key_prefixing: bool) -> &mut Self
Sets the key_prefixing flag.
Sourcepub fn set_temporary(&mut self, temporary: bool) -> &mut Self
pub fn set_temporary(&mut self, temporary: bool) -> &mut Self
Sets the temporary flag.
Sourcepub fn set_transactional(&mut self, transactional: bool) -> &mut Self
pub fn set_transactional(&mut self, transactional: bool) -> &mut Self
Sets the transactional flag.
Sourcepub fn set_read_only(&mut self, read_only: bool) -> &mut Self
pub fn set_read_only(&mut self, read_only: bool) -> &mut Self
Sets the read_only flag.
Sourcepub fn set_node_max_entries(&mut self, max: i32) -> &mut Self
pub fn set_node_max_entries(&mut self, max: i32) -> &mut Self
Sets the maximum entries per node.
Sourcepub fn add_trigger(&mut self, trigger: Arc<dyn Trigger>) -> &mut Self
pub fn add_trigger(&mut self, trigger: Arc<dyn Trigger>) -> &mut Self
Appends a trigger to the registration list (DB-TRIG).
Triggers fire in the order they are added. JE
DatabaseConfig.setTriggers (Noxu allows incremental registration).
Trait Implementations§
Source§impl Clone for DatabaseConfig
impl Clone for DatabaseConfig
Source§fn clone(&self) -> DatabaseConfig
fn clone(&self) -> DatabaseConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more