Function repl_mode

Source
pub fn repl_mode(db_path: &str) -> Result<()>
Expand description

Starts the interactive SQL REPL session.

This is the main entry point for the REPL mode. It sets up the connection to the specified database, initializes the rustyline editor for user input, and enters a loop to read and process commands. It handles both interactive and non-interactive (piped) input.

§Arguments

  • db_path - The file path to the SQLite database.

§Returns

A Result which is Ok(()) when the REPL exits gracefully, or an Err with context if a critical error occurs that cannot be handled.