pub fn load_sql_dump<P: AsRef<Path>>(path: P) -> Result<Database, ExecutorError>Expand description
Load database from SQL dump file
Reads SQL dump, parses statements, and executes them to recreate database state. This is the shared implementation used by CLI, Python bindings, and other consumers.
§Arguments
path- Path to the SQL dump file
§Returns
A new Database instance with the loaded state
§Errors
Returns error if:
- File cannot be read
- File is not valid SQL dump format (e.g., binary SQLite file)
- SQL parsing fails
- Statement execution fails
§Example
let db = load_sql_dump("database.sql").unwrap();