Эх сурвалжийг харах

Correct SQLite connection pool size check (#1605)

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
C 2 долоо хоног өмнө
parent
commit
1a1b701bc5

+ 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