Revision history for SQL::Abstract
+ - Leave quotes from DBIC in bindargs
- Add error checking on "profile" for SQLA::Tree
- Hide bulk inserts from DBIx::Class
- Highlight transaction keywords
my $use_placeholders = !!$self->_sqlat->fill_in_placeholders;
- # DBIC pre-quotes bindargs
- $bindargs = [map { s/^'//; s/'$//; $_ } @{$bindargs}] if $use_placeholders;
-
my $sqlat = $self->_sqlat;
my $formatted;
if ($self->squash_repeats && $self->_last_sql eq $string) {
my $magenta = [$c->('magenta'), $c->('reset')];
my $b_o_w = [$c->('black on_white'), $c->('reset')];
(
- placeholder_surround => [q(') . $c->('black on_magenta'), $c->('reset') . q(')],
+ placeholder_surround => [$c->('black on_magenta'), $c->('reset')],
colormap => {
'begin work' => $b_o_w,
commit => $b_o_w,
if ($self->fill_in_placeholders) {
my $val = shift @{$bindargs} || '';
+ $val =~ s/^(')(.*)(')$/$2/;
+ my ($lquo, $rquo) = ($1 || '', $3 || '');
my ($left, $right) = @{$self->placeholder_surround};
$val =~ s/\\/\\\\/g;
$val =~ s/'/\\'/g;
- return qq($left$val$right)
+ return qq($left$lquo$val$rquo$right)
}
return '?'
}
profile => 'none',
squash_repeats => 1,
fill_in_placeholders => 1,
- placeholder_surround => [qw(' ')],
+ placeholder_surround => ['', ''],
show_progress => 0,
});