DBIx::C...::mysql(3)

🌸 NAME 🌸

okay so bestie, this is the DBIx::C...::mysql(3) page from the User Contributed Perl Documentation set β€” and the actual module here is DBIx::Class::Storage::DBI::mysql, a Storage::DBI class implementing MySQL specifics. slay. πŸ’…

✨ SYNOPSIS ✨

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

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

πŸ¦‹ DESCRIPTION πŸ¦‹

This class implements the MySQL-specific bits of DBIx::Class::Storage::DBI, like AutoIncrement column support and savepoints. It also 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. iconic. ✨

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. periodt. 🫢

πŸŽ€ STORAGE 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. 🫢

This module is free software copyright by the DBIx::Class (DBIC) authors. You can redistribute it and/or modify it under the same terms as the DBIx::Class library.

mwah πŸ’‹ β€” baked with perl v5.42.0, dated 2025-01-22, and still proudly the DBIx::C...::mysql(3) page. πŸŽ€

πŸ“¦ where this page comes from