Index/PostgreSQL.pm

filter: Statementstmt 68.1% 15 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 57.1% 4 / 7 Podpod n/a totaltotal 65.5% 19 / 29 CC 1 SCAR 3.6
CC
1
Cov
68%
_build_typemap
2.0
_quote_field
2.0
_quote_val
2.0
CRAP 1.4
« Archive/SQL.pm ↑ Summary Archive/PostgreSQL.pm »
1 2 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package Metabase::Index::PostgreSQL;
6 # ABSTRACT: Metabase index backend using SQLite
7  
8 2 our $VERSION = '1.001';
9  
10 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 2 with 'Metabase::Backend::PostgreSQL';
13 2 with 'Metabase::Index::SQL';
14  
15 0 ▶sub _build_typemap {
Subroutine _build_typemap: not called CC=1 SCAR=6.9
16 return {
17 0 '//str' => 'text',
18 '//num' => 'integer',
19 '//bool' => 'boolean',
20 };
21 }
22  
23 0 ▶sub _quote_field {
Subroutine _quote_field: not called CC=1 SCAR=6.9
24 0 my ($self, $field) = @_;
25 0 return join(".", map { qq{"$_"} } split qr/\./, $field);
26 }
27  
28 0 ▶sub _quote_val {
Subroutine _quote_val: not called CC=1 SCAR=6.9
29 0 my ($self, $value) = @_;
30 0 $value =~ s{'}{''}g;
31 0 return qq{'$value'};
32 }
33  
34 2 1;
35  
36 __END__
« Archive/SQL.pm ↑ Summary Archive/PostgreSQL.pm »