Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/songmu/p5-teng-plugin-searchjoined
https://github.com/songmu/p5-teng-plugin-searchjoined
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/songmu/p5-teng-plugin-searchjoined
- Owner: Songmu
- License: other
- Created: 2013-06-24T13:08:02.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-04-15T06:26:31.000Z (over 9 years ago)
- Last Synced: 2024-10-11T21:09:29.758Z (3 months ago)
- Language: Perl
- Size: 297 KB
- Stars: 2
- Watchers: 3
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
# 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)`
Return [Teng::Plugin::SearchJoined::Iterator](http://search.cpan.org/perldoc?Teng::Plugin::SearchJoined::Iterator) object.
`$table`, `\%where` and `\%opts` are same as arguments of [Teng](http://search.cpan.org/perldoc?Teng)'s `search` method.
`$join_conds` is same as argument of [SQL::Maker::Plugin::JoinSelect](http://search.cpan.org/perldoc?SQL::Maker::Plugin::JoinSelect)'s `join_select` method.
# SEE ALSO
[Teng](http://search.cpan.org/perldoc?Teng)
[SQL::Maker::Plugin::JoinSelect](http://search.cpan.org/perldoc?SQL::Maker::Plugin::JoinSelect)
# 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