lib/active_record/connection_adapters/oracle_enhanced_database_statements.rb
# New method in ActiveRecord 3.1
# Will add RETURNING clause in case of trigger generated primary keys
New method in ActiveRecord 3.1
Will add RETURNING clause in case of trigger generated primary keys
New method in ActiveRecord 3 . 1 Will add RETURNING clause in case of trigger generated primary keys
def sql_for_insert(sql, pk, id_value, sequence_name, binds)
        unless id_value || pk.nil? || (defined?(CompositePrimaryKeys) && pk.kind_of?(CompositePrimaryKeys::CompositeKeys))
          sql = "#{sql} RETURNING #{quote_column_name(pk)} INTO :returning_id"
          returning_id_col = OracleEnhancedColumn.new("returning_id", nil, "number", true, "dual", :integer, true, true)
          (binds = binds.dup) << [returning_id_col, nil]
        end
        [sql, binds]
      end
def sql_for_insert ( sql , pk , id_value , sequence_name , binds ) unless id_value || pk . nil? || ( defined? ( CompositePrimaryKeys ) && pk . kind_of? ( CompositePrimaryKeys :: CompositeKeys ) ) sql = "#{sql} RETURNING #{quote_column_name(pk)} INTO :returning_id" returning_id_col = OracleEnhancedColumn . new ( "returning_id" , nil , "number" , true , "dual" , :integer , true , true ) ( binds = binds . dup ) << [ returning_id_col , nil ] end [ sql , binds ] end
New method in ActiveRecord 3.1
Will add RETURNING clause in case of trigger generated primary keys
New method in ActiveRecord 3 . 1 Will add RETURNING clause in case of trigger generated primary keys
sql
pk
id_value
sequence_name
binds