return unless defined($arg) and not (ref($arg) eq 'ARRAY' and !@$arg);
+ return $arg if ref($arg) eq 'HASH' and ($arg->{-op}||[''])->[0] eq ',';
+
my $expander = sub {
my ($self, $dir, $expr) = @_;
my @to_expand = ref($expr) eq 'ARRAY' ? @$expr : $expr;
sub _expand_maybe_list_expr {
my ($self, $expr, $default) = @_;
- return $expr if ref($expr) eq 'HASH' and (($expr->{-op}||[''])->[0] eq ',');
+ return $expr if ref($expr) eq 'HASH' and ($expr->{-op}||[''])->[0] eq ',';
return +{ -op => [ ',',
map $self->expand_expr($_, $default),
ref($expr) eq 'ARRAY' ? @$expr : $expr
}
sub _expand_update_clause_set {
+ return $_[1] if ref($_[1]) eq 'HASH' and ($_[1]->{-op}||[''])->[0] eq ',';
+(set => shift->_expand_update_set_values(@_));
}
sub _expand_insert_clause_values {
my ($self, $data) = @_;
+ return $data if ref($data) eq 'HASH' and $data->{-row};
my ($f_aqt, $v_aqt) = $self->_expand_insert_values($data);
return (values => $v_aqt, ($f_aqt ? (fields => $f_aqt) : ()));
}