NAME
DBIO::Sybase::Introspect::ForeignKeys - Introspect Sybase ASE foreign keys
VERSION
version 0.900007
DESCRIPTION
Fetches foreign key metadata from the ASE system catalog: sysreferences (one row per constraint, key columns as colids fokey1..16 / refkey1..16, resolved with col_name()), joined to sysobjects / sysusers for the owner of the referencing table. SAP ASE has no INFORMATION_SCHEMA views.
ASE has no declarative referential actions -- ON DELETE / ON UPDATE is a syntax error (Msg 156, ASE 16.0 SP02); a reference always restricts. Both rules are therefore reported as NO ACTION, which DBIO::Sybase::Diff::ForeignKey renders as no clause. A schema that declares any other action is refused by DBIO::Sybase::DDL, so the two sides of a deploy diff never disagree on one. References into another database (pmrydbname / frgndbname set) are skipped: their colids and table ids belong to that database's catalog.
METHODS
fetch
my $fks = DBIO::Sybase::Introspect::ForeignKeys->fetch($dbh, $schema, $tables);
Given the tables hashref from DBIO::Sybase::Introspect::Tables, returns a hashref keyed by table name. Each value is an arrayref of per-column rows (constraint_name, column_name, ref_table_name, ref_column_name, update_rule, delete_rule) in key order, which DBIO::Sybase::Introspect groups into one entry per constraint.
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.