Skip to main content

init_url

Function init_url 

Source
pub async fn init_url(db_url: &str) -> Result<Pool>
Expand description

Open (creating if needed) the SQLite database at db_url, run schema creation, and return a connection pool.

db_url is a sqlx SQLite URL, e.g. sqlite://featherreader.db or sqlite::memory: for an ephemeral in-memory database. The file is created if it does not exist; WAL journaling is enabled for on-disk databases and foreign keys are enforced on every connection.