Skip to content

feat(vault): migrate VaultStore SELECT queries to squirrel (#1272)#1301

Draft
sid200727 wants to merge 2 commits intohyperledger-labs:mainfrom
sid200727:feat/vaultstore-squirrel-migration
Draft

feat(vault): migrate VaultStore SELECT queries to squirrel (#1272)#1301
sid200727 wants to merge 2 commits intohyperledger-labs:mainfrom
sid200727:feat/vaultstore-squirrel-migration

Conversation

@sid200727
Copy link
Copy Markdown
Contributor

Closes #1272

Migrates VaultStore SELECT queries from the legacy query builder to squirrel, following the same pattern as the SignerInfoStore migration (PR #1235).

Changes

-> platform/view/services/storage/driver/sql/query/pagination/squirrel.go - new ApplyToSquirrel helper that translates driver.Pagination into squirrel .Limit()/.Offset() calls
-> platform/fabric/services/db/driver/sql/common/vault.go - NewVaultStore now takes sq.PlaceholderFormat instead of PagInterpreter; all SELECT queries migrated to squirrel
-> platform/fabric/services/db/driver/sql/sqlite/vault.go - passes sq.Question
-> platform/fabric/services/db/driver/sql/postgres/vault.go - passes sq.Dollar

Design (per @mbrandenburger)

Built a squirrel-based ApplyToSquirrel helper in the pagination package rather than bypassing PagInterpreter entirely, preserving existing pagination semantics while removing the dependency on the legacy query builder.

All existing vault tests pass.

sid200727 and others added 2 commits April 25, 2026 08:46
…er-labs#1272)

Signed-off-by: Siddhi Khandelwal <siddhi.200727@gmail.com>
…warnings

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Siddhi Khandelwal <siddhi.200727@gmail.com>
@sid200727
Copy link
Copy Markdown
Contributor Author

sid200727 commented Apr 25, 2026

Hi @mbrandenburger ! PR #1301 is up for the VaultStore squirrel migration - lint and tests are clean. Would love your feedback whenever you get a chance. 🙏

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.

Migrate VaultStore to squirrel

1 participant