package # Hide from PAUSE
DBIx::Class::SQLMaker::MySQL;
-use base qw( DBIx::Class::SQLMaker );
+use Moo;
+use namespace::clean;
+
+extends 'DBIx::Class::SQLMaker';
+
+has needs_inner_join => (is => 'rw', trigger => sub { shift->clear_renderer });
sub _build_converter_class {
Module::Runtime::use_module('DBIx::Class::SQLMaker::Converter::MySQL');
Module::Runtime::use_module('Data::Query::Renderer::SQL::MySQL');
}
+around _renderer_args => sub {
+ my ($orig, $self) = (shift, shift);
+ +{ %{$self->$orig(@_)}, needs_inner_join => $self->needs_inner_join };
+};
+
# Allow STRAIGHT_JOIN's
sub _generate_join_clause {
my ($self, $join_type) = @_;
# mysql 3 does not understand a bare JOIN
my $mysql_ver = $self->_dbh_get_info('SQL_DBMS_VER');
- $maker->{_default_jointype} = 'INNER' if $mysql_ver =~ /^3/;
+ $maker->needs_inner_join(1) if $mysql_ver =~ /^3/;
}
return $self->_sql_maker;