Class: query

Adaptor.query(sObject, operation, options, fun, state) → {Operation}

new query(sObject, operation, options, fun, state) → {Operation}

Create and execute a bulk job.
Parameters:
Name Type Description
sObject String API name of the sObject.
operation String The bulk operation to be performed
options Object Options passed to the bulk api.
fun function A function which takes state and returns an array.
state State Runtime state.
Source:
Returns:
Type
Operation
Example
bulk('Patient__c', 'insert', { failOnError: true, pollInterval: 3000, pollTimeout: 240000 }, state => {
  return state.data.someArray.map(x => {
    return { 'Age__c': x.age, 'Name': x.name }
  })
});