instance method
execute
Ruby on Rails 5.2.8.1
Since v5.2.8.1 Last seen in v7.0.10Signature
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/mysql/database_statements.rb, line 23
def execute(sql, name = nil)
# 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
super
end
Defined in activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb line 23
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::MySQL::DatabaseStatements