Sha256: 4564cba25b826433b844e99e4370c7b63b6b36e3b6b2fb2e343195e543b584f9

Contents?: true

Size: 728 Bytes

Versions: 16

Compression:

Stored size: 728 Bytes

Contents

module Salesforce
  module Bulk
    module Operations
      extend ActiveSupport::Concern
      
      module ClassMethods
# Create a bulk update job
# job = Salesforce::Account.bulk_update do
#   batch do
#     record account_1
#     record account_2
#   end
# end
# 

        def bulk_update(columns = [], &block)
          UpdateJob.new(self, columns).tap do |job|
            Blockenspiel.invoke(block, job)
            job.process!
          end
        end
        
        def bulk_upsert(external_id, columns = [], &block)
          UpsertJob.new(self, external_id, columns).tap do |job|
            Blockenspiel.invoke(block, job)
            job.process!
          end
        end
        
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
activeforce-5.0.0 lib/salesforce/bulk/operations.rb
activeforce-1.10.5 lib/salesforce/bulk/operations.rb
activeforce-1.10.4 lib/salesforce/bulk/operations.rb
activeforce-4.0.0 lib/salesforce/bulk/operations.rb
activeforce-1.10.3 lib/salesforce/bulk/operations.rb
activeforce-3.1.0 lib/salesforce/bulk/operations.rb
activeforce-1.10.2 lib/salesforce/bulk/operations.rb
activeforce-3.0.0 lib/salesforce/bulk/operations.rb
activeforce-2.1.1 lib/salesforce/bulk/operations.rb
activeforce-1.10.1 lib/salesforce/bulk/operations.rb
activeforce-2.1.0 lib/salesforce/bulk/operations.rb
activeforce-1.10.0 lib/salesforce/bulk/operations.rb
activeforce-2.0.1 lib/salesforce/bulk/operations.rb
activeforce-2.0.0 lib/salesforce/bulk/operations.rb
activeforce-1.9.1 lib/salesforce/bulk/operations.rb
activeforce-1.9.0 lib/salesforce/bulk/operations.rb