wirejs-deploy-amplify-basic 0.0.75-table-resource → 0.0.76-table-resource
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -249,17 +249,9 @@ export class DistributedTable extends Resource {
|
|
|
249
249
|
partition: this.key.partition,
|
|
250
250
|
sort: this.key.sort
|
|
251
251
|
});
|
|
252
|
-
console.log('DynamoDB query params', {
|
|
253
|
-
TableName: this.table,
|
|
254
|
-
IndexName: isIndexNameTheDefault ? undefined : options.by,
|
|
255
|
-
KeyConditionExpression: keyConditionExpression,
|
|
256
|
-
FilterExpression: filterExpression,
|
|
257
|
-
ExpressionAttributeValues: expressionAttributeValues,
|
|
258
|
-
ExpressionAttributeNames: expressionAttributeNames,
|
|
259
|
-
});
|
|
260
252
|
let lastEvaluatedKey = undefined;
|
|
261
253
|
do {
|
|
262
|
-
const
|
|
254
|
+
const command = new QueryCommand({
|
|
263
255
|
TableName: this.table,
|
|
264
256
|
IndexName: isIndexNameTheDefault ? undefined : options.by,
|
|
265
257
|
KeyConditionExpression: keyConditionExpression,
|
|
@@ -267,16 +259,23 @@ export class DistributedTable extends Resource {
|
|
|
267
259
|
ExpressionAttributeValues: expressionAttributeValues,
|
|
268
260
|
ExpressionAttributeNames: expressionAttributeNames,
|
|
269
261
|
ExclusiveStartKey: lastEvaluatedKey,
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
262
|
+
});
|
|
263
|
+
console.log('DynamoDB query command:', JSON.stringify(command, null, 2));
|
|
264
|
+
try {
|
|
265
|
+
const result = await this.ddbClient.send(command);
|
|
266
|
+
console.log('DDB Query result:', result);
|
|
267
|
+
for (const item of result.Items || []) {
|
|
268
|
+
if (!item)
|
|
269
|
+
continue;
|
|
270
|
+
const record = this.parse(item);
|
|
271
|
+
yield record;
|
|
272
|
+
}
|
|
273
|
+
lastEvaluatedKey = result.LastEvaluatedKey;
|
|
274
|
+
}
|
|
275
|
+
catch (error) {
|
|
276
|
+
console.error('Error executing query:', error);
|
|
277
|
+
throw error;
|
|
278
278
|
}
|
|
279
|
-
lastEvaluatedKey = result.LastEvaluatedKey;
|
|
280
279
|
} while (lastEvaluatedKey);
|
|
281
280
|
}
|
|
282
281
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wirejs-deploy-amplify-basic",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.76-table-resource",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"recursive-copy": "^2.0.14",
|
|
33
33
|
"rimraf": "^6.0.1",
|
|
34
34
|
"wirejs-dom": "^1.0.38",
|
|
35
|
-
"wirejs-resources": "^0.1.
|
|
35
|
+
"wirejs-resources": "^0.1.44-table-resource"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@aws-amplify/backend": "^1.14.0",
|