| 1 | package Fey::SQL::Where; | ||
| 2 | |||
| 3 | 26 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 26 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 26 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 26 | our $VERSION = '0.42'; | |
| 8 | |||
| 9 | 26 | ▶ | use Fey::Types; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 26 | ▶ | use Moose 0.90; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 26 | ▶ | use MooseX::SemiAffordanceAccessor 0.03; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 26 | ▶ | use MooseX::StrictConstructor 0.07; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | |||
| 15 | 26 | with 'Fey::Role::SQL::HasWhereClause'; | |
| 16 | |||
| 17 | 26 | with 'Fey::Role::SQL::HasBindParams' => { -excludes => 'bind_params' }; | |
| 18 | |||
| 19 | 26 | with 'Fey::Role::SQL::Cloneable'; | |
| 20 | |||
| 21 | 26 | __PACKAGE__->meta()->make_immutable(); | |
| 22 | |||
| 23 | 26 | 1; | |
| 24 | |||
| 25 | # ABSTRACT: Represents a "stand-alone" WHERE clause | ||
| 26 | |||
| 27 | __END__ | ||
| 28 | |||
| 29 | =pod | ||
| 30 | |||
| 31 | =head1 NAME | ||
| 32 | |||
| 33 | Fey::SQL::Where - Represents a "stand-alone" WHERE clause | ||
| 34 | |||
| 35 | =head1 VERSION | ||
| 36 | |||
| 37 | version 0.42 | ||
| 38 | |||
| 39 | =head1 SYNOPSIS | ||
| 40 | |||
| 41 | my $sql = Fey::SQL->new( dbh => $dbh ); | ||
| 42 | |||
| 43 | # WHERE Machine.machine_id = 2 | ||
| 44 | $sql->where( $machine_id, '=', 2 ); | ||
| 45 | |||
| 46 | =head1 DESCRIPTION | ||
| 47 | |||
| 48 | This class represents a stand-alone C<WHERE> clause. This allows you | ||
| 49 | pass a condition as part of an outer join. | ||
| 50 | |||
| 51 | =head1 METHODS | ||
| 52 | |||
| 53 | This class provides the following methods: | ||
| 54 | |||
| 55 | =head2 Constructor | ||
| 56 | |||
| 57 | To construct an object of this class, call C<< $query->where() >> on | ||
| 58 | a C<Fey::SQL> object. | ||
| 59 | |||
| 60 | =head2 $where->where() | ||
| 61 | |||
| 62 | See the L<Fey::SQL section on WHERE Clauses|Fey::SQL/WHERE Clauses> | ||
| 63 | for more details. | ||
| 64 | |||
| 65 | =head2 $where->bind_params() | ||
| 66 | |||
| 67 | See the L<Fey::SQL section on Bind Parameters|Fey::SQL/Bind | ||
| 68 | Parameters> for more details. | ||
| 69 | |||
| 70 | =head1 ROLES | ||
| 71 | |||
| 72 | This class does C<Fey::Role::SQL::HasWhereClause> role. | ||
| 73 | |||
| 74 | =head1 BUGS | ||
| 75 | |||
| 76 | See L<Fey> for details on how to report bugs. | ||
| 77 | |||
| 78 | =head1 AUTHOR | ||
| 79 | |||
| 80 | Dave Rolsky <autarch@urth.org> | ||
| 81 | |||
| 82 | =head1 COPYRIGHT AND LICENSE | ||
| 83 | |||
| 84 | This software is Copyright (c) 2011 - 2015 by Dave Rolsky. | ||
| 85 | |||
| 86 | This is free software, licensed under: | ||
| 87 | |||
| 88 | The Artistic License 2.0 (GPL Compatible) | ||
| 89 | |||
| 90 | =cut | ||