| 1 | |||||||||||||||||||||||||||||
| 2 | package SQL::Admin::Driver::Base::Evaluate; | ||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||
| 4 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 2 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 2 | our $VERSION = v0.5.0; | |||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | ###################################################################### | ||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | 2 | ▶ | use SQL::Admin::Utils qw( refarray refhash ); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | ###################################################################### | ||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | 2 | our $AUTOLOAD; | |||||||||||||||||||||||||||
| 16 | 2 | our $WARN_ON_AUTOLOAD = 1; | |||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | ###################################################################### | ||||||||||||||||||||||||||||
| 19 | ###################################################################### | ||||||||||||||||||||||||||||
| 20 | 1 | ▶ | sub new { # ; | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=8.1
Pod
undocumented
| |||||||||||||||||||||||||||||
| 21 | 1 | my ($class, %param) = @_; | |||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | 1 | ▶ | bless \ %param, ref $class || $class; | ||||||||||||||||||||||||||
|
Condition33%1/3
ref $class || $class
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table33%1/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||||||||||
| 24 | } | ||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | ###################################################################### | ||||||||||||||||||||||||||||
| 28 | ###################################################################### | ||||||||||||||||||||||||||||
| 29 | 10 | ▶ | sub evaluate { # ; | ||||||||||||||||||||||||||
|
Subroutine
evaluate: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 30 | 10 | my $self = shift; | |||||||||||||||||||||||||||
| 31 | 10 | my $owner = shift; | |||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | 10 | $self->__process ($owner, $_) for @_; | |||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | 10 | $owner; | |||||||||||||||||||||||||||
| 36 | } | ||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | ###################################################################### | ||||||||||||||||||||||||||||
| 40 | ###################################################################### | ||||||||||||||||||||||||||||
| 41 | 15 | ▶ | sub __process { # ; | ||||||||||||||||||||||||||
|
Subroutine
__process: called CC=4 SCAR=14.2
| |||||||||||||||||||||||||||||
| 42 | 15 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | 15 | ▶ | return $def | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 45 | unless ref $def; | ||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | 15 | ▶ | return [ map $self->__apply ($owner, %$_), @$def ] | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 48 | if refarray $def; | ||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||
| 50 | 12 | ▶ | return map $self->__call ($owner, $_, $def), keys %$def | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 51 | if refhash $def; | ||||||||||||||||||||||||||||
| 52 | } | ||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||
| 55 | ###################################################################### | ||||||||||||||||||||||||||||
| 56 | ###################################################################### | ||||||||||||||||||||||||||||
| 57 | 18 | ▶ | sub __apply { # ; | ||||||||||||||||||||||||||
|
Subroutine
__apply: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 58 | 18 | my ($self, $owner, $method, $def) = @_; | |||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||
| 60 | # print "# >> [APPLY] $method"; | ||||||||||||||||||||||||||||
| 61 | 18 | $self->$method ($owner, $def); | |||||||||||||||||||||||||||
| 62 | } | ||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||
| 65 | ###################################################################### | ||||||||||||||||||||||||||||
| 66 | ###################################################################### | ||||||||||||||||||||||||||||
| 67 | 71 | ▶ | sub __call { # ; | ||||||||||||||||||||||||||
|
Subroutine
__call: called CC=3 SCAR=11.0
| |||||||||||||||||||||||||||||
| 68 | 71 | my ($self, $owner, $method, $def) = @_; | |||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||
| 70 | # print "# >> [CALL ] $method"; | ||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||
| 72 | 71 | ▶ | return unless refhash $def; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 73 | 71 | ▶ | return unless exists $def->{$method}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||
| 75 | 49 | $self->$method ($owner, $def->{$method}, $def); | |||||||||||||||||||||||||||
| 76 | } | ||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||
| 79 | ###################################################################### | ||||||||||||||||||||||||||||
| 80 | ###################################################################### | ||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||
| 82 | 0 | ▶ | sub create_schema { # ; | ||||||||||||||||||||||||||
|
Subroutine
create_schema: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 83 | 0 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 84 | |||||||||||||||||||||||||||||
| 85 | 0 | my $obj = $owner->add (schema => (name => $def->{schema_identifier})); | |||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||
| 87 | #my $previous = $owner->default_schema; | ||||||||||||||||||||||||||||
| 88 | #$owner->default_schema ($obj); | ||||||||||||||||||||||||||||
| 89 | #$self->__process ($owner, $def->{schema_statements}); | ||||||||||||||||||||||||||||
| 90 | #$owner->default_schema ($previous); | ||||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||||
| 92 | ################################################################## | ||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||
| 94 | 0 | $obj; | |||||||||||||||||||||||||||
| 95 | } | ||||||||||||||||||||||||||||
| 96 | |||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||
| 98 | ###################################################################### | ||||||||||||||||||||||||||||
| 99 | ###################################################################### | ||||||||||||||||||||||||||||
| 100 | |||||||||||||||||||||||||||||
| 101 | 0 | ▶ | sub schema_qualified_name { # ; | ||||||||||||||||||||||||||
|
Subroutine
schema_qualified_name: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 102 | 0 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||
| 104 | 0 | %$def, | |||||||||||||||||||||||||||
| 105 | } | ||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||
| 107 | |||||||||||||||||||||||||||||
| 108 | ###################################################################### | ||||||||||||||||||||||||||||
| 109 | ###################################################################### | ||||||||||||||||||||||||||||
| 110 | 5 | ▶ | sub data_type { # ; | ||||||||||||||||||||||||||
|
Subroutine
data_type: called CC=4 SCAR=14.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 111 | 5 | my ($self, $owner, $type, $parent) = @_; | |||||||||||||||||||||||||||
| 112 | 5 | $type = { type => $type }; | |||||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||||
| 114 | 5 | ▶ | if (refhash $parent and defined $parent->{size}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
&refhash($parent) and defined $parent->{"size"}
MC/DC50%1/2
&refhash($parent) and defined $parent->{"size"}
&refhash($parent)
defined $parent->{"size"}
Truth table66%2/3
A and B
A= &refhash($parent)B= defined $parent->{"size"}
| |||||||||||||||||||||||||||||
| 115 | 1 | $type->{size} = $parent->{size}; | |||||||||||||||||||||||||||
| 116 | 1 | ▶ | $type->{scale} = $parent->{scale} if defined $parent->{scale}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 117 | } | ||||||||||||||||||||||||||||
| 118 | |||||||||||||||||||||||||||||
| 119 | 5 | $type; | |||||||||||||||||||||||||||
| 120 | } | ||||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||
| 122 | |||||||||||||||||||||||||||||
| 123 | ###################################################################### | ||||||||||||||||||||||||||||
| 124 | ###################################################################### | ||||||||||||||||||||||||||||
| 125 | 10 | ▶ | sub column_name { # ; | ||||||||||||||||||||||||||
|
Subroutine
column_name: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 126 | 10 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||
| 128 | 10 | $def; | |||||||||||||||||||||||||||
| 129 | } | ||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||
| 131 | |||||||||||||||||||||||||||||
| 132 | ###################################################################### | ||||||||||||||||||||||||||||
| 133 | ###################################################################### | ||||||||||||||||||||||||||||
| 134 | 1 | ▶ | sub column_order { # ; | ||||||||||||||||||||||||||
|
Subroutine
column_order: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 135 | 1 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||
| 137 | 1 | map uc, grep defined $_, $def; | |||||||||||||||||||||||||||
| 138 | } | ||||||||||||||||||||||||||||
| 139 | |||||||||||||||||||||||||||||
| 140 | |||||||||||||||||||||||||||||
| 141 | ###################################################################### | ||||||||||||||||||||||||||||
| 142 | ###################################################################### | ||||||||||||||||||||||||||||
| 143 | 3 | ▶ | sub ordered_column_name { # ; | ||||||||||||||||||||||||||
|
Subroutine
ordered_column_name: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 144 | 3 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 145 | |||||||||||||||||||||||||||||
| 146 | 3 | [ grep $_, ( | |||||||||||||||||||||||||||
| 147 | $self->__call ($owner, column_name => $def), | ||||||||||||||||||||||||||||
| 148 | $self->__call ($owner, column_order => $def), | ||||||||||||||||||||||||||||
| 149 | )]; | ||||||||||||||||||||||||||||
| 150 | } | ||||||||||||||||||||||||||||
| 151 | |||||||||||||||||||||||||||||
| 152 | |||||||||||||||||||||||||||||
| 153 | ###################################################################### | ||||||||||||||||||||||||||||
| 154 | ###################################################################### | ||||||||||||||||||||||||||||
| 155 | 2 | ▶ | sub ordered_column_names { # ; | ||||||||||||||||||||||||||
|
Subroutine
ordered_column_names: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 156 | 2 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 157 | |||||||||||||||||||||||||||||
| 158 | 2 | [ map $self->ordered_column_name ($owner, $_), @$def ]; | |||||||||||||||||||||||||||
| 159 | } | ||||||||||||||||||||||||||||
| 160 | |||||||||||||||||||||||||||||
| 161 | |||||||||||||||||||||||||||||
| 162 | ###################################################################### | ||||||||||||||||||||||||||||
| 163 | ###################################################################### | ||||||||||||||||||||||||||||
| 164 | 5 | ▶ | sub column_list { # ; | ||||||||||||||||||||||||||
|
Subroutine
column_list: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 165 | 5 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 166 | |||||||||||||||||||||||||||||
| 167 | 5 | [ map $self->column_name ($owner, $_), @$def ]; | |||||||||||||||||||||||||||
| 168 | } | ||||||||||||||||||||||||||||
| 169 | |||||||||||||||||||||||||||||
| 170 | ###################################################################### | ||||||||||||||||||||||||||||
| 171 | ###################################################################### | ||||||||||||||||||||||||||||
| 172 | |||||||||||||||||||||||||||||
| 173 | 0 | ▶ | sub connect_to { # ; | ||||||||||||||||||||||||||
|
Subroutine
connect_to: not called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 174 | } | ||||||||||||||||||||||||||||
| 175 | |||||||||||||||||||||||||||||
| 176 | |||||||||||||||||||||||||||||
| 177 | ###################################################################### | ||||||||||||||||||||||||||||
| 178 | ###################################################################### | ||||||||||||||||||||||||||||
| 179 | 0 | ▶ | sub commit_work { # ; | ||||||||||||||||||||||||||
|
Subroutine
commit_work: not called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 180 | } | ||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||
| 182 | |||||||||||||||||||||||||||||
| 183 | ###################################################################### | ||||||||||||||||||||||||||||
| 184 | ###################################################################### | ||||||||||||||||||||||||||||
| 185 | |||||||||||||||||||||||||||||
| 186 | 1 | ▶ | sub create_sequence { # ; | ||||||||||||||||||||||||||
|
Subroutine
create_sequence: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 187 | 1 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 188 | |||||||||||||||||||||||||||||
| 189 | 1 | my $obj = $owner->add (sequence => %{ $def->{sequence_name} }); | |||||||||||||||||||||||||||
| 190 | 1 | $self->__call ($obj, sequence_type => $def); | |||||||||||||||||||||||||||
| 191 | 1 | $self->__call ($obj, sequence_options => $def); | |||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||
| 193 | 1 | $obj; | |||||||||||||||||||||||||||
| 194 | } | ||||||||||||||||||||||||||||
| 195 | |||||||||||||||||||||||||||||
| 196 | |||||||||||||||||||||||||||||
| 197 | ###################################################################### | ||||||||||||||||||||||||||||
| 198 | ###################################################################### | ||||||||||||||||||||||||||||
| 199 | 1 | ▶ | sub sequence_type { # ; | ||||||||||||||||||||||||||
|
Subroutine
sequence_type: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 200 | 1 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 201 | |||||||||||||||||||||||||||||
| 202 | 1 | $owner->type ($def); | |||||||||||||||||||||||||||
| 203 | } | ||||||||||||||||||||||||||||
| 204 | |||||||||||||||||||||||||||||
| 205 | |||||||||||||||||||||||||||||
| 206 | ###################################################################### | ||||||||||||||||||||||||||||
| 207 | ###################################################################### | ||||||||||||||||||||||||||||
| 208 | 1 | ▶ | sub sequence_options { # ; | ||||||||||||||||||||||||||
|
Subroutine
sequence_options: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 209 | 1 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 210 | |||||||||||||||||||||||||||||
| 211 | 1 | $self->__process ($owner, $def); | |||||||||||||||||||||||||||
| 212 | } | ||||||||||||||||||||||||||||
| 213 | |||||||||||||||||||||||||||||
| 214 | |||||||||||||||||||||||||||||
| 215 | ###################################################################### | ||||||||||||||||||||||||||||
| 216 | ###################################################################### | ||||||||||||||||||||||||||||
| 217 | 1 | ▶ | sub sequence_start_with { # ; | ||||||||||||||||||||||||||
|
Subroutine
sequence_start_with: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 218 | 1 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 219 | 1 | $owner->start_with ($def); | |||||||||||||||||||||||||||
| 220 | } | ||||||||||||||||||||||||||||
| 221 | |||||||||||||||||||||||||||||
| 222 | |||||||||||||||||||||||||||||
| 223 | ###################################################################### | ||||||||||||||||||||||||||||
| 224 | ###################################################################### | ||||||||||||||||||||||||||||
| 225 | 1 | ▶ | sub sequence_increment_by { # ; | ||||||||||||||||||||||||||
|
Subroutine
sequence_increment_by: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 226 | 1 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 227 | 1 | $owner->increment_by ($def); | |||||||||||||||||||||||||||
| 228 | } | ||||||||||||||||||||||||||||
| 229 | |||||||||||||||||||||||||||||
| 230 | |||||||||||||||||||||||||||||
| 231 | ###################################################################### | ||||||||||||||||||||||||||||
| 232 | ###################################################################### | ||||||||||||||||||||||||||||
| 233 | 1 | ▶ | sub sequence_minvalue { # ; | ||||||||||||||||||||||||||
|
Subroutine
sequence_minvalue: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 234 | 1 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 235 | 1 | $owner->minvalue ($def); | |||||||||||||||||||||||||||
| 236 | } | ||||||||||||||||||||||||||||
| 237 | |||||||||||||||||||||||||||||
| 238 | |||||||||||||||||||||||||||||
| 239 | ###################################################################### | ||||||||||||||||||||||||||||
| 240 | ###################################################################### | ||||||||||||||||||||||||||||
| 241 | 1 | ▶ | sub sequence_maxvalue { # ; | ||||||||||||||||||||||||||
|
Subroutine
sequence_maxvalue: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 242 | 1 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 243 | 1 | $owner->maxvalue ($def); | |||||||||||||||||||||||||||
| 244 | } | ||||||||||||||||||||||||||||
| 245 | |||||||||||||||||||||||||||||
| 246 | |||||||||||||||||||||||||||||
| 247 | ###################################################################### | ||||||||||||||||||||||||||||
| 248 | ###################################################################### | ||||||||||||||||||||||||||||
| 249 | 1 | ▶ | sub sequence_cache { # ; | ||||||||||||||||||||||||||
|
Subroutine
sequence_cache: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 250 | 1 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 251 | 1 | $owner->cache ($def); | |||||||||||||||||||||||||||
| 252 | } | ||||||||||||||||||||||||||||
| 253 | |||||||||||||||||||||||||||||
| 254 | |||||||||||||||||||||||||||||
| 255 | ###################################################################### | ||||||||||||||||||||||||||||
| 256 | ###################################################################### | ||||||||||||||||||||||||||||
| 257 | 0 | ▶ | sub sequence_owner { # ; | ||||||||||||||||||||||||||
|
Subroutine
sequence_owner: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 258 | 0 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 259 | 0 | $owner->owner ($def); | |||||||||||||||||||||||||||
| 260 | } | ||||||||||||||||||||||||||||
| 261 | |||||||||||||||||||||||||||||
| 262 | |||||||||||||||||||||||||||||
| 263 | ###################################################################### | ||||||||||||||||||||||||||||
| 264 | ###################################################################### | ||||||||||||||||||||||||||||
| 265 | |||||||||||||||||||||||||||||
| 266 | 2 | ▶ | sub create_index { # ; | ||||||||||||||||||||||||||
|
Subroutine
create_index: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 267 | 2 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 268 | |||||||||||||||||||||||||||||
| 269 | 2 | my $obj = $owner->add (index => %{ $def->{index_name} }); | |||||||||||||||||||||||||||
| 270 | 2 | $obj->table ($owner->get (table => %{ $def->{table_name} })); | |||||||||||||||||||||||||||
| 271 | |||||||||||||||||||||||||||||
| 272 | 2 | $self->__call ($obj, index_unique => $def); | |||||||||||||||||||||||||||
| 273 | 2 | $self->__call ($obj, index_column_list => $def); | |||||||||||||||||||||||||||
| 274 | 2 | $self->__call ($obj, index_options => $def); | |||||||||||||||||||||||||||
| 275 | 2 | $self->__call ($obj, index_hints => $def); | |||||||||||||||||||||||||||
| 276 | |||||||||||||||||||||||||||||
| 277 | 2 | $obj; | |||||||||||||||||||||||||||
| 278 | } | ||||||||||||||||||||||||||||
| 279 | |||||||||||||||||||||||||||||
| 280 | |||||||||||||||||||||||||||||
| 281 | ###################################################################### | ||||||||||||||||||||||||||||
| 282 | ###################################################################### | ||||||||||||||||||||||||||||
| 283 | 1 | ▶ | sub index_unique { # ; | ||||||||||||||||||||||||||
|
Subroutine
index_unique: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 284 | 1 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 285 | 1 | $owner->unique ($def); | |||||||||||||||||||||||||||
| 286 | } | ||||||||||||||||||||||||||||
| 287 | |||||||||||||||||||||||||||||
| 288 | |||||||||||||||||||||||||||||
| 289 | ###################################################################### | ||||||||||||||||||||||||||||
| 290 | ###################################################################### | ||||||||||||||||||||||||||||
| 291 | 2 | ▶ | sub index_column_list { # ; | ||||||||||||||||||||||||||
|
Subroutine
index_column_list: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 292 | 2 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 293 | |||||||||||||||||||||||||||||
| 294 | 2 | $owner->column_list ( | |||||||||||||||||||||||||||
| 295 | $self->__apply (0, ordered_column_names => $def) | ||||||||||||||||||||||||||||
| 296 | ); | ||||||||||||||||||||||||||||
| 297 | } | ||||||||||||||||||||||||||||
| 298 | |||||||||||||||||||||||||||||
| 299 | |||||||||||||||||||||||||||||
| 300 | ###################################################################### | ||||||||||||||||||||||||||||
| 301 | ###################################################################### | ||||||||||||||||||||||||||||
| 302 | 1 | ▶ | sub index_options { # ; | ||||||||||||||||||||||||||
|
Subroutine
index_options: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 303 | 1 | shift->index_hints (@_); | |||||||||||||||||||||||||||
| 304 | } | ||||||||||||||||||||||||||||
| 305 | |||||||||||||||||||||||||||||
| 306 | |||||||||||||||||||||||||||||
| 307 | ###################################################################### | ||||||||||||||||||||||||||||
| 308 | ###################################################################### | ||||||||||||||||||||||||||||
| 309 | 2 | ▶ | sub index_hints { # ; | ||||||||||||||||||||||||||
|
Subroutine
index_hints: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 310 | 2 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 311 | 2 | ▶ | while (my @v = each %$def) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 312 | 2 | $owner->hint (@v); | |||||||||||||||||||||||||||
| 313 | } | ||||||||||||||||||||||||||||
| 314 | } | ||||||||||||||||||||||||||||
| 315 | |||||||||||||||||||||||||||||
| 316 | |||||||||||||||||||||||||||||
| 317 | ###################################################################### | ||||||||||||||||||||||||||||
| 318 | ###################################################################### | ||||||||||||||||||||||||||||
| 319 | |||||||||||||||||||||||||||||
| 320 | 2 | ▶ | sub create_table { # ; | ||||||||||||||||||||||||||
|
Subroutine
create_table: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 321 | 2 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 322 | |||||||||||||||||||||||||||||
| 323 | 2 | my $obj = $owner->add (table => %{ $def->{table_name}}); | |||||||||||||||||||||||||||
| 324 | |||||||||||||||||||||||||||||
| 325 | 2 | $self->__call ($obj, table_content => $def); | |||||||||||||||||||||||||||
| 326 | 2 | $self->__call ($obj, table_options => $def); | |||||||||||||||||||||||||||
| 327 | 2 | $self->__call ($obj, table_hints => $def); | |||||||||||||||||||||||||||
| 328 | |||||||||||||||||||||||||||||
| 329 | 2 | $obj; | |||||||||||||||||||||||||||
| 330 | } | ||||||||||||||||||||||||||||
| 331 | |||||||||||||||||||||||||||||
| 332 | |||||||||||||||||||||||||||||
| 333 | ###################################################################### | ||||||||||||||||||||||||||||
| 334 | ###################################################################### | ||||||||||||||||||||||||||||
| 335 | 0 | ▶ | sub table_options { # ; | ||||||||||||||||||||||||||
|
Subroutine
table_options: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 336 | 0 | shift->table_hints (@_); | |||||||||||||||||||||||||||
| 337 | } | ||||||||||||||||||||||||||||
| 338 | |||||||||||||||||||||||||||||
| 339 | |||||||||||||||||||||||||||||
| 340 | ###################################################################### | ||||||||||||||||||||||||||||
| 341 | ###################################################################### | ||||||||||||||||||||||||||||
| 342 | 1 | ▶ | sub table_hints { # ; | ||||||||||||||||||||||||||
|
Subroutine
table_hints: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 343 | 1 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 344 | 1 | ▶ | while (my @v = each %$def) { $owner->hint (@v); } | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 345 | } | ||||||||||||||||||||||||||||
| 346 | |||||||||||||||||||||||||||||
| 347 | |||||||||||||||||||||||||||||
| 348 | ###################################################################### | ||||||||||||||||||||||||||||
| 349 | ###################################################################### | ||||||||||||||||||||||||||||
| 350 | 2 | ▶ | sub table_content { # ; | ||||||||||||||||||||||||||
|
Subroutine
table_content: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 351 | 2 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 352 | |||||||||||||||||||||||||||||
| 353 | 2 | $self->__process ($owner, $def); | |||||||||||||||||||||||||||
| 354 | } | ||||||||||||||||||||||||||||
| 355 | |||||||||||||||||||||||||||||
| 356 | |||||||||||||||||||||||||||||
| 357 | ###################################################################### | ||||||||||||||||||||||||||||
| 358 | ###################################################################### | ||||||||||||||||||||||||||||
| 359 | 5 | ▶ | sub column_definition { # ; | ||||||||||||||||||||||||||
|
Subroutine
column_definition: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 360 | 5 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 361 | |||||||||||||||||||||||||||||
| 362 | 5 | my $obj = $owner->add (column => name => $def->{column_name}); | |||||||||||||||||||||||||||
| 363 | |||||||||||||||||||||||||||||
| 364 | 5 | $obj->type ($self->__call (0, data_type => $def)); | |||||||||||||||||||||||||||
| 365 | 5 | $self->__call ($obj, not_null => $def); | |||||||||||||||||||||||||||
| 366 | 5 | $self->__call ($obj, column_not_null => $def); | |||||||||||||||||||||||||||
| 367 | 5 | $self->__call ($obj, default_clause => $def); | |||||||||||||||||||||||||||
| 368 | 5 | $self->__call ($obj, autoincrement => $def); | |||||||||||||||||||||||||||
| 369 | |||||||||||||||||||||||||||||
| 370 | 5 | $obj; | |||||||||||||||||||||||||||
| 371 | } | ||||||||||||||||||||||||||||
| 372 | |||||||||||||||||||||||||||||
| 373 | |||||||||||||||||||||||||||||
| 374 | ###################################################################### | ||||||||||||||||||||||||||||
| 375 | ###################################################################### | ||||||||||||||||||||||||||||
| 376 | 4 | ▶ | sub column_not_null { # ; | ||||||||||||||||||||||||||
|
Subroutine
column_not_null: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 377 | 4 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 378 | |||||||||||||||||||||||||||||
| 379 | 4 | $owner->not_null (1); | |||||||||||||||||||||||||||
| 380 | } | ||||||||||||||||||||||||||||
| 381 | |||||||||||||||||||||||||||||
| 382 | |||||||||||||||||||||||||||||
| 383 | ###################################################################### | ||||||||||||||||||||||||||||
| 384 | ###################################################################### | ||||||||||||||||||||||||||||
| 385 | 2 | ▶ | sub default_clause { # ; | ||||||||||||||||||||||||||
|
Subroutine
default_clause: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 386 | 2 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 387 | |||||||||||||||||||||||||||||
| 388 | 2 | $owner->default ($def); | |||||||||||||||||||||||||||
| 389 | } | ||||||||||||||||||||||||||||
| 390 | |||||||||||||||||||||||||||||
| 391 | |||||||||||||||||||||||||||||
| 392 | ###################################################################### | ||||||||||||||||||||||||||||
| 393 | ###################################################################### | ||||||||||||||||||||||||||||
| 394 | 0 | ▶ | sub autoincrement { # ; | ||||||||||||||||||||||||||
|
Subroutine
autoincrement: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 395 | 0 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 396 | |||||||||||||||||||||||||||||
| 397 | 0 | $owner->autoincrement (1); | |||||||||||||||||||||||||||
| 398 | 0 | ▶ | while (my @v = each %$def) { $owner->autoincrement_hint (@v); } | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 399 | } | ||||||||||||||||||||||||||||
| 400 | |||||||||||||||||||||||||||||
| 401 | |||||||||||||||||||||||||||||
| 402 | ###################################################################### | ||||||||||||||||||||||||||||
| 403 | ###################################################################### | ||||||||||||||||||||||||||||
| 404 | |||||||||||||||||||||||||||||
| 405 | 6 | ▶ | sub alter_table { # ; | ||||||||||||||||||||||||||
|
Subroutine
alter_table: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 406 | 6 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 407 | |||||||||||||||||||||||||||||
| 408 | 6 | my $obj = $owner->add (table => %{ $def->{table_name}}); | |||||||||||||||||||||||||||
| 409 | |||||||||||||||||||||||||||||
| 410 | 6 | $self->__apply ($obj, %$_) for @{ $def->{alter_table_actions} }; | |||||||||||||||||||||||||||
| 411 | |||||||||||||||||||||||||||||
| 412 | 6 | $obj; | |||||||||||||||||||||||||||
| 413 | } | ||||||||||||||||||||||||||||
| 414 | |||||||||||||||||||||||||||||
| 415 | |||||||||||||||||||||||||||||
| 416 | ###################################################################### | ||||||||||||||||||||||||||||
| 417 | ###################################################################### | ||||||||||||||||||||||||||||
| 418 | 2 | ▶ | sub set_table_hint { # ; | ||||||||||||||||||||||||||
|
Subroutine
set_table_hint: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 419 | 2 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 420 | 2 | $owner->hint (%$def); | |||||||||||||||||||||||||||
| 421 | } | ||||||||||||||||||||||||||||
| 422 | |||||||||||||||||||||||||||||
| 423 | |||||||||||||||||||||||||||||
| 424 | ###################################################################### | ||||||||||||||||||||||||||||
| 425 | ###################################################################### | ||||||||||||||||||||||||||||
| 426 | |||||||||||||||||||||||||||||
| 427 | |||||||||||||||||||||||||||||
| 428 | # Value templates | ||||||||||||||||||||||||||||
| 429 | 4 | ▶ | sub add_constraint { # ; | ||||||||||||||||||||||||||
|
Subroutine
add_constraint: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 430 | 4 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 431 | |||||||||||||||||||||||||||||
| 432 | 4 | $self->__apply ($owner, %$def); | |||||||||||||||||||||||||||
| 433 | } | ||||||||||||||||||||||||||||
| 434 | |||||||||||||||||||||||||||||
| 435 | |||||||||||||||||||||||||||||
| 436 | ###################################################################### | ||||||||||||||||||||||||||||
| 437 | ###################################################################### | ||||||||||||||||||||||||||||
| 438 | 2 | ▶ | sub primary_key_constraint { # ; | ||||||||||||||||||||||||||
|
Subroutine
primary_key_constraint: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 439 | 2 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 440 | |||||||||||||||||||||||||||||
| 441 | $owner->add (primary_key => ( | ||||||||||||||||||||||||||||
| 442 | column_list => $self->__call (0, column_list => $def), | ||||||||||||||||||||||||||||
| 443 | 2 | (map {(name => $_)} grep $_, $def->{constraint_name}), | |||||||||||||||||||||||||||
| 444 | )); | ||||||||||||||||||||||||||||
| 445 | } | ||||||||||||||||||||||||||||
| 446 | |||||||||||||||||||||||||||||
| 447 | |||||||||||||||||||||||||||||
| 448 | ###################################################################### | ||||||||||||||||||||||||||||
| 449 | ###################################################################### | ||||||||||||||||||||||||||||
| 450 | 1 | ▶ | sub unique_constraint { # ; | ||||||||||||||||||||||||||
|
Subroutine
unique_constraint: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 451 | 1 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 452 | |||||||||||||||||||||||||||||
| 453 | $owner->add (unique => ( | ||||||||||||||||||||||||||||
| 454 | column_list => $self->__call (0, column_list => $def), | ||||||||||||||||||||||||||||
| 455 | 1 | (map {(name => $_)} grep $_, $def->{constraint_name}), | |||||||||||||||||||||||||||
| 456 | )); | ||||||||||||||||||||||||||||
| 457 | } | ||||||||||||||||||||||||||||
| 458 | |||||||||||||||||||||||||||||
| 459 | |||||||||||||||||||||||||||||
| 460 | ###################################################################### | ||||||||||||||||||||||||||||
| 461 | ###################################################################### | ||||||||||||||||||||||||||||
| 462 | 1 | ▶ | sub foreign_key_constraint { # ; | ||||||||||||||||||||||||||
|
Subroutine
foreign_key_constraint: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 463 | 1 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 464 | |||||||||||||||||||||||||||||
| 465 | $owner->add (foreign_key => ( | ||||||||||||||||||||||||||||
| 466 | referenced_table => $self->__call ($owner, referenced_table => $def), | ||||||||||||||||||||||||||||
| 467 | referencing_column_list => $self->__call (0, referencing_column_list => $def), | ||||||||||||||||||||||||||||
| 468 | referenced_column_list => $self->__call (0, referenced_column_list => $def), | ||||||||||||||||||||||||||||
| 469 | (map +(update_rule => $_), grep $_, $self->__call (0, update_rule => $def)), | ||||||||||||||||||||||||||||
| 470 | (map +(delete_rule => $_), grep $_, $self->__call (0, delete_rule => $def)), | ||||||||||||||||||||||||||||
| 471 | 1 | (map +(name => $_), grep $_, $def->{constraint_name}), | |||||||||||||||||||||||||||
| 472 | )); | ||||||||||||||||||||||||||||
| 473 | } | ||||||||||||||||||||||||||||
| 474 | |||||||||||||||||||||||||||||
| 475 | |||||||||||||||||||||||||||||
| 476 | ###################################################################### | ||||||||||||||||||||||||||||
| 477 | ###################################################################### | ||||||||||||||||||||||||||||
| 478 | 1 | ▶ | sub referencing_column_list { # ; | ||||||||||||||||||||||||||
|
Subroutine
referencing_column_list: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 479 | 1 | shift->column_list (@_); | |||||||||||||||||||||||||||
| 480 | } | ||||||||||||||||||||||||||||
| 481 | |||||||||||||||||||||||||||||
| 482 | |||||||||||||||||||||||||||||
| 483 | ###################################################################### | ||||||||||||||||||||||||||||
| 484 | ###################################################################### | ||||||||||||||||||||||||||||
| 485 | 1 | ▶ | sub referenced_column_list { # ; | ||||||||||||||||||||||||||
|
Subroutine
referenced_column_list: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 486 | 1 | shift->column_list (@_); | |||||||||||||||||||||||||||
| 487 | } | ||||||||||||||||||||||||||||
| 488 | |||||||||||||||||||||||||||||
| 489 | |||||||||||||||||||||||||||||
| 490 | ###################################################################### | ||||||||||||||||||||||||||||
| 491 | ###################################################################### | ||||||||||||||||||||||||||||
| 492 | 1 | ▶ | sub referenced_table { # ; | ||||||||||||||||||||||||||
|
Subroutine
referenced_table: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 493 | 1 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 494 | |||||||||||||||||||||||||||||
| 495 | 1 | $owner->catalog->get (table => %$def); | |||||||||||||||||||||||||||
| 496 | } | ||||||||||||||||||||||||||||
| 497 | |||||||||||||||||||||||||||||
| 498 | |||||||||||||||||||||||||||||
| 499 | ###################################################################### | ||||||||||||||||||||||||||||
| 500 | ###################################################################### | ||||||||||||||||||||||||||||
| 501 | 1 | ▶ | sub update_rule { # ; | ||||||||||||||||||||||||||
|
Subroutine
update_rule: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 502 | 1 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 503 | |||||||||||||||||||||||||||||
| 504 | 1 | $def; | |||||||||||||||||||||||||||
| 505 | } | ||||||||||||||||||||||||||||
| 506 | |||||||||||||||||||||||||||||
| 507 | |||||||||||||||||||||||||||||
| 508 | ###################################################################### | ||||||||||||||||||||||||||||
| 509 | ###################################################################### | ||||||||||||||||||||||||||||
| 510 | 1 | ▶ | sub delete_rule { # ; | ||||||||||||||||||||||||||
|
Subroutine
delete_rule: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 511 | 1 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 512 | |||||||||||||||||||||||||||||
| 513 | 1 | $def; | |||||||||||||||||||||||||||
| 514 | } | ||||||||||||||||||||||||||||
| 515 | |||||||||||||||||||||||||||||
| 516 | |||||||||||||||||||||||||||||
| 517 | ###################################################################### | ||||||||||||||||||||||||||||
| 518 | ###################################################################### | ||||||||||||||||||||||||||||
| 519 | 1 | ▶ | sub add_column { # ; | ||||||||||||||||||||||||||
|
Subroutine
add_column: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 520 | 1 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 521 | 1 | $self->__process ($owner, $def); | |||||||||||||||||||||||||||
| 522 | } | ||||||||||||||||||||||||||||
| 523 | |||||||||||||||||||||||||||||
| 524 | |||||||||||||||||||||||||||||
| 525 | ###################################################################### | ||||||||||||||||||||||||||||
| 526 | ###################################################################### | ||||||||||||||||||||||||||||
| 527 | 0 | ▶ | sub alter_column { # ; | ||||||||||||||||||||||||||
|
Subroutine
alter_column: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 528 | 0 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 529 | 0 | my $obj = $owner->add (column => name => $def->{column_name}); | |||||||||||||||||||||||||||
| 530 | |||||||||||||||||||||||||||||
| 531 | 0 | $self->__call ($obj, 'alter_column_set_default', $def); | |||||||||||||||||||||||||||
| 532 | 0 | $self->__call ($obj, 'alter_column_set_not_null', $def); | |||||||||||||||||||||||||||
| 533 | 0 | $self->__call ($obj, 'alter_column_drop_default', $def); | |||||||||||||||||||||||||||
| 534 | 0 | $self->__call ($obj, 'alter_column_drop_not_null', $def); | |||||||||||||||||||||||||||
| 535 | |||||||||||||||||||||||||||||
| 536 | 0 | $obj; | |||||||||||||||||||||||||||
| 537 | } | ||||||||||||||||||||||||||||
| 538 | |||||||||||||||||||||||||||||
| 539 | |||||||||||||||||||||||||||||
| 540 | ###################################################################### | ||||||||||||||||||||||||||||
| 541 | ###################################################################### | ||||||||||||||||||||||||||||
| 542 | 0 | ▶ | sub alter_column_set_default { # ; | ||||||||||||||||||||||||||
|
Subroutine
alter_column_set_default: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 543 | 0 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 544 | 0 | $self->__call ($owner, default_clause => $def); | |||||||||||||||||||||||||||
| 545 | } | ||||||||||||||||||||||||||||
| 546 | |||||||||||||||||||||||||||||
| 547 | |||||||||||||||||||||||||||||
| 548 | ###################################################################### | ||||||||||||||||||||||||||||
| 549 | ###################################################################### | ||||||||||||||||||||||||||||
| 550 | 0 | ▶ | sub alter_column_drop_default { # ; | ||||||||||||||||||||||||||
|
Subroutine
alter_column_drop_default: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 551 | 0 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 552 | 0 | $owner->default (undef); | |||||||||||||||||||||||||||
| 553 | } | ||||||||||||||||||||||||||||
| 554 | |||||||||||||||||||||||||||||
| 555 | |||||||||||||||||||||||||||||
| 556 | ###################################################################### | ||||||||||||||||||||||||||||
| 557 | ###################################################################### | ||||||||||||||||||||||||||||
| 558 | 0 | ▶ | sub alter_column_set_not_null { # ; | ||||||||||||||||||||||||||
|
Subroutine
alter_column_set_not_null: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 559 | 0 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 560 | 0 | $owner->not_null (1); | |||||||||||||||||||||||||||
| 561 | } | ||||||||||||||||||||||||||||
| 562 | |||||||||||||||||||||||||||||
| 563 | |||||||||||||||||||||||||||||
| 564 | ###################################################################### | ||||||||||||||||||||||||||||
| 565 | ###################################################################### | ||||||||||||||||||||||||||||
| 566 | 0 | ▶ | sub alter_column_drop_not_null { # ; | ||||||||||||||||||||||||||
|
Subroutine
alter_column_drop_not_null: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 567 | 0 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 568 | 0 | $owner->not_null (undef); | |||||||||||||||||||||||||||
| 569 | } | ||||||||||||||||||||||||||||
| 570 | |||||||||||||||||||||||||||||
| 571 | |||||||||||||||||||||||||||||
| 572 | ###################################################################### | ||||||||||||||||||||||||||||
| 573 | ###################################################################### | ||||||||||||||||||||||||||||
| 574 | |||||||||||||||||||||||||||||
| 575 | 0 | ▶ | sub statement_insert { # ; | ||||||||||||||||||||||||||
|
Subroutine
statement_insert: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 576 | 0 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 577 | 0 | my $obj = $owner->add (table => %{ $def->{table_name}}); | |||||||||||||||||||||||||||
| 578 | |||||||||||||||||||||||||||||
| 579 | 0 | my $columns = $self->__call ($owner, column_list => $def); | |||||||||||||||||||||||||||
| 580 | 0 | my $values = $self->__call ($owner, insert_value_list => $def); | |||||||||||||||||||||||||||
| 581 | |||||||||||||||||||||||||||||
| 582 | 0 | ▶ | my @columns = $columns ? (columns => $columns) : (); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 583 | |||||||||||||||||||||||||||||
| 584 | #for my $row (@$values) { | ||||||||||||||||||||||||||||
| 585 | 0 | $obj->table_row ({ @columns, values => $values }); | |||||||||||||||||||||||||||
| 586 | #} | ||||||||||||||||||||||||||||
| 587 | } | ||||||||||||||||||||||||||||
| 588 | |||||||||||||||||||||||||||||
| 589 | |||||||||||||||||||||||||||||
| 590 | ###################################################################### | ||||||||||||||||||||||||||||
| 591 | ###################################################################### | ||||||||||||||||||||||||||||
| 592 | 0 | ▶ | sub insert_value_list { # ; | ||||||||||||||||||||||||||
|
Subroutine
insert_value_list: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 593 | 0 | my ($self, $owner, $def) = @_; | |||||||||||||||||||||||||||
| 594 | |||||||||||||||||||||||||||||
| 595 | 0 | $def; | |||||||||||||||||||||||||||
| 596 | } | ||||||||||||||||||||||||||||
| 597 | |||||||||||||||||||||||||||||
| 598 | |||||||||||||||||||||||||||||
| 599 | ###################################################################### | ||||||||||||||||||||||||||||
| 600 | ###################################################################### | ||||||||||||||||||||||||||||
| 601 | |||||||||||||||||||||||||||||
| 602 | 0 | ▶ | sub DESTROY { # ; | ||||||||||||||||||||||||||
|
Subroutine
DESTROY: not called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 603 | } | ||||||||||||||||||||||||||||
| 604 | |||||||||||||||||||||||||||||
| 605 | |||||||||||||||||||||||||||||
| 606 | ###################################################################### | ||||||||||||||||||||||||||||
| 607 | ###################################################################### | ||||||||||||||||||||||||||||
| 608 | 0 | ▶ | sub AUTOLOAD { # ; | ||||||||||||||||||||||||||
|
Subroutine
AUTOLOAD: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||
| 609 | 0 | ▶ | warn 'Unhandler method: ' . $AUTOLOAD if $WARN_ON_AUTOLOAD; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 610 | 0 | (); | |||||||||||||||||||||||||||
| 611 | } | ||||||||||||||||||||||||||||
| 612 | |||||||||||||||||||||||||||||
| 613 | |||||||||||||||||||||||||||||
| 614 | ###################################################################### | ||||||||||||||||||||||||||||
| 615 | ###################################################################### | ||||||||||||||||||||||||||||
| 616 | |||||||||||||||||||||||||||||
| 617 | package SQL::Admin::Driver::Base::Evaluate; | ||||||||||||||||||||||||||||
| 618 | |||||||||||||||||||||||||||||
| 619 | 2 | 1; | |||||||||||||||||||||||||||
| 620 | |||||||||||||||||||||||||||||
| 621 | __END__ | ||||||||||||||||||||||||||||