Methods
- A
- C
- D
- E
- I
- L
- N
- Q
- R
- S
Classes and Modules
- CLASS ActiveRecord::ConnectionAdapters::Mysql2Adapter::Column
- CLASS ActiveRecord::ConnectionAdapters::Mysql2Adapter::ExplainPrettyPrinter
Constants
ADAPTER_NAME | = | 'Mysql2' |
Class Public methods
Instance Public methods
CONNECTION MANAGEMENT ====================================
Alias for insert_sql
Disconnects from the database if already connected. Otherwise, this method does nothing.
This method is also aliased as
exec_update
This method is also aliased as
exec_without_stmt
Alias for exec_delete
Alias for exec_query
Executes the SQL statement in the context of this connection.
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 206 206: def execute(sql, name = nil) 207: # make sure we carry over any changes to ActiveRecord::Base.default_timezone that have been 208: # made since we established the connection 209: @connection.query_options[:database_timezone] = ActiveRecord::Base.default_timezone 210: 211: super 212: end
DATABASE STATEMENTS ======================================
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 97 97: def explain(arel, binds = []) 98: sql = "EXPLAIN #{to_sql(arel, binds.dup)}" 99: start = Time.now 100: result = exec_query(sql, 'EXPLAIN', binds) 101: elapsed = Time.now - start 102: 103: ExplainPrettyPrinter.new.pp(result, elapsed) 104: end
This method is also aliased as
create
QUOTING ==================================================
Returns an array of record hashes with the column names as keys and column values as values.
Returns an array of arrays containing the field values. Order is the same as that returned by columns.