[DRAFT] Add normalized FHIR query shape to SQL comments - #5795
Draft
Mikael Weaver (mikaelweave) wants to merge 3 commits into
Draft
[DRAFT] Add normalized FHIR query shape to SQL comments#5795Mikael Weaver (mikaelweave) wants to merge 3 commits into
Mikael Weaver (mikaelweave) wants to merge 3 commits into
Conversation
Build a bounded, value-free query shape in SearchOptionsFactory from the resolved search scope and accepted parameter names. Preserve modifiers, chains, controls, and repeated names; sort ordinally; replace unsupported names with a fixed marker; and sanitize comment-breaking content. Append the shape to existing SQL parameter-hash comments without changing query semantics or the custom-query hash, including SQL with multiple hash comments. Document the covered search path and add focused normalization, factory, SQL-generation, and hash-compatibility tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Calculate the existing custom-query hash before adding the value-free FHIR shape, pass parsed parameter names directly to normalization, and remove annotation parsing from the hash calculator. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a standalone value-free FHIR query comment when no parameter hash comment is generated, including query-plan reuse mode. Preserve custom-query hashing against the original unannotated SQL. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5795 +/- ##
==========================================
+ Coverage 78.94% 78.99% +0.04%
==========================================
Files 1016 1017 +1
Lines 36910 36945 +35
Branches 5616 5628 +12
==========================================
+ Hits 29139 29184 +45
+ Misses 6388 6379 -9
+ Partials 1383 1382 -1 🚀 New features to boost your workflow:
|
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.
Build a bounded, value-free query shape in SearchOptionsFactory from the resolved search scope and accepted parameter names. Preserve modifiers, chains, controls, and repeated names; sort ordinally; replace unsupported names with a fixed marker; and sanitize comment-breaking content.
Append the shape to existing SQL parameter-hash comments without changing query semantics or the custom-query hash, including SQL with multiple hash comments. Document the covered search path and add focused normalization, factory, SQL-generation, and hash-compatibility tests.
Description
Describe the changes in this PR.
Related issues
Addresses [issue #].
Testing
Describe how this change was tested.
FHIR Team Checklist
Semver Change (docs)
Patch|Skip|Feature|Breaking (reason)