line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Fey::SQL::Where; |
2
|
|
|
|
|
|
|
|
3
|
27
|
|
|
27
|
|
165
|
use strict; |
|
27
|
|
|
|
|
51
|
|
|
27
|
|
|
|
|
1289
|
|
4
|
27
|
|
|
27
|
|
158
|
use warnings; |
|
27
|
|
|
|
|
56
|
|
|
27
|
|
|
|
|
1167
|
|
5
|
27
|
|
|
27
|
|
154
|
use namespace::autoclean; |
|
27
|
|
|
|
|
51
|
|
|
27
|
|
|
|
|
258
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.43'; |
8
|
|
|
|
|
|
|
|
9
|
27
|
|
|
27
|
|
2779
|
use Fey::Types; |
|
27
|
|
|
|
|
64
|
|
|
27
|
|
|
|
|
241
|
|
10
|
|
|
|
|
|
|
|
11
|
27
|
|
|
27
|
|
2969
|
use Moose 2.1200; |
|
27
|
|
|
|
|
794
|
|
|
27
|
|
|
|
|
218
|
|
12
|
27
|
|
|
27
|
|
172408
|
use MooseX::SemiAffordanceAccessor 0.03; |
|
27
|
|
|
|
|
852
|
|
|
27
|
|
|
|
|
204
|
|
13
|
27
|
|
|
27
|
|
90608
|
use MooseX::StrictConstructor 0.13; |
|
27
|
|
|
|
|
753
|
|
|
27
|
|
|
|
|
191
|
|
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.43 |
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 |