Skip to content

fix(vscode): fold unquoted HANA identifiers to uppercase in runtime name resolution#193

Merged
jung-thomas merged 2 commits into
mainfrom
fix/runtime-name-case-folding
Jul 15, 2026
Merged

fix(vscode): fold unquoted HANA identifiers to uppercase in runtime name resolution#193
jung-thomas merged 2 commits into
mainfrom
fix/runtime-name-case-folding

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

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/.hdbview DDL, so:

  • File DDL: VIEW star_wars_eyeColors AS ...
  • Deployed runtime name: STAR_WARS_EYECOLORS
  • We were injecting star_wars_eyeColorsno 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 separate normalizeJsonName that preserves case — those are literal config object names, not SQL DDL identifiers. The filename fallback uppercases the local object part while keeping the .hdinamespace prefix verbatim (namespace prefixes are case-sensitive reverse-DNS).

Verification

Verified against a live HDI container (via hana-cli SQL) — the resolver output now matches the actually-deployed names:

Design-time file DDL identifier Resolver output Live DB name
cds.outbox.Messages.hdbtable cds_outbox_Messages CDS_OUTBOX_MESSAGES CDS_OUTBOX_MESSAGES
star.wars.eyeColors.hdbview star_wars_eyeColors STAR_WARS_EYECOLORS STAR_WARS_EYECOLORS
star.wars.CloneWarsChronologicalOrder.hdbview star_wars_... STAR_WARS_CLONEWARS... matches ✅

23 unit tests pass (added the eyeColors regression + case-fold cases; DDL→uppercase, quoted→preserved, JSON→preserved, fallback→uppercase local part).

Same environmental caveat as #192: the @vscode/test-electron harness can't launch in this sandbox (exit 9); the resolver is pure and covered by direct-mocha runs plus the live-DB check above.

Packaging

Bumped 0.1.100.1.11, repackaged via npm run package.

…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.
@jung-thomas jung-thomas merged commit a2c3c65 into main Jul 15, 2026
17 checks passed
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.

1 participant