line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Fey::SQL::Where; |
2
|
|
|
|
|
|
|
|
3
|
27
|
|
|
27
|
|
131
|
use strict; |
|
27
|
|
|
|
|
41
|
|
|
27
|
|
|
|
|
1090
|
|
4
|
27
|
|
|
27
|
|
129
|
use warnings; |
|
27
|
|
|
|
|
41
|
|
|
27
|
|
|
|
|
843
|
|
5
|
27
|
|
|
27
|
|
120
|
use namespace::autoclean; |
|
27
|
|
|
|
|
39
|
|
|
27
|
|
|
|
|
220
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.42'; |
8
|
|
|
|
|
|
|
|
9
|
27
|
|
|
27
|
|
2192
|
use Fey::Types; |
|
27
|
|
|
|
|
49
|
|
|
27
|
|
|
|
|
204
|
|
10
|
|
|
|
|
|
|
|
11
|
27
|
|
|
27
|
|
2565
|
use Moose 0.90; |
|
27
|
|
|
|
|
680
|
|
|
27
|
|
|
|
|
189
|
|
12
|
27
|
|
|
27
|
|
141418
|
use MooseX::SemiAffordanceAccessor 0.03; |
|
27
|
|
|
|
|
660
|
|
|
27
|
|
|
|
|
163
|
|
13
|
27
|
|
|
27
|
|
71484
|
use MooseX::StrictConstructor 0.07; |
|
27
|
|
|
|
|
539
|
|
|
27
|
|
|
|
|
165
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
with 'Fey::Role::SQL::HasWhereClause'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
with 'Fey::Role::SQL::HasBindParams' => { -excludes => 'bind_params' }; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
with 'Fey::Role::SQL::Cloneable'; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
__PACKAGE__->meta()->make_immutable(); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
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 |