From: Matt S Trout Date: Sun, 17 Nov 2013 05:38:36 +0000 (+0000) Subject: STRAIGHT_JOIN support for MySQL X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0dd586da6b9de7a42a93fc00694eb24f6fd92a16;p=dbsrgits%2FData-Query.git STRAIGHT_JOIN support for MySQL --- diff --git a/lib/Data/Query/Renderer/SQL/MySQL.pm b/lib/Data/Query/Renderer/SQL/MySQL.pm index fe447ed..8f3bb67 100644 --- a/lib/Data/Query/Renderer/SQL/MySQL.pm +++ b/lib/Data/Query/Renderer/SQL/MySQL.pm @@ -13,7 +13,9 @@ has needs_inner_join => (is => 'ro', default => sub { 0 }); around _format_join_keyword => sub { my ($orig, $self) = (shift, shift); my ($dq) = @_; - if ($self->needs_inner_join and $dq->{on} and !$dq->{outer}) { + if ($dq->{'Data::Query::Renderer::SQL::MySQL.straight_join'}) { + return $self->_format_keyword('STRAIGHT_JOIN'); + } elsif ($self->needs_inner_join and $dq->{on} and !$dq->{outer}) { return $self->_format_keyword('INNER JOIN'); } return $self->$orig(@_);