$self->{expand_clause}{'insert.into'} = '_expand_insert_clause_target';
$self->{expand_clause}{'insert.values'} = '_expand_insert_clause_from';
$self->{render_clause}{'insert.fields'} = sub {
- return $_[0]->render_aqt($_[2]);
+ return @{ $_[0]->render_aqt($_[2]) };
};
$self->{render_clause}{'insert.target'} = sub {
my ($self, undef, $from) = @_;
$self->join_query_parts(' ', $self->format_keyword('insert into'), $from);
};
$self->{render_clause}{'insert.from'} = sub {
- return $_[0]->render_aqt($_[2], 1);
+ return @{ $_[0]->render_aqt($_[2], 1) };
};
$self->{expand}{values} = '_expand_values';
$self->{render}{values} = '_render_values';
$self->{render}{convert_where} = sub {
my $self = shift;
local $self->{convert_where} = $self->{convert};
- $self->render_aqt($_[1]);
+ @{ $self->render_aqt($_[1]) };
};
return $self;
}
if (my $rdr = $self->{render_clause}{"${type}.${clause}"}) {
$self->$rdr($clause, $clause_expr);
} else {
- my ($clause_sql, @bind) = $self->render_aqt($clause_expr, 1);
+ my ($clause_sql, @bind) = @{ $self->render_aqt($clause_expr, 1) };
my $sql = join ' ',
$self->_sqlcase(join ' ', split '_', $clause),
$clause_sql;
sub render_statement {
my ($self, $expr, $default_scalar_to) = @_;
- my ($sql, @bind) = $self->render_aqt(
+ my ($sql, @bind) = @{ $self->render_aqt(
$self->expand_expr($expr, $default_scalar_to), 1
- );
+ ) };
return (wantarray ? ($sql, @bind) : $sql);
}
$self->clause_renderer('select.setop' => sub {
my ($self, undef, $setop) = @_;
- $self->render_aqt($setop);
+ @{ $self->render_aqt($setop) };
});
$self->renderer($_ => sub {
map {
my ($alias, $query) = @$_;
[ $self->join_query_parts(' ',
- [ $self->_render_alias($alias) ],
- [ $self->format_keyword('as') ],
+ $self->_render_alias($alias),
+ $self->format_keyword('as'),
$query,
) ]
} @{$with->{queries}}
) ];
return $self->join_query_parts(' ',
- [ $self->format_keyword(join '_', 'with', ($with->{type}||'')) ],
+ $self->format_keyword(join '_', 'with', ($with->{type}||'')),
$q_part,
);
});
my ($thing, @alias) = @$args;
return $self->join_query_parts(
' ',
- [ $self->render_aqt($thing) ],
- [ $self->format_keyword('as') ],
- [ $self->_render_alias(\@alias) ],
+ $self->render_aqt($thing),
+ $self->format_keyword('as'),
+ $self->_render_alias(\@alias),
);
}