• Puts or deletes multiple items in one or more tables by delegating to BatchWriteCommand.

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

    Example

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

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

    Returns

    The same response returned by send()ing this command

    Parameters

    • requestItems: Record<string, WriteRequest[]>[]

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

    • Optional options: Partial<BatchWriteCommandInput>

      The options accepted by the original BatchWriteCommand class

    Returns Promise<BatchWriteCommandOutput>

Generated using TypeDoc