• Puts or deletes multiple items in one or more tables by delegating to DocumentClient.batchWrite().

    You can use the batchItem helper to create the request items.

    Example

    import { batchItem as bi } from 'dynamo-facade-v2';

    df.batchWrite([
    bi.put('movies', [
    { actor: 'Tom Hanks', movie: 'Toy Story' },
    { actor: 'Tom Hanks', movie: 'Forrest Gump' },
    ])
    ])

    Returns

    The same response returned by batchWrite().promise()

    Parameters

    • requestItems: BatchWriteItemRequestMap[]

      The items to write in the format { tableName: [ { ...request }, ...] }

    • Optional options: Partial<BatchWriteItemInput>

      The options accepted by the original batchWrite method

    Returns Promise<PromiseResult<BatchWriteItemOutput, AWSError>>

Generated using TypeDoc