fix(checkpoint-sqlite): harden (#6565)

harden
This commit is contained in:
Eugene Yurtsev
2025-12-09 16:47:55 -05:00
committed by GitHub
parent 02965fb5f5
commit 297242913f
7 changed files with 422 additions and 100 deletions
@@ -329,8 +329,9 @@ class SqliteSaver(BaseCheckpointSaver[str]):
FROM checkpoints
{where}
ORDER BY checkpoint_id DESC"""
if limit:
query += f" LIMIT {limit}"
if limit is not None:
query += " LIMIT ?"
param_values = (*param_values, limit)
with self.cursor(transaction=False) as cur, closing(self.conn.cursor()) as wcur:
cur.execute(query, param_values)
for (