fix(vscode): fold unquoted HANA identifiers to uppercase in runtime name resolution#193
Merged
Merged
Conversation
…ame resolution HANA folds unquoted SQL identifiers to UPPERCASE at deploy time; only double-quoted identifiers keep their authored case. CAP emits unquoted names in .hdbtable/.hdbview DDL, so e.g. star_wars_eyeColors deploys as STAR_WARS_EYECOLORS. The resolver was preserving file case, injecting star_wars_eyeColors which found no match. DDL names now uppercase unless quoted. JSON config names (synonym/role/ sequence) preserve case as authored. Fallback uppercases the local object part while keeping the .hdinamespace prefix verbatim. Verified against a live HDI container.
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.
Problem
Follow-up to #192. The artifact inspectors resolved the runtime object name from the design-time file's DDL but preserved the file's case. HANA folds unquoted SQL identifiers to UPPERCASE at deploy time — only double-quoted identifiers keep their authored case. CAP emits unquoted names in
.hdbtable/.hdbviewDDL, so:VIEW star_wars_eyeColors AS ...STAR_WARS_EYECOLORSstar_wars_eyeColors→ no match in the inspector.Fix
normalizeIdentifier(DDL path) now folds unquoted names to uppercase and preserves case only for"quoted"identifiers. JSON config names (synonym/role/sequence) go through a separatenormalizeJsonNamethat preserves case — those are literal config object names, not SQL DDL identifiers. The filename fallback uppercases the local object part while keeping the.hdinamespaceprefix verbatim (namespace prefixes are case-sensitive reverse-DNS).Verification
Verified against a live HDI container (via
hana-cliSQL) — the resolver output now matches the actually-deployed names:cds.outbox.Messages.hdbtablecds_outbox_MessagesCDS_OUTBOX_MESSAGESCDS_OUTBOX_MESSAGES✅star.wars.eyeColors.hdbviewstar_wars_eyeColorsSTAR_WARS_EYECOLORSSTAR_WARS_EYECOLORS✅star.wars.CloneWarsChronologicalOrder.hdbviewstar_wars_...STAR_WARS_CLONEWARS...23 unit tests pass (added the
eyeColorsregression + case-fold cases; DDL→uppercase, quoted→preserved, JSON→preserved, fallback→uppercase local part).Packaging
Bumped
0.1.10→0.1.11, repackaged vianpm run package.