line |
true |
false |
branch |
31
|
0 |
637 |
unless $$self{'instance'}
|
45
|
0 |
498 |
unless my $tables = $self->_split($params{-'table'} || $params{-'tables'})
|
48
|
0 |
498 |
unless my $Qtables = $self->_tables($tables)
|
51
|
495 |
3 |
unless ($params{'-count'})
|
52
|
0 |
495 |
unless my $fields = $self->_split($params{-'fields'} || $params{-'field'})
|
56
|
0 |
2360 |
unless my $Qfield = 'DBR::Config::Field::Anon'->new('session', $$self{'session'}, 'name', $field)
|
65
|
480 |
18 |
if ($params{-'where'})
|
67
|
0 |
480 |
unless defined $where
|
71
|
0 |
498 |
if (defined $limit)
|
72
|
0 |
0 |
unless $limit =~ /^\d+$/
|
75
|
3 |
495 |
$params{'-count'} ? :
|
76
|
0 |
498 |
unless my $query = $class->new('instance', $$self{'instance'}, 'session', $$self{'session'}, 'fields', \@Qfields, 'tables', $Qtables, 'where', $where, 'limit', $limit)
|
86
|
3 |
495 |
if ($params{-'count'}) { }
|
|
1 |
494 |
elsif ($params{-'query'}) { }
|
|
1 |
493 |
elsif ($params{-'rawsth'}) { }
|
94
|
0 |
1 |
unless my $sth = $query->run
|
95
|
0 |
1 |
unless $sth->execute
|
100
|
0 |
493 |
if ($params{'-object'})
|
105
|
0 |
493 |
unless $sth->execute
|
107
|
34 |
459 |
if ($params{-'arrayref'}) { }
|
|
0 |
459 |
elsif ($params{-'keycol'}) { }
|
|
157 |
302 |
elsif ($params{-'single'}) { }
|
130
|
0 |
494 |
unless $table and $table =~ /^[A-Za-z0-9_-]+$/
|
131
|
0 |
494 |
unless ref $fields eq 'HASH'
|
133
|
0 |
494 |
unless my $Qtable = 'DBR::Config::Table::Anon'->new('session', $$self{'session'}, 'name', $table)
|
141
|
0 |
2025 |
unless my $fieldobj = 'DBR::Config::Field::Anon'->new('session', $$self{'session'}, 'name', $field)
|
146
|
0 |
2025 |
unless my $valobj = $self->_value($value)
|
148
|
0 |
2025 |
unless my $set = 'DBR::Query::Part::Set'->new($fieldobj, $valobj)
|
152
|
42 |
452 |
$params{-'quiet'} ? :
|
|
0 |
494 |
unless my $query = 'DBR::Query::Insert'->new('instance', $$self{'instance'}, 'session', $$self{'session'}, 'sets', \@sets, 'quiet_error', $params{-'quiet'} ? 1 : 0, 'tables', $Qtable)
|
172
|
0 |
46 |
unless $table =~ /^[A-Za-z0-9_-]+$/
|
173
|
0 |
46 |
unless ref $fields eq 'HASH'
|
175
|
0 |
46 |
unless my $Qtable = 'DBR::Config::Table::Anon'->new('session', $$self{'session'}, 'name', $table)
|
180
|
46 |
0 |
if ($params{-'where'}) { }
|
181
|
0 |
46 |
unless $where = $self->_where($params{-'where'})
|
190
|
0 |
46 |
unless my $fieldobj = 'DBR::Config::Field::Anon'->new('session', $$self{'session'}, 'name', $field)
|
195
|
0 |
46 |
unless my $valobj = $self->_value($value)
|
197
|
0 |
46 |
unless my $set = 'DBR::Query::Part::Set'->new($fieldobj, $valobj)
|
202
|
0 |
46 |
$params{-'quiet'} ? :
|
|
0 |
46 |
unless my $query = 'DBR::Query::Update'->new('instance', $$self{'instance'}, 'session', $$self{'session'}, 'sets', \@sets, 'tables', $Qtable, 'where', $where, 'quiet_error', $params{-'quiet'} ? 1 : 0)
|
221
|
0 |
1 |
unless $table =~ /^[A-Za-z0-9_-]+$/
|
223
|
0 |
1 |
unless my $Qtable = 'DBR::Config::Table::Anon'->new('session', $$self{'session'}, 'name', $table)
|
228
|
1 |
0 |
if ($params{-'where'}) { }
|
229
|
0 |
1 |
unless $where = $self->_where($params{-'where'})
|
234
|
0 |
1 |
$params{-'quiet'} ? :
|
|
0 |
1 |
unless my $query = 'DBR::Query::Delete'->new('instance', $$self{'instance'}, 'session', $$self{'session'}, 'tables', $Qtable, 'where', $where, 'quiet_error', $params{-'quiet'} ? 1 : 0)
|
250
|
498 |
0 |
if (ref $tables eq 'ARRAY' and @{$tables;} == 1)
|
255
|
0 |
498 |
if (ref $tables eq 'ARRAY') { }
|
|
0 |
498 |
elsif (ref $tables eq 'HASH') { }
|
258
|
0 |
0 |
unless $table =~ /^[A-Za-z][A-Za-z0-9_-]*$/
|
261
|
0 |
0 |
if $ct > 25
|
264
|
0 |
0 |
unless my $Qtable = 'DBR::Config::Table::Anon'->new('session', $$self{'session'}, 'name', $table, 'alias', $alias)
|
274
|
0 |
0 |
unless $alias =~ /^[A-Za-z][A-Za-z0-9_-]*$/
|
276
|
0 |
0 |
unless $table =~ /^[A-Za-z][A-Za-z0-9_-]*$/
|
278
|
0 |
0 |
unless my $Qtable = 'DBR::Config::Table::Anon'->new('session', $$self{'session'}, 'name', $table, 'alias', $alias)
|
286
|
0 |
498 |
unless $tables =~ /^[A-Za-z][A-Za-z0-9_-]*$/
|
288
|
0 |
498 |
unless my $Qtable = 'DBR::Config::Table::Anon'->new('session', $$self{'session'}, 'name', $tables)
|
303
|
526 |
1 |
if ref $param eq 'HASH'
|
304
|
0 |
527 |
unless ref $param eq 'ARRAY'
|
307
|
0 |
527 |
unless scalar @$param
|
316
|
0 |
700 |
if (ref $val1 eq 'ARRAY') { }
|
319
|
0 |
0 |
unless push @or, $self->_where($element)
|
328
|
1 |
699 |
if (ref $value eq 'HASH') { }
|
329
|
1 |
0 |
if ($$value{-'table'} and $$value{-'field'} || $$value{-'fields'}) { }
|
331
|
0 |
1 |
unless my $field = 'DBR::Config::Field::Anon'->new('session', $$self{'session'}, 'name', $key)
|
336
|
0 |
1 |
unless my $compat = 'DBR::Interface::DBRv1'->new('session', $$self{'session'}, 'instance', $$self{'instance'})
|
341
|
0 |
1 |
unless my $query = $compat->select(%{$value;}, -'query', 1)
|
342
|
0 |
1 |
unless $query->can_be_subquery
|
349
|
0 |
0 |
if (%{$value;})
|
352
|
0 |
0 |
unless my $ret = $self->_processfield("$alias.$k", $$value{$k})
|
361
|
0 |
699 |
unless my $ret = $self->_processfield($key, $value)
|
369
|
173 |
354 |
if (@out > 1) { }
|
382
|
0 |
699 |
unless my $field = 'DBR::Config::Field::Anon'->new('session', $$self{'session'}, 'name', $fieldname)
|
388
|
476 |
223 |
if (ref $value eq 'ARRAY')
|
392
|
0 |
699 |
if ($flags and $flags =~ /j/) { }
|
394
|
0 |
0 |
unless my $tofield = 'DBR::Config::Field::Anon'->new('session', $$self{'session'}, 'name', $$value[1])
|
399
|
0 |
0 |
unless my $join = 'DBR::Query::Part::Join'->new($field, $tofield)
|
408
|
476 |
223 |
if ($flags)
|
409
|
1 |
475 |
if ($flags =~ /like/) { }
|
|
0 |
475 |
elsif ($flags =~ /!/) { }
|
|
0 |
475 |
elsif ($flags =~ /\<\>/) { }
|
|
0 |
475 |
elsif ($flags =~ /\>=/) { }
|
|
0 |
475 |
elsif ($flags =~ /\<=/) { }
|
|
0 |
475 |
elsif ($flags =~ /\>/) { }
|
|
0 |
475 |
elsif ($flags =~ /\</) { }
|
423
|
0 |
699 |
unless my $valobj = $self->_value($value, $is_number)
|
425
|
0 |
699 |
unless my $compobj = 'DBR::Query::Part::Compare'->new('field', $field, 'operator', $operator, 'value', $valobj)
|
443
|
2012 |
758 |
if (ref $value eq 'ARRAY')
|
448
|
2011 |
759 |
if ($flags and $flags =~ /d/)
|
450
|
0 |
2770 |
unless my $valobj = 'DBR::Query::Part::Value'->new('is_number', $is_number, 'value', $value, 'session', $$self{'session'})
|