Skip to main content

connect

Function connect 

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

Connect to a SQLite database and return a connection pool.

The pool is configured with:

  • create_if_missing(true) โ€” the database file is created automatically
  • WAL journal mode โ€” better concurrent read performance
  • Foreign keys enabled โ€” referential integrity is enforced
  • Up to 8 concurrent connections

ยงExamples

let pool = atrg_db::connect("sqlite://atrg.db").await?;