Use ALL_TAB_COLUMNS that does not show hidden columns by default - #252
Conversation
fd2a325 to
ea28e73Compareea28e73 to
3759bfcCompareThere was a problem hiding this comment.
Pull request overview
This PR updates how %ROWTYPE field definitions are derived for table/view-backed record types by switching the data dictionary view used to read columns, with a new spec to ensure hidden columns created by functional indexes are excluded.
Changes:
- Replace
ALL_TAB_COLSwithALL_TAB_COLUMNSinget_field_definitionsfor table/view column discovery. - Add a regression spec that creates a functional index (which introduces a hidden column) and asserts hidden columns do not appear in
%ROWTYPEfields.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
lib/plsql/procedure.rb | Uses ALL_TAB_COLUMNS when building field metadata for TABLE/VIEW %ROWTYPE records to avoid hidden columns. |
spec/plsql/procedure_spec.rb | Adds a regression test ensuring hidden columns (e.g., SYS_NC...) are excluded from %ROWTYPE field definitions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Use ALL_TAB_COLUMNS instead of ALL_TAB_COLS in get_field_definitions to exclude hidden columns (e.g., those created by functional indexes). ALL_TAB_COLUMNS excludes hidden columns by default. Co-Authored-By: Jochen Schug <4573581+joschug@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
86d4b32 to
a2d1850CompareThere was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Summary
ALL_TAB_COLUMNSinstead ofALL_TAB_COLSinget_field_definitionsto exclude hidden columns (e.g., those created by functional indexes)ALL_TAB_COLUMNSexcludes hidden columns by default and is available in Oracle 11g and newerBased on #208
Test plan
testworkflow passes (Oracle 23c Free)test_11gworkflow passes (Oracle 11g XE)Co-Authored-By: Jochen Schug 4573581+joschug@users.noreply.github.com
Generated with Claude Code