instance method
execute
Ruby on Rails 6.0.6
Since v3.2.22.5 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/abstract_mysql_adapter.rb, line 196
def execute(sql, name = nil)
materialize_transactions
log(sql, name) do
ActiveSupport::Dependencies.interlock.permit_concurrent_loads do
@connection.query(sql)
end
end
end
Defined in activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb line 196
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter