class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
def execute_and_clear(sql, name, binds, prepare: false, async: false)
Experimental RBS support (using type sampling data from the type_fusion project).
type ActiveRecord__ConnectionAdapters__PostgreSQLAdapter_execute_and_clear_binds = Array[] | Array[ActiveRecord::Relation::QueryAttribute] | Array[ActiveModel::Attribute::FromUser] | Array[ActiveModel::Attribute::WithCastValue] def execute_and_clear: (String sql, String name, ActiveRecord__ConnectionAdapters__PostgreSQLAdapter_execute_and_clear_binds binds, prepare: bool, async: false) -> ActiveRecord::Result
This signature was generated using 30 samples from 2 applications.
def execute_and_clear(sql, name, binds, prepare: false, async: false) sql = transform_query(sql) check_if_write_query(sql) if !prepare || without_prepared_statement?(binds) result = exec_no_cache(sql, name, binds, async: async) else result = exec_cache(sql, name, binds, async: async) end begin ret = yield result ensure result.clear end ret end