The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DB::Introspector::Util::RelInspect

SYNOPSIS

 use DB::Introspector::Util::RelInspect;

 my @paths = DB::Introspector::Util::RelInspect
             ->find_mapped_paths_between_tables( $parent_table, $child_table );
     

DESCRIPTION

DB::Introspector::Util::RelInspect is a utility class that contains methods that deal with relationship traversal.

METHODS

find_paths_between_tables($table_1, $table_2, $option_stop_at_first_contact)

    Params:

      $table_1 - the first element of each path DB::Introspector::Base::Table

      $table_2 - the last element of each path DB::Introspector::Base::Table

      $option_stop_at_first_contact (1|0) - stop once the destination table ($table_2) has been encountered, rather than continuing to find paths from the destination back to the destination

    Returns: (\@) of DB::Introspector::ForeignKeyPath instances. All paths between $parent_table and $child_table.

find_mapped_paths_between_tables($parent_table, $child_table)

    Params:

      $parent_table - the first element of each path

      $child_table - the last element of each path

    Returns: (\@) of DB::Introspector::MappedPath instances. All paths between $parent_table and $child_table where $child_table depends on $parent_table, even indirectly.

SEE ALSO

AUTHOR

Masahji C. Stewart

COPYRIGHT

The DB::Introspector::Util::RelInspect module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.