instance method
exec_query
Ruby on Rails 4.1.16
Since v3.1.12 Last seen in v4.2.9Signature
exec_query(sql, name = 'SQL', binds = [])
No documentation comment.
Parameters
-
sqlreq -
nameopt = 'SQL' -
bindsopt = []
Source
# File activerecord/lib/active_record/connection_adapters/mysql_adapter.rb, line 281
def exec_query(sql, name = 'SQL', binds = [])
if without_prepared_statement?(binds)
result_set, affected_rows = exec_without_stmt(sql, name)
else
result_set, affected_rows = exec_stmt(sql, name, binds)
end
yield affected_rows if block_given?
result_set
end
Defined in activerecord/lib/active_record/connection_adapters/mysql_adapter.rb line 281
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Mysql::Stmt::ActiveRecord::ConnectionAdapters::MysqlAdapter