1 package # Hide from PAUSE
2 DBIx::Class::SQLMaker::MySQL;
4 use base qw( DBIx::Class::SQLMaker );
7 # MySQL does not understand the standard INSERT INTO $table DEFAULT VALUES
8 # Adjust SQL here instead
14 $table = $self->_quote($table);
16 if (! $_[1] or (ref $_[1] eq 'HASH' and !keys %{$_[1]} ) ) {
17 return "INSERT INTO ${table} () VALUES ()"
20 return $self->SUPER::insert (@_);
23 # Allow STRAIGHT_JOIN's
24 sub _generate_join_clause {
25 my ($self, $join_type) = @_;
27 if( $join_type && $join_type =~ /^STRAIGHT\z/i ) {
28 return ' STRAIGHT_JOIN '
31 return $self->SUPER::_generate_join_clause( $join_type );
36 update => 'FOR UPDATE',
37 shared => 'LOCK IN SHARE MODE'
41 my ($self, $type) = @_;
43 my $sql = $for_syntax->{$type}
44 || $self->throw_exception("Unknown SELECT .. FOR type '$type' requested");