NAME
Teng::Plugin::SearchJoined - Teng plugin for Joined query
SYNOPSIS
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) {
...
}
DESCRIPTION
Teng::Plugin::SearchJoined is a Plugin of Teng for joined query.
INTERFACE
Method
"$itr:Teng::Plugin::SearchJoined::Iterator = $db->search_joined($table, $join_conds, \%where, \%opts)"
$table, \%where and \%opts are same as arguments of Teng#search.
$join_conds is same as argument of SQL::Maker::Plugin::JoinSelect#join_select.
LICENSE
Copyright (C) Masayuki Matsuki.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Masayuki Matsuki <y.songmu@gmail.com>