[PR #578] [MERGED] fix(checkpoint-postgres): fix WHERE clause generation on list #865

Closed
opened 2026-02-15 19:16:11 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraphjs/pull/578
Author: @benjamincburns
Created: 10/10/2024
Status: Merged
Merged: 10/17/2024
Merged by: @jacoblee93

Base: mainHead: fix-postgressaver-where-clause


📝 Commits (2)

  • e516064 fix(checkpoint-postgres): fix WHERE clause generation on list
  • f04c735 Format

📊 Changes

1 file changed (+15 additions, -12 deletions)

View changed files

📝 libs/checkpoint-postgres/src/index.ts (+15 -12)

📄 Description

Found while working on #541. Prior to this change, if you called the list method in PostgresSaver with an empty configurable object (e.g. saver.list({ configurable: {} })), you'd get back no results. This was due to a small error in the branching logic for building up the WHERE clause that is used to query for checkpoints.

Also, like in #576, I noticed that the LIMIT clause was being directly concatenated into the query without sanitization (a potential SQL injection vulnerability), so I went ahead and fixed that in this commit as well.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/langgraphjs/pull/578 **Author:** [@benjamincburns](https://github.com/benjamincburns) **Created:** 10/10/2024 **Status:** ✅ Merged **Merged:** 10/17/2024 **Merged by:** [@jacoblee93](https://github.com/jacoblee93) **Base:** `main` ← **Head:** `fix-postgressaver-where-clause` --- ### 📝 Commits (2) - [`e516064`](https://github.com/langchain-ai/langgraphjs/commit/e516064480923075728390e2764ae19dd0a02da6) fix(checkpoint-postgres): fix WHERE clause generation on list - [`f04c735`](https://github.com/langchain-ai/langgraphjs/commit/f04c7352d35b1da4874cc9b871545f13a27f1bfc) Format ### 📊 Changes **1 file changed** (+15 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `libs/checkpoint-postgres/src/index.ts` (+15 -12) </details> ### 📄 Description Found while working on #541. Prior to this change, if you called the `list` method in `PostgresSaver` with an empty `configurable` object (e.g. `saver.list({ configurable: {} })`), you'd get back no results. This was due to a small error in the branching logic for building up the `WHERE` clause that is used to query for checkpoints. Also, like in #576, I noticed that the `LIMIT` clause was being directly concatenated into the query without sanitization (a potential SQL injection vulnerability), so I went ahead and fixed that in this commit as well. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 19:16:11 -05:00
yindo closed this issue 2026-02-15 19:16:11 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#865