lib/active_record/connection_adapters/oracle_enhanced_database_statements.rb
# New method in ActiveRecord 3.1
New method in ActiveRecord 3.1
New method in ActiveRecord 3 . 1
def exec_update(sql, name, binds)
        log(sql, name, binds) do
          cached = false
          if without_prepared_statement?(binds)
            cursor = @connection.prepare(sql)
          else
            cursor = if @statements.key?(sql)
              @statements[sql]
            else
              @statements[sql] = @connection.prepare(sql)
            end
            binds.each_with_index do |bind, i|
              col, val = bind
              cursor.bind_param(i + 1, type_cast(val, col), col)
            end
            cached = true
          end
          res = cursor.exec_update
          cursor.close unless cached
          res
        end
      end
def exec_update ( sql , name , binds ) log ( sql , name , binds ) do cached = false if without_prepared_statement? ( binds ) cursor = @connection . prepare ( sql ) else cursor = if @statements . key? ( sql ) @statements [ sql ] else @statements [ sql ] = @connection . prepare ( sql ) end binds . each_with_index do | bind , i | col , val = bind cursor . bind_param ( i + 1 , type_cast ( val , col ) , col ) end cached = true end res = cursor . exec_update cursor . close unless cached res end end
New method in ActiveRecord 3.1
New method in ActiveRecord 3 . 1
sql
name
binds