DBIO-Oracle

 view release on metacpan or  search on metacpan

lib/DBIO/Oracle/Diff/Index.pm  view on Meta::CPAN


  if ($self->action eq 'create') {
    my $unique = $info->{is_unique} ? 'UNIQUE ' : '';
    return sprintf 'CREATE %sINDEX %s ON %s (%s);',
      $unique, $idx, $tbl, $cols;
  }

  if ($self->action eq 'drop') {
    return sprintf 'DROP INDEX %s;', $idx;
  }
}


sub summary {
  my ($self) = @_;
  return sprintf '  %sindex: %s on %s',
    $self->summary_prefix, $self->index_name, $self->table_name;
}

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

DBIO::Oracle::Diff::Index - Diff operations for Oracle indexes

=head1 VERSION

version 0.900000

=head1 DESCRIPTION

Index-level diff operations for Oracle.

=head1 ATTRIBUTES

=head2 index_name

The bare index name.

=head2 table_name

The bare table name the index belongs to.

=head2 index_info

Hashref of index metadata: C<is_unique>, C<columns>.

=head1 METHODS

=head2 diff

    my @ops = DBIO::Oracle::Diff::Index->diff($source, $target);

Walks tables present in B<both> C<$source> and C<$target> (C<scope = both>).
Source-only tables have their indexes cascaded by the table drop, so they
are not walked here; brand-new tables inline their indexes in the CREATE
TABLE statement emitted by L<DBIO::Oracle::Diff::Table>, so target-only
tables are skipped too.

=head2 as_sql

=head2 summary

=head1 AUTHOR

DBIO & DBIx::Class Authors

=head1 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.

=cut



( run in 2.190 seconds using v1.01-cache-2.11-cpan-7fcb06a456a )