Use ALL_TAB_COLUMNS that does not show hidden columns by default#252
Merged
yahonda merged 1 commit intorsim:masterfrom Apr 13, 2026
Merged
Use ALL_TAB_COLUMNS that does not show hidden columns by default#252yahonda merged 1 commit intorsim:masterfrom
yahonda merged 1 commit intorsim:masterfrom
Conversation
fd2a325 to
ea28e73
Compare
ea28e73 to
3759bfc
Compare
There 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.
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
a2d1850
Compare
There 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.
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.
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