Skip to content

feat: support for key enumeration in the postgres store#359

Open
ashwin153 wants to merge 2 commits into
strawgate:mainfrom
ashwin153:main
Open

feat: support for key enumeration in the postgres store#359
ashwin153 wants to merge 2 commits into
strawgate:mainfrom
ashwin153:main

Conversation

@ashwin153
Copy link
Copy Markdown

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5fc119c4-4bb8-423f-9e1b-90aa2bdfb1e5

📥 Commits

Reviewing files that changed from the base of the PR and between d20ee4c and 19ff03b.

📒 Files selected for processing (2)
  • src/key_value/aio/stores/postgresql/store.py
  • tests/stores/postgresql/test_postgresql.py

Walkthrough

This PR extends the PostgreSQL key-value store with collection-level key enumeration. A new _get_collection_keys method retrieves all keys for a specified collection with optional pagination support, mirroring the existing _get_collection_names pagination pattern. The implementation runs a parameterized SQL query ordered by key and returns results as a string list. Five test cases validate the feature: empty collections, sorted key ordering, per-collection isolation, limit enforcement, and deletion reflection.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Requires human review: This pull request implements a new feature for key enumeration in the PostgreSQL store; because it introduces new database query logic and extends the store's interface, a human review is necessary.

Re-trigger cubic

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 1 file (changes from recent commits).

Auto-approved: This change adds a new read-only method to list keys in a PostgreSQL collection, following the same patterns as existing methods, with comprehensive tests covering edge cases, and does not alter any existing business logic or database schema.

Re-trigger cubic

@strawgate
Copy link
Copy Markdown
Owner

I'm happy to merge this but keep in mind that the AsyncKeyValue protocol does not expose key enumeration so this has limited utility in common use-cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants