| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Fey::Literal::String; |
|
2
|
|
|
|
|
|
|
|
|
3
|
28
|
|
|
28
|
|
143
|
use strict; |
|
|
28
|
|
|
|
|
46
|
|
|
|
28
|
|
|
|
|
1216
|
|
|
4
|
28
|
|
|
28
|
|
137
|
use warnings; |
|
|
28
|
|
|
|
|
42
|
|
|
|
28
|
|
|
|
|
883
|
|
|
5
|
28
|
|
|
28
|
|
141
|
use namespace::autoclean; |
|
|
28
|
|
|
|
|
41
|
|
|
|
28
|
|
|
|
|
237
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.43'; |
|
8
|
|
|
|
|
|
|
|
|
9
|
28
|
|
|
28
|
|
2682
|
use Fey::Types qw( Str ); |
|
|
28
|
|
|
|
|
997
|
|
|
|
28
|
|
|
|
|
226
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
28
|
|
|
28
|
|
126561
|
use Moose 2.1200; |
|
|
28
|
|
|
|
|
860
|
|
|
|
28
|
|
|
|
|
265
|
|
|
12
|
28
|
|
|
28
|
|
160733
|
use MooseX::SemiAffordanceAccessor 0.03; |
|
|
28
|
|
|
|
|
820
|
|
|
|
28
|
|
|
|
|
187
|
|
|
13
|
28
|
|
|
28
|
|
83057
|
use MooseX::StrictConstructor 0.13; |
|
|
28
|
|
|
|
|
652
|
|
|
|
28
|
|
|
|
|
179
|
|
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
with 'Fey::Role::Comparable', 'Fey::Role::Selectable', 'Fey::Role::IsLiteral'; |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has 'string' => ( |
|
18
|
|
|
|
|
|
|
is => 'ro', |
|
19
|
|
|
|
|
|
|
isa => Str, |
|
20
|
|
|
|
|
|
|
required => 1, |
|
21
|
|
|
|
|
|
|
); |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub BUILDARGS { |
|
24
|
83
|
|
|
83
|
1
|
159
|
my $class = shift; |
|
25
|
|
|
|
|
|
|
|
|
26
|
83
|
|
|
|
|
2370
|
return { string => shift }; |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
|
|
29
|
33
|
|
|
33
|
1
|
1446
|
sub sql { $_[1]->quote( $_[0]->string() ) } |
|
30
|
|
|
|
|
|
|
|
|
31
|
2
|
|
|
2
|
1
|
14
|
sub sql_with_alias { goto &sql } |
|
32
|
|
|
|
|
|
|
|
|
33
|
17
|
|
|
17
|
1
|
536
|
sub sql_or_alias { goto &sql } |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__PACKAGE__->meta()->make_immutable(); |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
# ABSTRACT: Represents a literal string in a SQL statement |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=pod |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 NAME |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Fey::Literal::String - Represents a literal string in a SQL statement |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 VERSION |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
version 0.43 |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
my $string = Fey::Literal::String->new($string) |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
This class represents a literal string in a SQL statement. |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 INHERITANCE |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This module is a subclass of C<Fey::Literal>. |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 METHODS |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
This class provides the following methods: |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head2 Fey::Literal::String->new($string) |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
This method creates a new C<Fey::Literal::String> object representing |
|
72
|
|
|
|
|
|
|
the string passed to the constructor. |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head2 $string->string() |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Returns the string as passed to the constructor. |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head2 $string->id() |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
The id for a string is always just the string itself. |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head2 $string->sql() |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 $string->sql_with_alias() |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head2 $string->sql_or_alias() |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Returns the appropriate SQL snippet. |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 ROLES |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
This class does the C<Fey::Role::Selectable> and |
|
93
|
|
|
|
|
|
|
C<Fey::Role::Comparable> roles. |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 BUGS |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
See L<Fey> for details on how to report bugs. |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 AUTHOR |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
This software is Copyright (c) 2011 - 2015 by Dave Rolsky. |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
This is free software, licensed under: |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=cut |