- put(tableName: string, item: Record<string, any> | Record<string, any>[]): Record<string, (Omit<WriteRequest, "PutRequest" | "DeleteRequest"> & { DeleteRequest?: Omit<DeleteRequest, "Key"> & { Key: Record<string, NativeAttributeValue> | undefined }; PutRequest?: Omit<PutRequest, "Item"> & { Item: Record<string, NativeAttributeValue> | undefined } })[]>
-
Parameters
-
tableName: string
-
item: Record<string, any> | Record<string, any>[]
Returns Record<string, (Omit<WriteRequest, "PutRequest" | "DeleteRequest"> & { DeleteRequest?: Omit<DeleteRequest, "Key"> & { Key: Record<string, NativeAttributeValue> | undefined }; PutRequest?: Omit<PutRequest, "Item"> & { Item: Record<string, NativeAttributeValue> | undefined } })[]>
Create a map to put one or more items in a call to batchWrite.
Returns
A map in the format
{ tableName: [ { PutRequest: { ... } }, ...] }