• Returns the attributes of one or more items from one or more tables by delegating to DocumentClient.batchGet().

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

    Example

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

    // These two are equivalent
    df.batchGet([
    bi.get('movies', { actor: 'Tom Hanks', movie: 'Toy Story' }),
    bi.get('movies', { actor: 'Tom Hanks', movie: 'Forrest Gump' }),
    ])

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

    Returns

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

    Parameters

    • requestItems: BatchGetRequestMap[]

      The items to get in the format { [tableName]: { Keys: [...] } }

    • Optional options: Partial<BatchGetItemInput>

      The options accepted by the original batchGet method

    Returns Promise<PromiseResult<BatchGetItemOutput, AWSError>>

Generated using TypeDoc