<<

NAME

DBIx::Class::Storage::DBI::mysql - Storage::DBI class implementing MySQL specifics

SYNOPSIS

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

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

DESCRIPTION

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.

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|,
    ]
  });

INHERITED METHODS

DBIx::Class::Storage::DBI

DESTROY, auto_savepoint, bind_attribute_by_data_type, build_datetime_parser, columns_info_for, connect_call_datetime_setup, connect_call_do_sql, connect_info, connected, create_ddl_dir, datetime_parser, datetime_parser_type, dbh, dbh_do, delete, deploy, disable_sth_caching, disconnect, disconnect_call_do_sql, ensure_connected, get_dbms_capability, get_use_dbms_capability, insert, insert_bulk, is_datatype_numeric, last_insert_id, new, on_connect_call, on_connect_do, on_disconnect_call, on_disconnect_do, relname_to_table_alias, savepoints, select, select_single, set_dbms_capability, set_use_dbms_capability, source_bind_attributes, sql_maker_class, sth, svp_begin, svp_release, svp_rollback, transaction_depth, txn_begin, txn_commit, txn_do, txn_rollback, unsafe, update

DBIx::Class::Storage

cursor, cursor_class, debug, debugcb, debugfh, debugobj, schema, set_schema, throw_exception, txn_scope_guard

DBIx::Class

MODIFY_CODE_ATTRIBUTES, component_base_class, mk_classaccessor, mk_classdata

DBIx::Class::Componentised

inject_base

Class::C3::Componentised

ensure_class_found, ensure_class_loaded, load_components, load_optional_class, load_optional_components, load_own_components

Class::Accessor::Grouped

get_component_class, get_inherited, get_simple, get_super_paths, make_group_accessor, make_group_ro_accessor, make_group_wo_accessor, mk_group_accessors, mk_group_ro_accessors, mk_group_wo_accessors, set_component_class, set_inherited, set_simple

INHERITED METHODS

DBIx::Class::Storage::DBI

DESTROY, auto_savepoint, bind_attribute_by_data_type, build_datetime_parser, columns_info_for, connect_call_datetime_setup, connect_call_do_sql, connect_info, connected, create_ddl_dir, datetime_parser, datetime_parser_type, dbh, dbh_do, delete, deploy, disable_sth_caching, disconnect, disconnect_call_do_sql, ensure_connected, get_dbms_capability, get_use_dbms_capability, insert, insert_bulk, is_datatype_numeric, last_insert_id, new, on_connect_call, on_connect_do, on_disconnect_call, on_disconnect_do, relname_to_table_alias, savepoints, select, select_single, set_dbms_capability, set_use_dbms_capability, source_bind_attributes, sql_maker_class, sth, svp_begin, svp_release, svp_rollback, transaction_depth, txn_begin, txn_commit, txn_do, txn_rollback, unsafe, update

DBIx::Class::Storage

cursor, cursor_class, debug, debugcb, debugfh, debugobj, schema, set_schema, throw_exception, txn_scope_guard

DBIx::Class

MODIFY_CODE_ATTRIBUTES, component_base_class, mk_classaccessor, mk_classdata

DBIx::Class::Componentised

inject_base

Class::C3::Componentised

ensure_class_found, ensure_class_loaded, load_components, load_optional_class, load_optional_components, load_own_components

Class::Accessor::Grouped

get_component_class, get_inherited, get_simple, get_super_paths, make_group_accessor, make_group_ro_accessor, make_group_wo_accessor, mk_group_accessors, mk_group_ro_accessors, mk_group_wo_accessors, set_component_class, set_inherited, set_simple

AUTHORS

See "CONTRIBUTORS" in DBIx::Class

LICENSE

You may distribute this code under the same terms as Perl itself.

<<