line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package SQL::Abstract::FromQuery::Contains;
|
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
692
|
use strict;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
5
|
1
|
|
|
1
|
|
5
|
use parent 'SQL::Abstract::FromQuery';
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# add a 'contains' rule into the grammar
|
9
|
|
|
|
|
|
|
{
|
10
|
1
|
|
|
1
|
|
69
|
use Regexp::Grammars;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
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
|
3
|
my $class = shift;
|
36
|
1
|
|
|
|
|
4
|
return ('SQL::Abstract::FromQuery::Contains');
|
37
|
|
|
|
|
|
|
}
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
#======================================================================
|
41
|
|
|
|
|
|
|
# ACTIONS HOOKED TO THE GRAMMAR
|
42
|
|
|
|
|
|
|
#======================================================================
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub contains {
|
45
|
1
|
|
|
1
|
0
|
52
|
my ($self, $h) = @_;
|
46
|
1
|
|
|
|
|
5
|
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__
|