SQL::DB::Schema::ARow - description


SQL-DB documentation  | view source Contained in the SQL-DB distribution.

Index


NAME

Top

SQL::DB::Schema::ARow - description

SYNOPSIS

Top

  use SQL::DB::Schema::ARow;

DESCRIPTION

Top

SQL::DB::Schema::ARow is ...

METHODS

Top

new

_table

_table_name

_alias

_columns

_column_names

_join($arow)

This method takes another SQL::DB::Schema::ARow object and returns an SQL::DB::Expr expression suitable for JOINing the two tables together based on their foreign key relationships. Eg:

    $db->fetch(
        select    => [$arow1->_columns],
        from      => $arow,
        left_join => $arow2,
        on        => $arow1->_join($arow2),
    );

Be aware that if there is no direct foreign key relationship between the two 'undef' will be returned and the SQL generated in this example would be invalid, producing a DBI/DBD error.

_join_columns($arow)

This method takes another SQL::DB::Schema::ARow object and returns the names of the columns of the calling object that would be used for a join. An empty list is returned if there is no foreign key relationship between the two tables.

FILES

Top

SEE ALSO

Top

Other

AUTHOR

Top

Mark Lawrence <nomad@null.net>

COPYRIGHT AND LICENSE

Top


SQL-DB documentation  | view source Contained in the SQL-DB distribution.