instance method
execute
Ruby on Rails 7.0.10
Since v5.2.8.1 Last seen in v7.0.10Signature
execute(sql, name = nil, async: false)
Executes the SQL statement in the context of this connection.
Parameters
-
sqlreq -
nameopt = nil -
asynckey = false
Source
# File activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb, line 43
def execute(sql, name = nil, async: false)
sql = transform_query(sql)
check_if_write_query(sql)
raw_execute(sql, name, async: async)
end
Defined in activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb line 43
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::MySQL::DatabaseStatements