sub _render_join {
my ($self, $dq) = @_;
my ($left, $right) = @{$dq->{join}};
- die "No support for ON yet" if $dq->{on};
- die "No support for LEFT/RIGHT yet" if $dq->{outer};
- [ $self->_render($left), ',', $self->_render($right) ];
+ my $join = do {
+ if ($dq->{outer}) {
+ $self->_format_keyword(uc($dq->{outer}).' JOIN');
+ } elsif ($dq->{on}) {
+ $self->_format_keyword('JOIN');
+ } else {
+ ','
+ }
+ };
+ [
+ $self->_render($left), $join, $self->_render($right),
+ ($dq->{on}
+ ? ($self->_format_keyword('ON'), $self->_render($dq->{on}))
+ : ())
+ ];
}
sub _render_where {