SQLEngine/Criteria/LiteralSQL.pm

filter: Statementstmt 100% 9 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 100% 2 / 2 totaltotal 100% 14 / 14 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
new
1.0
sql_where
1.0
CRAP 1.0
« SQLEngine/Criteria/Lesser.pm ↑ Summary SQLEngine/Criteria/Or.pm »
1 package DBIx::SQLEngine::Criteria::LiteralSQL;
2  
3 2 @ISA = 'DBIx::SQLEngine::Criteria';
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 ########################################################################
7  
8 5 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
9 5 my $package = shift;
10 5 bless [ @_ ], $package;
11 }
12  
13 ########################################################################
14  
15 5 ▶sub sql_where {
Subroutine sql_where: called CC=1 SCAR=0.0
Pod documented
16 5 my $self = shift;
17 5 @$self;
18 }
19  
20 ########################################################################
21  
22 2 1;
23  
24 ########################################################################
25  
26 ########################################################################
27  
28 =head1 NAME
29  
30 DBIx::SQLEngine::Criteria::LiteralSQL - Criteria with SQL snippets
31  
32  
33 =head1 SYNOPSIS
34  
35 my $crit = DBIx::SQLEngine::Criteria::LiteralSQL->new( "name = 'Dave'" );
36  
37  
38 =head1 DESCRIPTION
39  
40 DBIx::SQLEngine::Criteria::LiteralSQL objects are built around an
41 array of a SQL string, followed by values to be bound the the '?'
42 placeholders in the string, if any.
43  
44 =cut
45  
46  
47 =head1 REFERENCE
48  
49 =head2 Constructor
50  
51 =over 4
52  
53 =item new
54  
55 DBIx::SQLEngine::Criteria::LiteralSQL->new( $sql ) : $comparison
56  
57 DBIx::SQLEngine::Criteria::LiteralSQL->new( $sql, @params ) : $comparison
58  
59 Constructor.
60  
61 =back
62  
63 =head2 SQL Where Generation
64  
65 =over 4
66  
67 =item sql_where()
68  
69 $criteria->sql_where() : $sql, @params
70  
71 Returns the SQL fragment and parameters stored by the constructor.
72  
73 =back
74  
75 =cut
76  
77  
78 =head1 SEE ALSO
79  
80 See L<DBIx::SQLEngine::Criteria> and L<DBIx::SQLEngine::Criteria::Comparison>
81 for more information on using these objects.
82  
83 See L<DBIx::SQLEngine> for the overall interface and developer documentation.
84  
85 See L<DBIx::SQLEngine::Docs::ReadMe> for general information about
86 this distribution, including installation and license information.
87  
88 =cut
« SQLEngine/Criteria/Lesser.pm ↑ Summary SQLEngine/Criteria/Or.pm »