class MysqlAdapter
Ruby on Rails 3.1.12
Since v3.1.12 Last seen in v4.2.9The MySQL adapter will work with both Ruby/MySQL, which is a Ruby-based MySQL adapter that comes bundled with Active Record, and with the faster C-based MySQL/Ruby adapter (available both as a gem and from www.tmtm.org/en/mysql/ruby/).
Options:
-
:host- Defaults to “localhost”. -
:port- Defaults to 3306. -
:socket- Defaults to “/tmp/mysql.sock”. -
:username- Defaults to “root” -
:password- Defaults to nothing. -
:database- The name of the database. No default, must be provided. -
:encoding- (Optional) Sets the client encoding by executing “SET NAMES <encoding>” after connection. -
:reconnect- Defaults to false (See MySQL documentation: dev.mysql.com/doc/refman/5.0/en/auto-reconnect.html). -
:sslca- Necessary to use MySQL with an SSL connection. -
:sslkey- Necessary to use MySQL with an SSL connection. -
:sslcert- Necessary to use MySQL with an SSL connection. -
:sslcapath- Necessary to use MySQL with an SSL connection. -
:sslcipher- Necessary to use MySQL with an SSL connection.
Inherits from
Namespace
Classes
Constants
- Mysql::Stmt::ActiveRecord::ConnectionAdapters::MysqlAdapter::ADAPTER_NAME
- Mysql::Stmt::ActiveRecord::ConnectionAdapters::MysqlAdapter::ENCODINGS
- Mysql::Stmt::ActiveRecord::ConnectionAdapters::MysqlAdapter::LOST_CONNECTION_ERROR_MESSAGES
- Mysql::Stmt::ActiveRecord::ConnectionAdapters::MysqlAdapter::NATIVE_DATABASE_TYPES
- Mysql::Stmt::ActiveRecord::ConnectionAdapters::MysqlAdapter::QUOTED_FALSE
Methods (defined here)
- # active?
- # add_column
- # add_column_position!
- # add_column_sql
- # add_index_sql
- # add_timestamps_sql
- # case_sensitive_equality_operator
- # case_sensitive_modifier
- # change_column_null
- # change_column_sql
- # charset
- # clear_cache!
- # client_encoding
- # collation
- # create_database
- # create_savepoint
- # current_database
- # disconnect!
- # drop_table
- # exec_delete
- # exec_query
- # exec_update
- # last_inserted_id
- # limited_update_conditions
- # primary_key
- # quote
- # quoted_columns_for_index
- # quoted_false
- # quoted_true
- # reconnect!
- # release_savepoint
- # remove_column_sql
- # remove_index_sql
- # remove_timestamps_sql
- # rename_column_sql
- # rename_table
- # reset!
- # rollback_to_savepoint
- # select_rows
- # show_variable
- # supports_statement_cache?
- # table_exists?
- # translate_exception
- # type_cast
- # type_to_sql
- self. emulate_booleans
- self. new
Private methods
(7)
Implementation detail — not part of the public API.
- # column_for
- # configure_connection
- # connect
- # exec_stmt
- # select
- # supports_views?
- # version