Skip to main content

resolve_engine_for_data_dir_from_env

Function resolve_engine_for_data_dir_from_env 

Source
pub fn resolve_engine_for_data_dir_from_env(
    data_dir: &Path,
) -> Result<Option<StorageEngine>, PortError>
Expand description

Resolves the engine for a particular data directory.

An explicit environment choice is always authoritative. With no choice, an existing store is opened as stamped; a fresh store prefers SQLite when this build ships it, otherwise it retains the pure-Rust redb fallback. This is intentionally data-dir-aware: returning SQLite blindly would make an upgraded binary refuse every existing redb store.