1 package # Hide from PAUSE
2 DBIx::Class::SQLMaker::MySQL;
7 extends 'DBIx::Class::SQLMaker';
9 has needs_inner_join => (is => 'rw', trigger => sub { shift->clear_renderer });
11 sub _build_converter_class {
12 Module::Runtime::use_module('DBIx::Class::SQLMaker::Converter::MySQL');
15 sub _build_base_renderer_class {
16 Module::Runtime::use_module('Data::Query::Renderer::SQL::MySQL');
19 around _renderer_args => sub {
20 my ($orig, $self) = (shift, shift);
21 +{ %{$self->$orig(@_)}, needs_inner_join => $self->needs_inner_join };
24 # Allow STRAIGHT_JOIN's
25 sub _generate_join_clause {
26 my ($self, $join_type) = @_;
28 if( $join_type && $join_type =~ /^STRAIGHT\z/i ) {
29 return ' STRAIGHT_JOIN '
32 return $self->next::method($join_type);
37 update => 'FOR UPDATE',
38 shared => 'LOCK IN SHARE MODE'
42 my ($self, $type) = @_;
44 my $sql = $for_syntax->{$type}
45 || $self->throw_exception("Unknown SELECT .. FOR type '$type' requested");