NAME

DBIO::Oracle::Introspect::Columns - Introspect Oracle columns

VERSION

version 0.900007

DESCRIPTION

Fetches Oracle column metadata via all_tab_columns and all_triggers. Handles Oracle-specific data types (NUMBER, CHAR, DATE, LOB, etc.) and detects sequences via trigger inspection. A GENERATED ... AS IDENTITY column (all_tab_columns.identity_column, Oracle 12c and later; older servers are not asked) is reported as is_auto_increment without a default_value: the "ISEQ$$_n".nextval Oracle shows as its default is the generator, not a default.

Two of the columns read are LONG: all_tab_columns.data_default and all_triggers.trigger_body. LongReadLen is raised for the duration of the fetch, as "view_definition" in DBIO::Oracle::Introspect does for all_views.text -- with DBI's default of 80 bytes any longer default or trigger body ends the fetch with ORA-24345. The handle's own setting is restored afterwards.

The sequence of an auto-increment column is recorded as schema.sequence, both spelled the way the server has them: a quoted name as written, a bare one in upper case. The column is found by the same rule, so a trigger on :new.id feeds the column ID, and one on :new."id" the column id.

Every row is read by lower-case keys (fetchrow_hashref('NAME_lc')); DBD::Oracle reports column names in upper case.

METHODS

fetch

my $columns = DBIO::Oracle::Introspect::Columns->fetch($dbh, $schema, $tables);

Given the tables hashref from DBIO::Oracle::Introspect::Tables, returns a hashref keyed by table name. Each value is an arrayref of column hashrefs in column_id order.

AUTHOR

DBIO & DBIx::Class Authors

COPYRIGHT AND LICENSE

Copyright (C) 2026 DBIO Authors Portions Copyright (C) 2005-2025 DBIx::Class Authors Based on DBIx::Class, heavily modified.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.