instance method
execute
Ruby on Rails 4.0.13
Since v3.1.12 Last seen in v4.2.9Signature
execute(sql, name = nil)
Executes the SQL statement in the context of this connection.
Parameters
-
sqlreq -
nameopt = nil
Source
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 215
def execute(sql, name = nil)
if @connection
# make sure we carry over any changes to ActiveRecord::Base.default_timezone that have been
# made since we established the connection
@connection.query_options[:database_timezone] = ActiveRecord::Base.default_timezone
end
super
end
Defined in activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb line 215
· View on GitHub
· Improve this page
· Find usages on GitHub