Engine/Builder/Update.pm untested

filter: Statementstmt 0.0% 0 / 38 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod n/a totaltotal 0.0% 0 / 52 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package SQL::Engine::Builder::Update;
2  
3 use 5.014;
4  
5 use strict;
6 use warnings;
7  
8 use registry;
9 use routines;
10  
11 use Data::Object::Class;
12 use Data::Object::ClassHas;
13  
14 extends 'SQL::Engine::Builder';
15  
16 use SQL::Validator;
17  
18 our $VERSION = '0.01'; # VERSION
19  
20 # ATTRIBUTES
21  
22 has for => (
23 is => 'ro',
24 isa => 'HashRef',
25 req => 1
26 );
27  
28 has columns => (
29 is => 'ro',
30 isa => 'ArrayRef[HashRef]',
31 req => 1
32 );
33  
34 has where => (
35 is => 'ro',
36 isa => 'ArrayRef[HashRef]',
37 opt => 1
38 );
39  
40 # METHODS
41  
42 method data() {
43 my $schema = {};
44  
45 if ($self->for) {
46 $schema->{"for"} = $self->for;
47 }
48  
49 if ($self->columns) {
50 $schema->{"columns"} = $self->columns;
51 }
52  
53 if ($self->where) {
54 $schema->{"where"} = $self->where;
55 }
56  
57 return {
58 update => $schema
59 }
60 }
61  
62 1;