ag-common 0.0.745 → 0.0.746

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.
@@ -65,7 +65,9 @@ const executeQuery = (params, startKey) => __awaiter(void 0, void 0, void 0, fun
65
65
  const queryParams = Object.assign({ TableName: params.tableName, KeyConditionExpression: kce, ExpressionAttributeNames: Object.assign(Object.assign({}, ean), (_b = params.filter) === null || _b === void 0 ? void 0 : _b.attrNames), ExpressionAttributeValues: Object.assign(Object.assign({}, eav), (_c = params.filter) === null || _c === void 0 ? void 0 : _c.attrValues), ScanIndexForward: (_d = params.sortAscending) !== null && _d !== void 0 ? _d : true, Limit: (_e = params.BATCH_SIZE) !== null && _e !== void 0 ? _e : params.limit, IndexName: params.indexName, ExclusiveStartKey: startKey }, (params.filter && Object.assign({ FilterExpression: params.filter.filterExpression }, (params.filter.attrValues && {
66
66
  ExpressionAttributeValues: Object.assign(Object.assign({}, eav), params.filter.attrValues),
67
67
  }))));
68
- return (0, withRetry_1.withRetry)(() => _1.dynamoDb.send(new lib_dynamodb_1.QueryCommand(queryParams)), 'queryDynamo');
68
+ return (0, withRetry_1.withRetry)(() => _1.dynamoDb.send(new lib_dynamodb_1.QueryCommand(queryParams)), 'queryDynamo', {
69
+ maxRetries: params.alwaysRetry ? null : undefined,
70
+ });
69
71
  });
70
72
  /**
71
73
  * Helper function that builds the scan parameters and executes the scan
@@ -37,6 +37,7 @@ export interface DynamoQueryParams {
37
37
  limit?: number;
38
38
  filter?: DynamoFilter;
39
39
  sortAscending?: boolean;
40
+ alwaysRetry?: boolean;
40
41
  }
41
42
  export interface DynamoBatchQueryParams {
42
43
  tableName: string;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.745",
2
+ "version": "0.0.746",
3
3
  "name": "ag-common",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",