for qw(with with_recursive);
$self->clause_renderer("${stmt}.with", $with_renderer);
}
+ $self->expander(cast => sub {
+ return { -func => [ cast => $_[2] ] } if ref($_[2]) eq 'HASH';
+ my ($cast, $to) = @{$_[2]};
+ +{ -func => [ cast => { -as => [
+ $self->expand_expr($cast),
+ $self->expand_expr($to, -ident),
+ ] } ] };
+ });
return $self;
}
my ($self, undef, $args) = @_;
my ($thing, $alias) = @$args;
return $self->join_query_parts(
- ' ',
+ ' '.$self->format_keyword('as').' ',
$thing,
- $self->format_keyword('as'),
$alias,
);
}