handle logging db queries with no placeholders
This commit is contained in:
parent
c64d41e5f6
commit
478a4cf1cf
1 changed files with 7 additions and 1 deletions
|
|
@ -339,7 +339,13 @@ sub query {
|
|||
my $query = shift;
|
||||
my $placeholders = shift;
|
||||
$self->{_queryCount}++;
|
||||
my $plac = scalar(@{$placeholders}) ? "\n with placeholders: ['".join("', '",@{$placeholders})."']" : '';
|
||||
my $plac;
|
||||
if (defined $placeholders and ref $placeholders eq "ARRAY") {
|
||||
$plac = "\n with placeholders: ['".join("', '",@{$placeholders})."']";
|
||||
}
|
||||
else {
|
||||
$plac = '';
|
||||
}
|
||||
$self->debug("query ".$self->{_queryCount}.': '.$query.$plac);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue