| SQL-DB documentation | view source | Contained in the SQL-DB distribution. |
SQL::DB::Schema::ARow - description
use SQL::DB::Schema::ARow;
SQL::DB::Schema::ARow is ...
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.
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.
Other
Mark Lawrence <nomad@null.net>
Copyright (C) 2007,2008 Mark Lawrence <nomad@null.net>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
| SQL-DB documentation | view source | Contained in the SQL-DB distribution. |