line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package SQL::Abstract::FromQuery::Contains;
|
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
405
|
use strict;
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
27
|
|
4
|
1
|
|
|
1
|
|
3
|
use warnings;
|
|
1
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
18
|
|
5
|
1
|
|
|
1
|
|
367
|
use parent 'SQL::Abstract::FromQuery';
|
|
1
|
|
|
|
|
188
|
|
|
1
|
|
|
|
|
4
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# add a 'contains' rule into the grammar
|
9
|
|
|
|
|
|
|
{
|
10
|
1
|
|
|
1
|
|
39
|
use Regexp::Grammars;
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
return qr{
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
<[string]>+ %
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
<[string]>+ %
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
[,\s]+
|
26
|
|
|
|
|
|
|
}xms;
|
27
|
|
|
|
|
|
|
};
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
#======================================================================
|
31
|
|
|
|
|
|
|
# CLASS METHODS
|
32
|
|
|
|
|
|
|
#======================================================================
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub sub_grammar {
|
35
|
1
|
|
|
1
|
0
|
1
|
my $class = shift;
|
36
|
1
|
|
|
|
|
2
|
return ('SQL::Abstract::FromQuery::Contains');
|
37
|
|
|
|
|
|
|
}
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
#======================================================================
|
41
|
|
|
|
|
|
|
# ACTIONS HOOKED TO THE GRAMMAR
|
42
|
|
|
|
|
|
|
#======================================================================
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub contains {
|
45
|
1
|
|
|
1
|
0
|
20
|
my ($self, $h) = @_;
|
46
|
1
|
|
|
|
|
3
|
return {-contains => $h->{string}};
|
47
|
|
|
|
|
|
|
}
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub contains_any {
|
50
|
0
|
|
|
0
|
0
|
|
my ($self, $h) = @_;
|
51
|
0
|
|
|
|
|
|
return {-contains_any => $h->{string}};
|
52
|
|
|
|
|
|
|
}
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
#======================================================================
|
56
|
|
|
|
|
|
|
1; # End of SQL::Abstract::FromQuery::Contains
|
57
|
|
|
|
|
|
|
#======================================================================
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
__END__
|