SQL::Abstract::Builder - Builds and executers relational queries
my @docs = query {"dbi:mysql:$db",$user} build { -columns => [qw(id foo bar)], -from => 'table1', -key => 'id', } include { -columns => [qw(id baz glarch)], -from => 'table2', -key => 'table1_id', } include { -columns => [qw(id alfa)], -from => 'table3', -key => 'table1_id', };
It gives you a very simple way to define fetch documents (rows and related children) from your relational DB (instead of just rows).
Executes the built query. Takes either a DBIx::Simple connection or the same arguments that are valid for DBIx::Simple-connect>.
DBIx::Simple-
my @docs = query {"dbi:mysql:$db",$user} ... # OR my @docs = query {$dbh} ...
Builds the query assuming the given table is the base.
my @refs = build { ... } ...
Includes the results of a JOIN on the given table when built.
JOIN
my @refs = build { ... } include { ... }
To install SQL::Abstract::Builder, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SQL::Abstract::Builder
CPAN shell
perl -MCPAN -e shell install SQL::Abstract::Builder
For more information on module installation, please visit the detailed CPAN module installation guide.