class MysqlAdapter
Ruby on Rails 3.0.20
Since v2.2.3 Last seen in v3.0.20The 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
Constants
Methods (defined here)
- # active?
- # add_column
- # add_column_position!
- # case_sensitive_equality_operator
- # change_column_null
- # charset
- # collation
- # create_database
- # create_savepoint
- # current_database
- # disconnect!
- # drop_table
- # limited_update_conditions
- # primary_key
- # quote
- # quoted_columns_for_index
- # quoted_false
- # quoted_true
- # reconnect!
- # release_savepoint
- # rename_table
- # reset!
- # rollback_to_savepoint
- # select_rows
- # show_variable
- # table_exists?
- # translate_exception
- # type_to_sql
- self. emulate_booleans
- self. new
Private methods
(6)
Implementation detail — not part of the public API.
- # column_for
- # configure_connection
- # connect
- # select
- # supports_views?
- # version
Methods (inherited)
From ActiveRecord::ConnectionAdapters::AbstractAdapter (27)
- # active?
- # adapter_name
- # create_savepoint
- # current_savepoint_name
- # decrement_open_transactions
- # disable_referential_integrity
- # disconnect!
- # ids_in_list_limit
- # increment_open_transactions
- # log
- # open_transactions
- # prefetch_primary_key?
- # quote_table_name
- # raw_connection
- # reconnect!
- # release_savepoint
- # requires_reloading?
- # reset!
- # rollback_to_savepoint
- # supports_count_distinct?
- # supports_ddl_transactions?
- # supports_migrations?
- # supports_primary_key?
- # supports_savepoints?
- # transaction_joinable=
- # translate_exception
- # verify!
From ActiveRecord::ConnectionAdapters::QueryCache (6)
- # cache
- # clear_query_cache
- # select_all
- # uncached
- self. dirties_query_cache
- self. included
From ActiveSupport::Callbacks (2)
From Object (26)
- # acts_like?
- # app
- # blank?
- # controller
- # create
- # create_fixtures
- # destroy
- # duplicable?
- # edit
- # helper
- # html_safe?
- # index
- # instance_variable_names
- # new
- # new_session
- # presence
- # present?
- # reload!
- # returning
- # show
- # to_param
- # to_query
- # try
- # unescape
- # update
- # with_options
From ActiveSupport::Concern (3)
- # append_features
- # included
- self. extended
From ActiveSupport::DescendantsTracker (6)
- # descendants
- # direct_descendants
- # inherited
- self. clear
- self. descendants
- self. direct_descendants