NAME
DBIO::Oracle::Introspect::ForeignKeys - Introspect Oracle foreign keys
VERSION
version 0.900007
DESCRIPTION
Fetches Oracle foreign key metadata via all_constraints and all_cons_columns. Includes deferrability information from all_constraints directly.
Foreign keys come in binary order by table and constraint name, in every session language (not by the NLS_SORT of the session).
A referential constraint has its own columns in all_cons_columns and names, in r_constraint_name, the primary or unique constraint it references; the columns of that one are the columns referenced. The two column lists are paired by position, so a foreign key over several columns comes back with each column next to the one it refers to, in the order of the constraint.
Every row is read by lower-case keys (fetchrow_hashref('NAME_lc')); DBD::Oracle reports column names in upper case.
METHODS
fetch
my $fks = DBIO::Oracle::Introspect::ForeignKeys->fetch($dbh, $schema, $tables);
Returns a hashref keyed by table name, each value an arrayref of FK hashrefs with: constraint_name, from_columns, to_table, to_columns, on_update, on_delete, is_deferrable. to_table is the bare name of a table of $schema and owner.table for one of another schema.
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.