class MysqlAdapter
Ruby on Rails 2.3.18
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
- # 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!
- # format_log_entry
- # increment_open_transactions
- # log
- # log_info
- # 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=
- # verify!
From ActiveRecord::ConnectionAdapters::QueryCache (7)
- # cache
- # clear_query_cache
- # columns_with_query_cache
- # select_all_with_query_cache
- # uncached
- self. dirties_query_cache
- self. included
From ActiveSupport::Callbacks (2)
- # run_callbacks
- self. included
From Object (37)
- # acts_like?
- # app
- # as_json
- # blank?
- # class_eval
- # create
- # create_fixtures
- # destroy
- # duplicable?
- # edit
- # find_cmd
- # helper
- # html_safe?
- # index
- # instance_exec
- # instance_variable_defined?
- # instance_variable_names
- # message
- # metaclass
- # new_session
- # presence
- # present?
- # reload!
- # returning
- # singleton_class
- # tap
- # to_json
- # to_param
- # to_query
- # try
- # unescape
- # update
- # with_options
- self. blank_slate_method_added
- self. find_hidden_method
- self. lookup_missing_generator
- self. method_added