Closed kitar closed 1 year ago
Working on an implementation for BatchGetItem and BatchWriteItem, inspired by these experiments: #25, #32. (Closes #32, closes #33)
$query->batchGetItem($keys); $query->batchWriteItem($requestItems); // handy methods for batchWriteItem $query->batchPutItem($items); $query->batchDeleteItem($keys);
MyModel::batchGetItem($keys); MyModel::batchWriteItem($requestItems); // handy methods for batchWriteItem MyModel::batchPutItem($items); MyModel::batchDeleteItem($keys);
Array of keys to get or delete. For example:
[ [ 'PK' => 'ITEM#', 'SK' => 'ITEM#1', ], // ... ]
Array of items to put. For example:
[ [ 'PK' => 'ITEM#', 'SK' => 'ITEM#1', 'attribute1' => 'foo', 'attribute2' => 'bar', ], // ... ]
RequestItems (not marshaled) to pass directly to BatchWriteItem. For example:
[ [ 'PutRequest' => [ 'Item' => [ 'PK' => 'ITEM#', 'SK' => 'ITEM#1', 'attribute1' => 'foo', 'attribute2' => 'bar', ], ], ], [ 'DeleteRequest' => [ 'Item' => [ 'PK' => 'ITEM#', 'SK' => 'ITEM#1', ], ], ], ]
Nice work @kitar 😎😍
Working on an implementation for BatchGetItem and BatchWriteItem, inspired by these experiments: #25, #32. (Closes #32, closes #33)
Usage
via query builder
via Model
Params
$keys
Array of keys to get or delete. For example:
$items
Array of items to put. For example:
$requestItems
RequestItems (not marshaled) to pass directly to BatchWriteItem. For example: