Flowdock
exec_cache(sql, binds) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 965
      def exec_cache(sql, binds)
        unless @statements.key? sql
          nextkey = "a#{@statements.length + 1}"
          @connection.prepare nextkey, sql
          @statements[sql] = nextkey
        end

        key = @statements[sql]

        # Clear the queue
        @connection.get_last_result
        @connection.send_query_prepared(key, binds.map { |col, val|
          type_cast(val, col)
        })
        @connection.block
        @connection.get_last_result
      end
Register or log in to add new notes.