Skip to main content

open

Function open 

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

Opens db_url and applies the migrations.

  • file:./data/auth.db or a bare path: a local file, parent folders created
  • :memory:: ephemeral
  • libsql://…, http://…, https://…: remote Turso, authenticated by PACENOTES_DB_AUTH_TOKEN, an environment variable so it stays out of the process list