File Coverage

blib/lib/DBIx/Class/ParseError/Parser/SQLite.pm
Criterion Covered Total %
statement 13 13 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 18 19 94.7


line stmt bran cond sub pod time code
1             package DBIx::Class::ParseError::Parser::SQLite;
2              
3 4     4   2557 use strict;
  4         9  
  4         113  
4 4     4   44 use warnings;
  4         9  
  4         107  
5 4     4   22 use Moo;
  4         8  
  4         23  
6 4     4   3009 use Regexp::Common;
  4         9047  
  4         13  
7              
8             with 'DBIx::Class::ParseError::Parser';
9              
10             sub type_regex {
11             return {
12 17     17 0 194 data_type => qr{
13             attrs_for_bind\(\)\:
14             .+value\s+supplied\s+for\s+column\s+
15             \'(\w+)\'
16             }ix,
17             missing_table => qr{()no\s+such\s+table}i,
18             missing_column => qr{no\s+such\s+column\s+\'(\w+)\'}i,
19             not_null => qr{
20             NOT\s+NULL\s+constraint\s+failed\:\s+
21             ($RE{list}{-pat => '\w+'}{-sep => '.'})
22             }ix,
23             unique_key => qr{
24             UNIQUE\s+constraint\s+failed\:\s+
25             ($RE{list}{-pat => '\w+'}{-sep => '.'})
26             }ix,
27             };
28             }
29              
30             1;
31              
32             __END__