From 122643c630d51ccc77b08f1f94a940b19ef0573b Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Thu, 21 Nov 2024 16:43:54 -0800 Subject: [PATCH] feat: use data file as db in .cache --- shell.nix | 2 +- src/state.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shell.nix b/shell.nix index 9a78f96..0f57cae 100644 --- a/shell.nix +++ b/shell.nix @@ -16,5 +16,5 @@ mkShell rec { sqlite ] ++ additionalBuildInputs; LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs; - DATABASE_URL = "sqlite:testing.db"; + DATABASE_URL = "sqlite://.cache/data"; } diff --git a/src/state.rs b/src/state.rs index 903efd1..b6d4400 100644 --- a/src/state.rs +++ b/src/state.rs @@ -55,7 +55,7 @@ impl AppState { pub fn new() -> Self { Self { pool: SqlitePool::connect_lazy_with( - SqliteConnectOptions::from_str("sqlite:testing.db") + SqliteConnectOptions::from_str("sqlite://.cache/data") .expect("Invalid Database String"), ), }