method

preprocess_query

rails latest stable - Class: ActiveRecord::ConnectionAdapters::DatabaseStatements

Method not available on this version

This method is only available on newer versions. The first available version (v8.0.0) is shown here.

preprocess_query(sql)
private

No documentation available.

# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 574
        def preprocess_query(sql)
          check_if_write_query(sql)
          mark_transaction_written_if_write(sql)

          # We call tranformers after the write checks so we don't add extra parsing work.
          # This means we assume no transformer whille change a read for a write
          # but it would be insane to do such a thing.
          ActiveRecord.query_transformers.each do |transformer|
            sql = transformer.call(sql, self)
          end

          sql
        end