NAME
DBIO::Sybase::Introspect::Indexes - Introspect Sybase ASE indexes
VERSION
version 0.900007
DESCRIPTION
Fetches index metadata from the ASE system catalog: sysindexes (joined to sysobjects / sysusers for the owner), with the key columns read through index_col(). SAP ASE has no INFORMATION_SCHEMA views.
METHODS
fetch
my $indexes = DBIO::Sybase::Introspect::Indexes->fetch($dbh, $schema, $tables);
Given the tables hashref from DBIO::Sybase::Introspect::Tables, returns a hashref keyed by table name. Each value is a hashref of index hashrefs keyed by index name: index_name, is_unique (status & 2), columns (key order), and origin => 'pk' for the index backing a PRIMARY KEY constraint (status & 2048).
That PK index carries a server-generated name (artist_5760020521) that differs between two deployments of the same DDL; the origin marker is what lets DBIO::Sybase::Diff::Index leave it out of the name-keyed comparison.
Only real indexes are read (indid 1..250): 0 is the heap and 255 the text/image chain. index_col() returns NULL past the last key column -- keycnt is not the column count, it includes the row id on nonclustered indexes -- so the keys are read up to the first NULL, for the 31 columns an ASE index can have at most.
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.