connect

Function connect 

Source
pub async fn connect(config: &Config) -> Result<SqlitePool>
Expand description

Create a connection pool to the configured SQLite database.

  • Creates the database file and parent directories if they don’t exist.
  • Enables WAL journal mode for concurrent read/write.
  • Returns a pool with up to 5 connections.

§Arguments

  • config — Application configuration containing the database path.

§Errors

Returns an error if the database cannot be created or connected to.