Преглед на файлове

Correct SQLite connection pool size check

The max_size method was checking `password.is_none()` to determine the pool
size, but should check `path.is_none()` instead. An in-memory database (no
path) needs a single connection to avoid data loss, while file-backed databases
can use a larger pool.

Fixes #1604
Cesar Rodas преди 2 седмици
родител
ревизия
3136493a37
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      crates/cdk-sqlite/src/common.rs

+ 1 - 1
crates/cdk-sqlite/src/common.rs

@@ -22,7 +22,7 @@ impl pool::DatabaseConfig for Config {
     }
 
     fn max_size(&self) -> usize {
-        if self.password.is_none() {
+        if self.path.is_none() {
             1
         } else {
             20