pub struct Config {
pub path: Option<PathBuf>,
pub memory_limit: Option<usize>,
pub spill_path: Option<PathBuf>,
pub threads: usize,
pub wal_enabled: bool,
pub wal_flush_interval_ms: u64,
pub backward_edges: bool,
pub query_logging: bool,
}Expand description
Database configuration.
Fields§
§path: Option<PathBuf>Path to the database directory (None for in-memory only).
memory_limit: Option<usize>Memory limit in bytes (None for unlimited).
spill_path: Option<PathBuf>Path for spilling data to disk under memory pressure.
threads: usizeNumber of worker threads for query execution.
wal_enabled: boolWhether to enable WAL for durability.
wal_flush_interval_ms: u64WAL flush interval in milliseconds.
backward_edges: boolWhether to maintain backward edges.
query_logging: boolWhether to enable query logging.
Implementations§
Source§impl Config
impl Config
Sourcepub fn persistent(path: impl Into<PathBuf>) -> Self
pub fn persistent(path: impl Into<PathBuf>) -> Self
Creates a new configuration for a persistent database.
Sourcepub fn with_memory_limit(self, limit: usize) -> Self
pub fn with_memory_limit(self, limit: usize) -> Self
Sets the memory limit.
Sourcepub fn with_threads(self, threads: usize) -> Self
pub fn with_threads(self, threads: usize) -> Self
Sets the number of worker threads.
Sourcepub fn without_backward_edges(self) -> Self
pub fn without_backward_edges(self) -> Self
Disables backward edges.
Sourcepub fn with_query_logging(self) -> Self
pub fn with_query_logging(self) -> Self
Enables query logging.
Sourcepub fn with_memory_fraction(self, fraction: f64) -> Self
pub fn with_memory_fraction(self, fraction: f64) -> Self
Sets the memory budget as a fraction of system RAM.
Sourcepub fn with_spill_path(self, path: impl Into<PathBuf>) -> Self
pub fn with_spill_path(self, path: impl Into<PathBuf>) -> Self
Sets the spill directory for out-of-core processing.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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