method

exec_query

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

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v4.2.9) is shown here.

exec_query(sql, name = 'SQL', binds = [])
public

No documentation available.

# File activerecord/lib/active_record/connection_adapters/mysql_adapter.rb, line 253
      def exec_query(sql, name = 'SQL', binds = [])
        if without_prepared_statement?(binds)
          result_set, affected_rows = exec_without_stmt(sql, name)
        else
          result_set, affected_rows = exec_stmt(sql, name, binds)
        end

        yield affected_rows if block_given?

        result_set
      end