instance method
execute_and_clear
Ruby on Rails 5.2.8.1
Since v4.2.9 Last seen in v7.2.3 PrivateSignature
execute_and_clear(sql, name, binds, prepare: false)
No documentation comment.
Parameters
-
sqlreq -
namereq -
bindsreq -
preparekey = false
Source
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 594
def execute_and_clear(sql, name, binds, prepare: false)
if without_prepared_statement?(binds)
result = exec_no_cache(sql, name, [])
elsif !prepare
result = exec_no_cache(sql, name, binds)
else
result = exec_cache(sql, name, binds)
end
ret = yield result
result.clear
ret
end
Defined in activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb line 594
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::PostgreSQLAdapter