unless ($dq->{subtype} eq 'SQL') {
die "Can't render non-SQL literal";
}
- return [
- $dq->{literal}, @{$dq->{values}||[]}
- ];
+ if ($dq->{literal}) {
+ return [
+ $dq->{literal}, @{$dq->{values}||[]}
+ ];
+ } elsif ($dq->{parts}) {
+ return [ map $self->_render($_), @{$dq->{parts}} ];
+ } else {
+ die "Invalid SQL literal - neither 'literal' nor 'parts' found";
+ }
}
sub _render_join {