From b165a254fda970c1adee3eb23d772c8f240537eb Mon Sep 17 00:00:00 2001 From: blankll Date: Sat, 3 Oct 2026 14:48:57 +0800 Subject: [PATCH 1/2] style(postgres): fix indentation in validate_privilege --- src-tauri/src/database/postgres.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src-tauri/src/database/postgres.rs b/src-tauri/src/database/postgres.rs index 55eca291..9f61e809 100644 --- a/src-tauri/src/database/postgres.rs +++ b/src-tauri/src/database/postgres.rs @@ -271,18 +271,18 @@ impl PostgresAdapter { .join(".")) } - fn validate_privilege(privilege: &str) -> DbResult { - const PRIVILEGES: &[&str] = &[ - "SELECT", - "INSERT", - "UPDATE", - "DELETE", - "TRUNCATE", - "REFERENCES", - "TRIGGER", - "ALL", - "ALL PRIVILEGES", - ]; + fn validate_privilege(privilege: &str) -> DbResult { + const PRIVILEGES: &[&str] = &[ + "SELECT", + "INSERT", + "UPDATE", + "DELETE", + "TRUNCATE", + "REFERENCES", + "TRIGGER", + "ALL", + "ALL PRIVILEGES", + ]; let mut validated = Vec::new(); for part in privilege.split(',') { let trimmed = part.trim().to_uppercase(); From 263618324313632b3eec594f1c8ea206412098f0 Mon Sep 17 00:00:00 2001 From: blankll Date: Sat, 3 Oct 2026 14:50:57 +0800 Subject: [PATCH 2/2] feat(duckdb): failure diagnosis, file create/open, read-only mode and faster JDBC connects DuckDB connection UX and transport work, four related streams: - Failure diagnosis: DuckDB connection failures are translated into an explanation with the fix attached (file lock held by another process or connection, instance-configuration conflict, storage-format incompatibility); the two lock cases offer retry-as-read-only inline in the connection form and connecting modal. probe_database_file reports the storage-format version and whether a sibling .wal is present. scripts/verify-duckdb-jdbc-urls.sh (+ Verify.java) records the JDBC URL semantics these decisions rely on. - Create/open database files from the connection form: editable file-based path field with New/Open native dialogs, inline explanation of what happens on connect (missing file, empty, read-only, folder, wrong engine), per-engine recent files, DuckDB File/In-Memory tabs with named in-memory instances (memory: