vlocode-project - v1.40.0-beta-4
    Preparing search index...

    Class RecordBatch

    Inserts and updates a set records and transparently selects either the collections or bulk API.

    Index

    Constructors

    Properties

    bulkPollInterval: 5000
    bulkPollTimeout: number = ...
    failedCount: number = 0
    insert: Map<string, { data: any; ref: string }[]> = ...
    isExecuting: boolean = false
    logger: Logger = ...
    options: { bulkApiThreshold: number; chunkSize: number; useBulkApi: boolean } = ...

    Type Declaration

    • bulkApiThreshold: number
    • chunkSize: number

      Max chunk size when using the collections API only; if using bulk API once

    • useBulkApi: boolean

      Allow the use of the bulk API when the record count is larger then the bulk API threshold (chunkSize)

    processedCount: number = 0
    progressReporter: undefined | null | BatchProgressCallback
    recordCount: number = 0
    update: Map<string, { data: any; ref: string }[]> = ...

    Accessors

    Methods

    • Validate if the specified record data can be inserted; if not drop any fields that cannot be inserted or updated depending on the mode property specified.

      Parameters

      • sobjectType: string

        SObject type

      • values: object

        Values of the record

      • mode: "insert" | "update"

        Check for update or insert

      Returns Promise<{}>