class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
def prepare_statement(sql, binds)
Experimental RBS support (using type sampling data from the type_fusion
project).
def prepare_statement: (String sql, Array[ActiveRecord::Relation::QueryAttribute] binds) -> untyped
This signature was generated using 1 sample from 1 application.
Prepare the statement if it hasn't been prepared, return
def prepare_statement(sql, binds) @lock.synchronize do sql_key = sql_key(sql) unless @statements.key? sql_key nextkey = @statements.next_key begin @connection.prepare nextkey, sql rescue => e raise translate_exception_class(e, sql, binds) end # Clear the queue @connection.get_last_result @statements[sql_key] = nextkey end @statements[sql_key] end end