NAME

Aniki::Plugin::SelectJoined - Support for Joined query

SYNOPSIS

    package MyDB;
    use Mouse v2.4.5;
    extends qw/Aniki/;
    with qw/Aniki::Plugin::SelectJoined/;

    package main;
    my $db = MyDB->new(...);

    my $result = $db->select_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',
    });

    for my $row ($result->all) {
        my $user_item = $row->user_item;
        my $user      = $row->user;
        my $item      = $row->item;

        ...
    }

SEE ALSO

Teng::Plugin::SelectJoined

SQL::Maker::Plugin::JoinSelect

LICENSE

Copyright (C) karupanerura.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

karupanerura <karupa@cpan.org>