Teng::Plugin::SearchJoined - Teng plugin for Joined query
package MyDB; use parent qw/Teng/; __PACKAGE__->load_plugin('SearchJoined'); package main; my $db = MyDB->new(...); my $itr = $db->search_joined(user_item => [ user => {'user_item.user_id' => 'user.id'}, item => {'user_item.item_id' => 'item.id'}, ], { 'user.id' => 2, }, { order_by => 'user_item.item_id', }); while (my ($user_item, $user, $item) = $itr->next) { ... }
Teng::Plugin::SearchJoined is a Plugin of Teng for joined query.
$itr:Teng::Plugin::SearchJoined::Iterator = $db->search_joined($table, $join_conds, \%where, \%opts)
Return Teng::Plugin::SearchJoined::Iterator object.
$table, \%where and \%opts are same as arguments of Teng's search method.
$table
\%where
\%opts
search
$join_conds is same as argument of SQL::Maker::Plugin::JoinSelect's join_select method.
$join_conds
join_select
Teng
SQL::Maker::Plugin::JoinSelect
Copyright (C) Masayuki Matsuki.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Masayuki Matsuki <y.songmu@gmail.com>
To install Teng::Plugin::SearchJoined, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Teng::Plugin::SearchJoined
CPAN shell
perl -MCPAN -e shell install Teng::Plugin::SearchJoined
For more information on module installation, please visit the detailed CPAN module installation guide.