The store's layout names live in the core: local::DB_FILE, BLOBS_DIR
"inkwell.db" and "blobs" were spelled out in the ffi and the desktop (whose copy of DB_FILE sat in the crossover shim). The layout is the core's, the same on every client, so the names are now core constants and both clients read them. DRY pass #2, batch 1, F4 (#5372). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,12 @@ use std::sync::Mutex;
|
||||
|
||||
use rusqlite::Connection;
|
||||
|
||||
/// The store's file inside a client's data directory. The layout is the same on
|
||||
/// every client, so a store is readable by any client that opens it.
|
||||
pub const DB_FILE: &str = "inkwell.db";
|
||||
/// Attachment bytes, filed by content hash, beside [`DB_FILE`].
|
||||
pub const BLOBS_DIR: &str = "blobs";
|
||||
|
||||
/// The shared database handle. rusqlite connections aren't `Sync`, so a `Mutex`
|
||||
/// serializes access — fine, since operations are quick and a client is single-user.
|
||||
/// How it is held is the caller's business: Tauri manages it as state, Android holds
|
||||
|
||||
Reference in New Issue
Block a user