Sha256: 626d5da9b771e551f4ce7afc8867cb29d429ed761005461761630182711eb222

Contents?: true

Size: 494 Bytes

Versions: 10

Compression:

Stored size: 494 Bytes

Contents

module ActiveRecord
  module ConnectionAdapters
    module DatabaseStatements
      def insert(arel, name = nil, pk = nil, id_value = nil, sequence_name = nil, binds = [])
        sql, binds = to_sql_and_binds(arel, binds)
        value = exec_insert(sql, name, binds, pk, sequence_name)

        # CPK
        if value && pk.is_a?(Array)
          id_value || value.rows.first
        else
          id_value || last_inserted_id(value)
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
composite_primary_keys-12.0.2 lib/composite_primary_keys/connection_adapters/abstract/database_statements.rb
composite_primary_keys-11.3.1 lib/composite_primary_keys/connection_adapters/abstract/database_statements.rb
composite_primary_keys-12.0.1 lib/composite_primary_keys/connection_adapters/abstract/database_statements.rb
composite_primary_keys-12.0.0 lib/composite_primary_keys/connection_adapters/abstract/database_statements.rb
composite_primary_keys-12.0.0.rc5 lib/composite_primary_keys/connection_adapters/abstract/database_statements.rb
composite_primary_keys-12.0.0.rc4 lib/composite_primary_keys/connection_adapters/abstract/database_statements.rb
composite_primary_keys-12.0.0.rc3 lib/composite_primary_keys/connection_adapters/abstract/database_statements.rb
composite_primary_keys-12.0.0.rc2 lib/composite_primary_keys/connection_adapters/abstract/database_statements.rb
composite_primary_keys-12.0.0.rc1 lib/composite_primary_keys/connection_adapters/abstract/database_statements.rb
composite_primary_keys-11.2.0 lib/composite_primary_keys/connection_adapters/abstract/database_statements.rb