DBIx::Class::Storage::DBI::mysql(3pm)

DBIx::Class::Storage::DBI::mysql3pm

Storage::dbi class implementing mysql specifics

Usage

Storage::DBI autodetects the underlying MySQL database, and re-blesses the $storage object into this class.

  my $schema = MyApp::Schema->connect( $dsn, $user, $pass, { on_connect_call => 'set_strict_mode' } );

Overview

This class implements MySQL specific bits of DBIx::Class::Storage::DBI, like AutoIncrement column support and savepoints. Also it augments the SQL maker to support the MySQL-specific "STRAIGHT_JOIN" join type, which you can use by specifying "join_type => 'straight'" in the relationship attributes

It also provides a one-stop on-connect macro "set_strict_mode" which sets session variables such that MySQL behaves more predictably as far as the SQL standard is concerned.

Options

set_strict_mode

Enables session-wide strict options upon connecting. Equivalent to:

  ->connect ( ... , {
    on_connect_do => [
      q|SET SQL_MODE = CONCAT('ANSI,TRADITIONAL,ONLY_FULL_GROUP_BY,', @@sql_mode)|,
      q|SET SQL_AUTO_IS_NULL = 0|,
    ]
  });

Further questions?

Check the list of additional DBIC resources.

Releases

10 releases since Debian 4.0 (Etch); the text changed 8 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9
  7. 10–11
  8. 12
  9. 13

From libdbix-class-perl 0.082844-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.