• Returns the attributes of one or more items from one or more tables by delegating to BatchGetCommand.

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

    Example

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

    // 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 send()ing this command

    Parameters

    • requestItems: Record<string, Omit<KeysAndAttributes, "Keys"> & { Keys: undefined | Record<string, any>[] }>[]

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

    • Optional options: Partial<BatchGetCommandInput>

      The options accepted by the original BatchGetCommand class

    Returns Promise<BatchGetCommandOutput>

Generated using TypeDoc