Skip to main content

init_sqlite_pool

Function init_sqlite_pool 

Source
pub async fn init_sqlite_pool(db_path: PathBuf) -> Result<SqlitePool, String>
Expand description

Initialize a SQLite connection pool with standard options

This helper:

  1. Creates parent directories if they don’t exist
  2. Enables create_if_missing for the database
  3. Disables statement logging
  4. Returns a ready-to-use connection pool

§Arguments

  • db_path - Path to the SQLite database file

§Errors

Returns an error if directory creation or database connection fails