Function initialize

Source
pub async fn initialize(
    db_path: impl AsRef<Path>,
    migrator: &Migrator,
) -> MicrosandboxResult<Pool<Sqlite>>
Expand description

Initializes a new SQLite database if it doesn’t already exist at the specified path.

§Arguments

  • db_path - Path where the SQLite database file should be created
  • migrator - SQLx migrator containing database schema migrations to run