NAME

Aniki::Plugin::RangeConditionMaker - range condition maker

SYNOPSIS

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

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

    my $where = $db->make_range_condition({ upper => { id => 10 } });
    # => { id => { '<' => 10 } }
    $where = $db->make_range_condition({ lower => { id => 0 } });
    # => { id => { '>' =>  0 } }
    $where = $db->make_range_condition({ le => { id => 10 } });
    # => { id => { '<=' =>  10 } }
    $where = $db->make_range_condition({ ge => { id => 0 } });
    # => { id => { '>=' =>  0 } }
    $where = $db->make_range_condition({ upper => { id => 10 }, lower => { id => 0 } });
    # => { id => [-and => { '>' => 0 }, { '<' => 10 }] }

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>