electrodb 2.9.2 → 2.9.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/clauses.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electrodb",
3
- "version": "2.9.2",
3
+ "version": "2.9.3",
4
4
  "description": "A library to more easily create and interact with multiple entities and heretical relationships in dynamodb",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/clauses.js CHANGED
@@ -314,7 +314,7 @@ let clauses = {
314
314
  let record = entity.model.schema.checkCreate({...payload});
315
315
  const attributes = state.getCompositeAttributes();
316
316
  const filter = state.query.filter[ExpressionTypes.ConditionExpression];
317
- const {pk, sk} = entity._getPrimaryIndexFieldNames();
317
+ const { pk, sk } = entity._getPrimaryIndexFieldNames();
318
318
  filter.unsafeSet(FilterOperationNames.notExists, pk);
319
319
  if (sk) {
320
320
  filter.unsafeSet(FilterOperationNames.notExists, sk);
@@ -456,7 +456,7 @@ let clauses = {
456
456
  if (!wasSet) {
457
457
  throw new e.ElectroError(e.ErrorCodes.DuplicateUpdateCompositesProvided, `The composite attribute ${attrName} has been provided more than once with different values. Remove the duplication before running again`);
458
458
  }
459
- state.applyCondition(FilterOperationNames.eqOrNotExists, attrName, composites[attrName]);
459
+ state.applyCondition(FilterOperationNames.eq, attrName, composites[attrName]);
460
460
  }
461
461
  }
462
462
  return state;