feat(vault): migrate VaultStore SELECT queries to squirrel (#1272)#1301
Draft
sid200727 wants to merge 2 commits intohyperledger-labs:mainfrom
Draft
feat(vault): migrate VaultStore SELECT queries to squirrel (#1272)#1301sid200727 wants to merge 2 commits intohyperledger-labs:mainfrom
sid200727 wants to merge 2 commits intohyperledger-labs:mainfrom
Conversation
…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>
Contributor
Author
|
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. 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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- newApplyToSquirrelhelper that translatesdriver.Paginationinto squirrel.Limit()/.Offset()calls->
platform/fabric/services/db/driver/sql/common/vault.go-NewVaultStorenow takessq.PlaceholderFormatinstead ofPagInterpreter; all SELECT queries migrated to squirrel->
platform/fabric/services/db/driver/sql/sqlite/vault.go- passessq.Question->
platform/fabric/services/db/driver/sql/postgres/vault.go- passessq.DollarDesign (per @mbrandenburger)
Built a squirrel-based
ApplyToSquirrelhelper in the pagination package rather than bypassingPagInterpreterentirely, preserving existing pagination semantics while removing the dependency on the legacy query builder.All existing vault tests pass.