pub fn connect_database(path: &str) -> Result<()>Expand description
Connects to an existing SQLite database.
This function establishes a connection to a given database file. It performs several checks:
- Ensures the database file exists.
- Verifies that the path points to a file, not a directory.
- Uses a retry mechanism for the connection.
- Performs an integrity check on the database upon successful connection.
§Arguments
path- The file path to the SQLite database.
§Returns
A Result which is Ok(()) on successful connection, or an Err with context if it fails.