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
13 if (! $_[1] or (ref $_[1] eq 'HASH' and !keys %{$_[1]} ) ) {
14 my $table = $self->_quote($_[0]);
15 return "INSERT INTO ${table} () VALUES ()"
18 return $self->next::method (@_);
21 # Allow STRAIGHT_JOIN's
22 sub _generate_join_clause {
23 my ($self, $join_type) = @_;
25 if( $join_type && $join_type =~ /^STRAIGHT\z/i ) {
26 return ' STRAIGHT_JOIN '
29 return $self->next::method($join_type);
34 update => 'FOR UPDATE',
35 shared => 'LOCK IN SHARE MODE'
39 my ($self, $type) = @_;
41 my $sql = $for_syntax->{$type}
42 || $self->throw_exception("Unknown SELECT .. FOR type '$type' requested");