NAME
DBIO::DuckDB::Introspect::Indexes - Introspect DuckDB indexes
VERSION
version 0.900000
DESCRIPTION
Fetches index metadata via the duckdb_indexes() system view. Each entry captures index_name, is_unique, and the raw sql of the CREATE INDEX statement. Column list is parsed out of the SQL when possible.
Auto-generated indexes backing PRIMARY KEY and UNIQUE constraints are omitted -- they belong to the table, not to explicit CREATE INDEX.
METHODS
fetch
my $indexes = DBIO::DuckDB::Introspect::Indexes->fetch($dbh, $schema, $tables);
my $indexes = DBIO::DuckDB::Introspect::Indexes->fetch($dbh, $schema, $tables, $catalog);
Returns a hashref keyed by table name, each value a hashref keyed by index name with: index_name, is_unique, columns (arrayref), sql, origin, partial.
When $catalog is defined, AND database_name = ? is added to the duckdb_indexes() query.
AUTHOR
DBIO Authors
COPYRIGHT AND LICENSE
Copyright (C) 2026 DBIO Authors
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.