Class: Batch

Bulk~Batch

(protected) new Batch(job, batchIdopt)

Batch (extends RecordStream)
Parameters:
Name Type Attributes Description
job Bulk~Job Bulk job object
batchId String <optional>
Batch ID (if already available)
Implements:
Source:

Extends

  • stream.Writable

Methods

check(callbackopt) → {Promise.<Bulk~BatchInfo>}

Check the latest batch status in server
Parameters:
Name Type Attributes Description
callback Callback.<Bulk~BatchInfo> <optional>
Callback function
Source:
Returns:
Type
Promise.<Bulk~BatchInfo>

execute(inputopt, callbackopt) → {Bulk~Batch}

Execute batch operation
Parameters:
Name Type Attributes Description
input Array.<Record> | stream.Stream | String <optional>
Input source for batch operation. Accepts array of records, CSV string, and CSV data input stream in insert/update/upsert/delete/hardDelete operation, SOQL string in query operation.
callback Callback.<(Array.<RecordResult>|Array.<BatchResultInfo>)> <optional>
Callback function
Source:
Returns:
Type
Bulk~Batch

poll(interval, timeout)

Polling the batch result and retrieve
Parameters:
Name Type Description
interval Number Polling interval in milliseconds
timeout Number Polling timeout in milliseconds
Source:

retrieve(callbackopt) → {Promise.<(Array.<RecordResult>|Array.<Bulk~BatchResultInfo>)>}

Retrieve batch result
Parameters:
Name Type Attributes Description
callback Callback.<(Array.<RecordResult>|Array.<Bulk~BatchResultInfo>)> <optional>
Callback function
Source:
Returns:
Type
Promise.<(Array.<RecordResult>|Array.<Bulk~BatchResultInfo>)>

then()

Promise/A+ interface http://promises-aplus.github.io/promises-spec/ Delegate to deferred promise, return promise instance for batch result
Source:

thenCall()

Promise/A+ extension Call "then" using given node-style callback function
Source: