@infra-blocks/aws-dynamodb 0.13.0 → 0.14.0-alpha.0

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.
@@ -33,6 +33,7 @@ class AttributeValues {
33
33
  *
34
34
  * @returns The reference associated with the attribute value.
35
35
  */
36
+ //TODO: rename to substitute so it's the same errrrrwhere.
36
37
  reference(value) {
37
38
  const existing = this.values.get(value);
38
39
  if (existing != null) {
@@ -1 +1 @@
1
- {"version":3,"file":"values.js","sourceRoot":"","sources":["../../../../src/commands/attributes/values.ts"],"names":[],"mappings":";;;AAIA;;;;;;;;;;;;GAYG;AACH,MAAa,eAAe;IACT,MAAM,CAAsC;IACrD,OAAO,CAAS;IAExB;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,EAAkC,CAAC;QACxD,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;IACnB,CAAC;IAED;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,KAAqB;QAC7B,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACxC,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC;YACrB,6EAA6E;YAC7E,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QACvC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QAClC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,aAAa;QACX,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YAC3B,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,MAAM,MAAM,GAA2C,EAAE,CAAC;QAC1D,KAAK,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;YACvD,MAAM,CAAC,SAAS,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,CAAC;YACvD,MAAM,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC;QAC5B,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,aAAa;QACnB,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,OAAO,EAAoB,CAAC;QACvD,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC;QAClB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,CAAC,MAAM;QACX,OAAO,IAAI,eAAe,EAAE,CAAC;IAC/B,CAAC;CACF;AAvDD,0CAuDC"}
@@ -11,18 +11,47 @@ export interface ExpressionParams {
11
11
  export declare class Expression {
12
12
  private readonly stringifier;
13
13
  constructor(params: ExpressionParams);
14
- and(rhs: Expression): Expression;
15
- or(rhs: Expression): Expression;
14
+ /**
15
+ * Returns an expression that combines this one with the provided expression using the `AND` operator.
16
+ *
17
+ * @param other - The other expression to combine with this one.
18
+ * @returns An {@link Expression} that is true only if both expressions are true.
19
+ */
20
+ and(other: Expression): Expression;
21
+ /**
22
+ * Returns an expression that combines this one with the provided expression using the `OR` operator.
23
+ *
24
+ * @param other - The other expression to combine with this one.
25
+ * @returns An {@link Expression} that is true if any of the expressions is true.
26
+ */
27
+ or(other: Expression): Expression;
16
28
  stringify(params: {
17
29
  attributeNames: AttributeNames;
18
30
  attributeValues: AttributeValues;
19
31
  }): string;
20
32
  }
21
33
  export declare function expression(params: ExpressionParams): Expression;
34
+ /**
35
+ * Negates the provided expression using the `NOT` operator.
36
+ *
37
+ * @param expression - The expression to negate.
38
+ * @returns An {@link Expression} that corresponds to the negation the provided expression.
39
+ */
22
40
  export declare function not(expression: Expression): Expression;
23
41
  export declare abstract class Operand {
24
42
  protected constructor();
25
43
  beginsWith(rhs: Operand): Expression;
44
+ /**
45
+ * Returns an expression that checks if this operand is between the two provided ones using the `BETWEEN` operator.
46
+ *
47
+ * Both bounds are inclusive, meaning that the returned expression corresponds to `lower <= this <= upper`.
48
+ *
49
+ * @param lower - The lower inclusive bound of the range.
50
+ * @param upper - The upper inclusive bound of the range.
51
+ *
52
+ * @returns An {@link Expression} that is true if this operand is between the two provided bounds.
53
+ */
54
+ between(lower: Operand, upper: Operand): Expression;
26
55
  contains(rhs: Operand): Expression;
27
56
  /**
28
57
  * Tests that two operands are equals.
@@ -39,7 +68,7 @@ export declare abstract class Operand {
39
68
  */
40
69
  eq: (rhs: Operand) => Expression;
41
70
  /**
42
- * Tests that the left operand is greater than the right operand.
71
+ * Tests that this operand is greater than the right operand.
43
72
  *
44
73
  * This uses the `>` operator.
45
74
  *
@@ -49,7 +78,7 @@ export declare abstract class Operand {
49
78
  */
50
79
  greaterThan(rhs: Operand): Expression;
51
80
  /**
52
- * Tests that the left operand is greater than or equals to the right operand.
81
+ * Tests that this operand is greater than or equals to the right operand.
53
82
  *
54
83
  * This uses the `>=` operator.
55
84
  *
@@ -67,7 +96,18 @@ export declare abstract class Operand {
67
96
  */
68
97
  gte: (rhs: Operand) => Expression;
69
98
  /**
70
- * Tests that the left operand is lower than the right operand.
99
+ * Tests that this operand is contained within the provided list.
100
+ *
101
+ * This uses the `IN` operator.
102
+ *
103
+ * @param operands - The list of operands to check against. This function throws if the list is
104
+ * empty or contains more than 100 operands.
105
+ *
106
+ * @returns The corresponding {@link Expression} that is true if this operand is contained within the provided list.
107
+ */
108
+ in(...operands: Operand[]): Expression;
109
+ /**
110
+ * Tests that this operand is lower than the right operand.
71
111
  *
72
112
  * This uses the `<` operator.
73
113
  *
@@ -77,7 +117,7 @@ export declare abstract class Operand {
77
117
  */
78
118
  lowerThan(rhs: Operand): Expression;
79
119
  /**
80
- * Tests that the left operand is lower than or equals to the right operand.
120
+ * Tests that this operand is lower than or equals to the right operand.
81
121
  *
82
122
  * This uses the `<=` operator.
83
123
  *
@@ -109,7 +149,7 @@ export declare abstract class Operand {
109
149
  */
110
150
  ne: (rhs: Operand) => Expression;
111
151
  size(): Operand;
112
- abstract register(params: {
152
+ abstract substitute(params: {
113
153
  attributeNames: AttributeNames;
114
154
  attributeValues: AttributeValues;
115
155
  }): string;
@@ -117,21 +157,29 @@ export declare abstract class Operand {
117
157
  export declare class ExpressionAttribute extends Operand {
118
158
  private readonly path;
119
159
  constructor(path: AttributePath);
160
+ /**
161
+ * @returns An {@link Expression} that returns true if the provided attribute path exists.
162
+ */
120
163
  exists(): Expression;
164
+ /**
165
+ * @param type - The type to check against.
166
+ * @returns An {@link Expression} that returns true if there exists an attribute at
167
+ * the provided path of the given type.
168
+ */
169
+ isType(type: ExpressionValue<AttributeType>): Expression;
121
170
  notExists(): Expression;
122
- type(type: AttributeType): Expression;
123
- register(params: {
171
+ substitute(params: {
124
172
  attributeNames: AttributeNames;
125
173
  attributeValues: AttributeValues;
126
174
  }): string;
127
175
  }
128
176
  export declare function attribute(path: AttributePath): ExpressionAttribute;
129
- export declare class ExpressionValue extends Operand {
177
+ export declare class ExpressionValue<T extends AttributeValue> extends Operand {
130
178
  private readonly value;
131
- constructor(value: AttributeValue);
132
- register(params: {
179
+ constructor(value: T);
180
+ substitute(params: {
133
181
  attributeNames: AttributeNames;
134
182
  attributeValues: AttributeValues;
135
183
  }): string;
136
184
  }
137
- export declare function value(value: AttributeValue): ExpressionValue;
185
+ export declare function value<T extends AttributeValue = AttributeValue>(value: AttributeValue): ExpressionValue<T>;
@@ -12,20 +12,32 @@ class Expression {
12
12
  const { stringify } = params;
13
13
  this.stringifier = stringify;
14
14
  }
15
- and(rhs) {
15
+ /**
16
+ * Returns an expression that combines this one with the provided expression using the `AND` operator.
17
+ *
18
+ * @param other - The other expression to combine with this one.
19
+ * @returns An {@link Expression} that is true only if both expressions are true.
20
+ */
21
+ and(other) {
16
22
  return new Expression({
17
23
  stringify: ({ attributeNames, attributeValues }) => {
18
24
  const left = this.stringify({ attributeNames, attributeValues });
19
- const right = rhs.stringify({ attributeNames, attributeValues });
25
+ const right = other.stringify({ attributeNames, attributeValues });
20
26
  return `(${left} AND ${right})`;
21
27
  },
22
28
  });
23
29
  }
24
- or(rhs) {
30
+ /**
31
+ * Returns an expression that combines this one with the provided expression using the `OR` operator.
32
+ *
33
+ * @param other - The other expression to combine with this one.
34
+ * @returns An {@link Expression} that is true if any of the expressions is true.
35
+ */
36
+ or(other) {
25
37
  return new Expression({
26
38
  stringify: ({ attributeNames, attributeValues }) => {
27
39
  const left = this.stringify({ attributeNames, attributeValues });
28
- const right = rhs.stringify({ attributeNames, attributeValues });
40
+ const right = other.stringify({ attributeNames, attributeValues });
29
41
  return `(${left} OR ${right})`;
30
42
  },
31
43
  });
@@ -38,6 +50,12 @@ exports.Expression = Expression;
38
50
  function expression(params) {
39
51
  return new Expression(params);
40
52
  }
53
+ /**
54
+ * Negates the provided expression using the `NOT` operator.
55
+ *
56
+ * @param expression - The expression to negate.
57
+ * @returns An {@link Expression} that corresponds to the negation the provided expression.
58
+ */
41
59
  function not(expression) {
42
60
  return new Expression({
43
61
  stringify: ({ attributeNames, attributeValues }) => {
@@ -51,7 +69,24 @@ class Operand {
51
69
  beginsWith(rhs) {
52
70
  return expression({
53
71
  stringify: ({ attributeNames, attributeValues }) => {
54
- return `begins_with(${this.register({ attributeNames, attributeValues })}, ${rhs.register({ attributeNames, attributeValues })})`;
72
+ return `begins_with(${this.substitute({ attributeNames, attributeValues })}, ${rhs.substitute({ attributeNames, attributeValues })})`;
73
+ },
74
+ });
75
+ }
76
+ /**
77
+ * Returns an expression that checks if this operand is between the two provided ones using the `BETWEEN` operator.
78
+ *
79
+ * Both bounds are inclusive, meaning that the returned expression corresponds to `lower <= this <= upper`.
80
+ *
81
+ * @param lower - The lower inclusive bound of the range.
82
+ * @param upper - The upper inclusive bound of the range.
83
+ *
84
+ * @returns An {@link Expression} that is true if this operand is between the two provided bounds.
85
+ */
86
+ between(lower, upper) {
87
+ return expression({
88
+ stringify: ({ attributeNames, attributeValues }) => {
89
+ return `${this.substitute({ attributeNames, attributeValues })} BETWEEN ${lower.substitute({ attributeNames, attributeValues })} AND ${upper.substitute({ attributeNames, attributeValues })}`;
55
90
  },
56
91
  });
57
92
  }
@@ -59,7 +94,7 @@ class Operand {
59
94
  contains(rhs) {
60
95
  return expression({
61
96
  stringify: ({ attributeNames, attributeValues }) => {
62
- return `contains(${this.register({ attributeNames, attributeValues })}, ${rhs.register({ attributeNames, attributeValues })})`;
97
+ return `contains(${this.substitute({ attributeNames, attributeValues })}, ${rhs.substitute({ attributeNames, attributeValues })})`;
63
98
  },
64
99
  });
65
100
  }
@@ -75,7 +110,7 @@ class Operand {
75
110
  equals(rhs) {
76
111
  return expression({
77
112
  stringify: ({ attributeNames, attributeValues }) => {
78
- return `${this.register({ attributeNames, attributeValues })} = ${rhs.register({ attributeNames, attributeValues })}`;
113
+ return `${this.substitute({ attributeNames, attributeValues })} = ${rhs.substitute({ attributeNames, attributeValues })}`;
79
114
  },
80
115
  });
81
116
  }
@@ -84,7 +119,7 @@ class Operand {
84
119
  */
85
120
  eq = this.equals.bind(this);
86
121
  /**
87
- * Tests that the left operand is greater than the right operand.
122
+ * Tests that this operand is greater than the right operand.
88
123
  *
89
124
  * This uses the `>` operator.
90
125
  *
@@ -95,12 +130,12 @@ class Operand {
95
130
  greaterThan(rhs) {
96
131
  return expression({
97
132
  stringify: ({ attributeNames, attributeValues }) => {
98
- return `${this.register({ attributeNames, attributeValues })} > ${rhs.register({ attributeNames, attributeValues })}`;
133
+ return `${this.substitute({ attributeNames, attributeValues })} > ${rhs.substitute({ attributeNames, attributeValues })}`;
99
134
  },
100
135
  });
101
136
  }
102
137
  /**
103
- * Tests that the left operand is greater than or equals to the right operand.
138
+ * Tests that this operand is greater than or equals to the right operand.
104
139
  *
105
140
  * This uses the `>=` operator.
106
141
  *
@@ -111,7 +146,7 @@ class Operand {
111
146
  greaterThanOrEquals(rhs) {
112
147
  return expression({
113
148
  stringify: ({ attributeNames, attributeValues }) => {
114
- return `${this.register({ attributeNames, attributeValues })} >= ${rhs.register({ attributeNames, attributeValues })}`;
149
+ return `${this.substitute({ attributeNames, attributeValues })} >= ${rhs.substitute({ attributeNames, attributeValues })}`;
115
150
  },
116
151
  });
117
152
  }
@@ -124,7 +159,33 @@ class Operand {
124
159
  */
125
160
  gte = this.greaterThanOrEquals.bind(this);
126
161
  /**
127
- * Tests that the left operand is lower than the right operand.
162
+ * Tests that this operand is contained within the provided list.
163
+ *
164
+ * This uses the `IN` operator.
165
+ *
166
+ * @param operands - The list of operands to check against. This function throws if the list is
167
+ * empty or contains more than 100 operands.
168
+ *
169
+ * @returns The corresponding {@link Expression} that is true if this operand is contained within the provided list.
170
+ */
171
+ in(...operands) {
172
+ if (operands.length === 0) {
173
+ throw new Error("the IN operator requires at least one operand.");
174
+ }
175
+ if (operands.length > 100) {
176
+ throw new Error(`up to 100 operands are support for the IN operator, got ${operands.length}`);
177
+ }
178
+ return expression({
179
+ stringify: ({ attributeNames, attributeValues }) => {
180
+ const operandsString = operands
181
+ .map((operand) => operand.substitute({ attributeNames, attributeValues }))
182
+ .join(",");
183
+ return `${this.substitute({ attributeNames, attributeValues })} IN (${operandsString})`;
184
+ },
185
+ });
186
+ }
187
+ /**
188
+ * Tests that this operand is lower than the right operand.
128
189
  *
129
190
  * This uses the `<` operator.
130
191
  *
@@ -135,12 +196,12 @@ class Operand {
135
196
  lowerThan(rhs) {
136
197
  return expression({
137
198
  stringify: ({ attributeNames, attributeValues }) => {
138
- return `${this.register({ attributeNames, attributeValues })} < ${rhs.register({ attributeNames, attributeValues })}`;
199
+ return `${this.substitute({ attributeNames, attributeValues })} < ${rhs.substitute({ attributeNames, attributeValues })}`;
139
200
  },
140
201
  });
141
202
  }
142
203
  /**
143
- * Tests that the left operand is lower than or equals to the right operand.
204
+ * Tests that this operand is lower than or equals to the right operand.
144
205
  *
145
206
  * This uses the `<=` operator.
146
207
  *
@@ -151,7 +212,7 @@ class Operand {
151
212
  lowerThanOrEquals(rhs) {
152
213
  return expression({
153
214
  stringify: ({ attributeNames, attributeValues }) => {
154
- return `${this.register({ attributeNames, attributeValues })} <= ${rhs.register({ attributeNames, attributeValues })}`;
215
+ return `${this.substitute({ attributeNames, attributeValues })} <= ${rhs.substitute({ attributeNames, attributeValues })}`;
155
216
  },
156
217
  });
157
218
  }
@@ -175,7 +236,7 @@ class Operand {
175
236
  notEquals(rhs) {
176
237
  return expression({
177
238
  stringify: ({ attributeNames, attributeValues }) => {
178
- return `${this.register({ attributeNames, attributeValues })} <> ${rhs.register({ attributeNames, attributeValues })}`;
239
+ return `${this.substitute({ attributeNames, attributeValues })} <> ${rhs.substitute({ attributeNames, attributeValues })}`;
179
240
  },
180
241
  });
181
242
  }
@@ -195,32 +256,40 @@ class ExpressionAttribute extends Operand {
195
256
  super();
196
257
  this.path = path;
197
258
  }
259
+ /**
260
+ * @returns An {@link Expression} that returns true if the provided attribute path exists.
261
+ */
198
262
  // NOTE: the left hand side of this expression can only be a literal value (tested)
199
263
  exists() {
200
264
  return expression({
201
265
  stringify: ({ attributeNames, attributeValues }) => {
202
- return `attribute_exists(${this.register({ attributeNames, attributeValues })})`;
266
+ return `attribute_exists(${this.substitute({ attributeNames, attributeValues })})`;
203
267
  },
204
268
  });
205
269
  }
206
- // NOTE: the left hand side of this expression can only be a literal value (tested)
207
- notExists() {
270
+ /**
271
+ * @param type - The type to check against.
272
+ * @returns An {@link Expression} that returns true if there exists an attribute at
273
+ * the provided path of the given type.
274
+ */
275
+ // NOTE: the left hand side of this expression *can be* an attribute value pointing to a valid path.
276
+ // NOTE: the right hand side of this expression *must be* an expression attribute (not a literal).
277
+ isType(type) {
208
278
  return expression({
209
279
  stringify: ({ attributeNames, attributeValues }) => {
210
- return `attribute_not_exists(${this.register({ attributeNames, attributeValues })})`;
280
+ return `attribute_type(${this.substitute({ attributeNames, attributeValues })}, ${type.substitute({ attributeNames, attributeValues })})`;
211
281
  },
212
282
  });
213
283
  }
214
- // NOTE: the left hand side of this expression *can be* an attribute value pointing to a valid path.
215
- // NOTE: the right hand side of this expression *must be* an expression attribute (not a literal).
216
- type(type) {
284
+ // NOTE: the left hand side of this expression can only be a literal value (tested)
285
+ notExists() {
217
286
  return expression({
218
287
  stringify: ({ attributeNames, attributeValues }) => {
219
- return `attribute_type(${this.register({ attributeNames, attributeValues })}, ${attributeValues.reference(type)})`;
288
+ return `attribute_not_exists(${this.substitute({ attributeNames, attributeValues })})`;
220
289
  },
221
290
  });
222
291
  }
223
- register(params) {
292
+ substitute(params) {
224
293
  const { attributeNames } = params;
225
294
  return attributeNames.substitute(this.path);
226
295
  }
@@ -235,7 +304,7 @@ class ExpressionValue extends Operand {
235
304
  super();
236
305
  this.value = value;
237
306
  }
238
- register(params) {
307
+ substitute(params) {
239
308
  const { attributeValues } = params;
240
309
  return attributeValues.reference(this.value).toString();
241
310
  }
@@ -250,8 +319,8 @@ class SizeOperand extends Operand {
250
319
  super();
251
320
  this.inner = operand;
252
321
  }
253
- register(params) {
254
- return `size(${this.inner.register(params)})`;
322
+ substitute(params) {
323
+ return `size(${this.inner.substitute(params)})`;
255
324
  }
256
325
  }
257
326
  //# sourceMappingURL=expression.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"expression.js","sourceRoot":"","sources":["../../../../src/commands/expressions/expression.ts"],"names":[],"mappings":";;;AA+DA,gCAEC;AAED,kBAMC;AAmND,8BAEC;AAmBD,sBAEC;AAzRD,8JAA8J;AAC9J,MAAa,UAAU;IACJ,WAAW,CAAc;IAE1C,YAAY,MAAwB;QAClC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED,GAAG,CAAC,GAAe;QACjB,OAAO,IAAI,UAAU,CAAC;YACpB,SAAS,EAAE,CAAC,EAAE,cAAc,EAAE,eAAe,EAAE,EAAE,EAAE;gBACjD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC,CAAC;gBACjE,MAAM,KAAK,GAAG,GAAG,CAAC,SAAS,CAAC,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC,CAAC;gB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GAAG,CAAC;IAChD,CAAC;CACF"}
1
+ {"version":3,"file":"expression.js","sourceRoot":"","sources":["../../../../src/commands/expressions/expression.ts"],"names":[],"mappings":";;;AAwEA,gCAEC;AAQD,kBAMC;AA6QD,8BAEC;AAmBD,sBAIC;AAvWD,8JAA8J;AAC9J,MAAa,UAAU;IACJ,WAAW,CAAc;IAE1C,YAAY,MAAwB;QAClC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED;;;;;OAKG;IACH,GAAG,CAAC,KAAiB;QACnB,OAAO,IAAI,UAAU,CAAC;YACpB,SAAS,EAAE,CAAC,EAAE,cAAc,EAAE,eAAe,EAAE,EAAE,EAAE;gBACjD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC,CAAC;gBACjE,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC,CAAC;gBACnE,OAAO,IAAI,IAAI,QAAQ,KAAK,GAAG,CAAC;YAClC,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,EAAE,CAAC,KAAiB;QAClB,OAAO,IAAI,UAAU,CAAC;YACpB,SAAS,EAAE,CAAC,EAAE,cAAc,EAAE,eAAe,EAAE,EAAE,EAAE;gBACjD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC,CAAC;gBACjE,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC,CAAC;gBACnE,OAAO,IAAI,IAAI,OAAO,KAAK,GAAG,CAAC;YACjC,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAED,SAAS,CAAC,MAGT;QACC,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,C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O;IACnD,KAAK,CAAI;IAE1B,YAAY,KAAQ;QAClB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,UAAU,CAAC,MAGV;QACC,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;QACnC,OAAO,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC1D,CAAC;CACF;AAfD,0CAeC;AAED,SAAgB,KAAK,CACnB,KAAqB;IAErB,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,WAAY,SAAQ,OAAO;IACd,KAAK,CAAU;IAEhC,YAAY,OAAgB;QAC1B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;IACvB,CAAC;IAED,UAAU,CAAC,MAGV;QACC,OAAO,QAAQ,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC;IAClD,CAAC;CACF"}
@@ -30,6 +30,7 @@ export class AttributeValues {
30
30
  *
31
31
  * @returns The reference associated with the attribute value.
32
32
  */
33
+ //TODO: rename to substitute so it's the same errrrrwhere.
33
34
  reference(value) {
34
35
  const existing = this.values.get(value);
35
36
  if (existing != null) {
@@ -1 +1 @@
1
- {"version":3,"file":"values.js","sourceRoot":"","sources":["../../../../src/commands/attributes/values.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,eAAe;IACT,MAAM,CAAsC;IACrD,OAAO,CAAS;IAExB;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,EAAkC,CAAC;QACxD,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;IACnB,CAAC;IAED;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,KAAqB;QAC7B,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,C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CAAC,KAAK,CAAC,CAAC;QACxC,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC;YACrB,6EAA6E;YAC7E,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QACvC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QAClC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,aAAa;QACX,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YAC3B,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,MAAM,MAAM,GAA2C,EAAE,CAAC;QAC1D,KAAK,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;YACvD,MAAM,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC;QAC5B,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,aAAa;QACnB,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,OAAO,EAAoB,CAAC;QACvD,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC;QAClB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,CAAC,MAAM;QACX,OAAO,IAAI,eAAe,EAAE,CAAC;IAC/B,CAAC;CACF"}
@@ -11,18 +11,47 @@ export interface ExpressionParams {
11
11
  export declare class Expression {
12
12
  private readonly stringifier;
13
13
  constructor(params: ExpressionParams);
14
- and(rhs: Expression): Expression;
15
- or(rhs: Expression): Expression;
14
+ /**
15
+ * Returns an expression that combines this one with the provided expression using the `AND` operator.
16
+ *
17
+ * @param other - The other expression to combine with this one.
18
+ * @returns An {@link Expression} that is true only if both expressions are true.
19
+ */
20
+ and(other: Expression): Expression;
21
+ /**
22
+ * Returns an expression that combines this one with the provided expression using the `OR` operator.
23
+ *
24
+ * @param other - The other expression to combine with this one.
25
+ * @returns An {@link Expression} that is true if any of the expressions is true.
26
+ */
27
+ or(other: Expression): Expression;
16
28
  stringify(params: {
17
29
  attributeNames: AttributeNames;
18
30
  attributeValues: AttributeValues;
19
31
  }): string;
20
32
  }
21
33
  export declare function expression(params: ExpressionParams): Expression;
34
+ /**
35
+ * Negates the provided expression using the `NOT` operator.
36
+ *
37
+ * @param expression - The expression to negate.
38
+ * @returns An {@link Expression} that corresponds to the negation the provided expression.
39
+ */
22
40
  export declare function not(expression: Expression): Expression;
23
41
  export declare abstract class Operand {
24
42
  protected constructor();
25
43
  beginsWith(rhs: Operand): Expression;
44
+ /**
45
+ * Returns an expression that checks if this operand is between the two provided ones using the `BETWEEN` operator.
46
+ *
47
+ * Both bounds are inclusive, meaning that the returned expression corresponds to `lower <= this <= upper`.
48
+ *
49
+ * @param lower - The lower inclusive bound of the range.
50
+ * @param upper - The upper inclusive bound of the range.
51
+ *
52
+ * @returns An {@link Expression} that is true if this operand is between the two provided bounds.
53
+ */
54
+ between(lower: Operand, upper: Operand): Expression;
26
55
  contains(rhs: Operand): Expression;
27
56
  /**
28
57
  * Tests that two operands are equals.
@@ -39,7 +68,7 @@ export declare abstract class Operand {
39
68
  */
40
69
  eq: (rhs: Operand) => Expression;
41
70
  /**
42
- * Tests that the left operand is greater than the right operand.
71
+ * Tests that this operand is greater than the right operand.
43
72
  *
44
73
  * This uses the `>` operator.
45
74
  *
@@ -49,7 +78,7 @@ export declare abstract class Operand {
49
78
  */
50
79
  greaterThan(rhs: Operand): Expression;
51
80
  /**
52
- * Tests that the left operand is greater than or equals to the right operand.
81
+ * Tests that this operand is greater than or equals to the right operand.
53
82
  *
54
83
  * This uses the `>=` operator.
55
84
  *
@@ -67,7 +96,18 @@ export declare abstract class Operand {
67
96
  */
68
97
  gte: (rhs: Operand) => Expression;
69
98
  /**
70
- * Tests that the left operand is lower than the right operand.
99
+ * Tests that this operand is contained within the provided list.
100
+ *
101
+ * This uses the `IN` operator.
102
+ *
103
+ * @param operands - The list of operands to check against. This function throws if the list is
104
+ * empty or contains more than 100 operands.
105
+ *
106
+ * @returns The corresponding {@link Expression} that is true if this operand is contained within the provided list.
107
+ */
108
+ in(...operands: Operand[]): Expression;
109
+ /**
110
+ * Tests that this operand is lower than the right operand.
71
111
  *
72
112
  * This uses the `<` operator.
73
113
  *
@@ -77,7 +117,7 @@ export declare abstract class Operand {
77
117
  */
78
118
  lowerThan(rhs: Operand): Expression;
79
119
  /**
80
- * Tests that the left operand is lower than or equals to the right operand.
120
+ * Tests that this operand is lower than or equals to the right operand.
81
121
  *
82
122
  * This uses the `<=` operator.
83
123
  *
@@ -109,7 +149,7 @@ export declare abstract class Operand {
109
149
  */
110
150
  ne: (rhs: Operand) => Expression;
111
151
  size(): Operand;
112
- abstract register(params: {
152
+ abstract substitute(params: {
113
153
  attributeNames: AttributeNames;
114
154
  attributeValues: AttributeValues;
115
155
  }): string;
@@ -117,21 +157,29 @@ export declare abstract class Operand {
117
157
  export declare class ExpressionAttribute extends Operand {
118
158
  private readonly path;
119
159
  constructor(path: AttributePath);
160
+ /**
161
+ * @returns An {@link Expression} that returns true if the provided attribute path exists.
162
+ */
120
163
  exists(): Expression;
164
+ /**
165
+ * @param type - The type to check against.
166
+ * @returns An {@link Expression} that returns true if there exists an attribute at
167
+ * the provided path of the given type.
168
+ */
169
+ isType(type: ExpressionValue<AttributeType>): Expression;
121
170
  notExists(): Expression;
122
- type(type: AttributeType): Expression;
123
- register(params: {
171
+ substitute(params: {
124
172
  attributeNames: AttributeNames;
125
173
  attributeValues: AttributeValues;
126
174
  }): string;
127
175
  }
128
176
  export declare function attribute(path: AttributePath): ExpressionAttribute;
129
- export declare class ExpressionValue extends Operand {
177
+ export declare class ExpressionValue<T extends AttributeValue> extends Operand {
130
178
  private readonly value;
131
- constructor(value: AttributeValue);
132
- register(params: {
179
+ constructor(value: T);
180
+ substitute(params: {
133
181
  attributeNames: AttributeNames;
134
182
  attributeValues: AttributeValues;
135
183
  }): string;
136
184
  }
137
- export declare function value(value: AttributeValue): ExpressionValue;
185
+ export declare function value<T extends AttributeValue = AttributeValue>(value: AttributeValue): ExpressionValue<T>;
@@ -5,20 +5,32 @@ export class Expression {
5
5
  const { stringify } = params;
6
6
  this.stringifier = stringify;
7
7
  }
8
- and(rhs) {
8
+ /**
9
+ * Returns an expression that combines this one with the provided expression using the `AND` operator.
10
+ *
11
+ * @param other - The other expression to combine with this one.
12
+ * @returns An {@link Expression} that is true only if both expressions are true.
13
+ */
14
+ and(other) {
9
15
  return new Expression({
10
16
  stringify: ({ attributeNames, attributeValues }) => {
11
17
  const left = this.stringify({ attributeNames, attributeValues });
12
- const right = rhs.stringify({ attributeNames, attributeValues });
18
+ const right = other.stringify({ attributeNames, attributeValues });
13
19
  return `(${left} AND ${right})`;
14
20
  },
15
21
  });
16
22
  }
17
- or(rhs) {
23
+ /**
24
+ * Returns an expression that combines this one with the provided expression using the `OR` operator.
25
+ *
26
+ * @param other - The other expression to combine with this one.
27
+ * @returns An {@link Expression} that is true if any of the expressions is true.
28
+ */
29
+ or(other) {
18
30
  return new Expression({
19
31
  stringify: ({ attributeNames, attributeValues }) => {
20
32
  const left = this.stringify({ attributeNames, attributeValues });
21
- const right = rhs.stringify({ attributeNames, attributeValues });
33
+ const right = other.stringify({ attributeNames, attributeValues });
22
34
  return `(${left} OR ${right})`;
23
35
  },
24
36
  });
@@ -30,6 +42,12 @@ export class Expression {
30
42
  export function expression(params) {
31
43
  return new Expression(params);
32
44
  }
45
+ /**
46
+ * Negates the provided expression using the `NOT` operator.
47
+ *
48
+ * @param expression - The expression to negate.
49
+ * @returns An {@link Expression} that corresponds to the negation the provided expression.
50
+ */
33
51
  export function not(expression) {
34
52
  return new Expression({
35
53
  stringify: ({ attributeNames, attributeValues }) => {
@@ -43,7 +61,24 @@ export class Operand {
43
61
  beginsWith(rhs) {
44
62
  return expression({
45
63
  stringify: ({ attributeNames, attributeValues }) => {
46
- return `begins_with(${this.register({ attributeNames, attributeValues })}, ${rhs.register({ attributeNames, attributeValues })})`;
64
+ return `begins_with(${this.substitute({ attributeNames, attributeValues })}, ${rhs.substitute({ attributeNames, attributeValues })})`;
65
+ },
66
+ });
67
+ }
68
+ /**
69
+ * Returns an expression that checks if this operand is between the two provided ones using the `BETWEEN` operator.
70
+ *
71
+ * Both bounds are inclusive, meaning that the returned expression corresponds to `lower <= this <= upper`.
72
+ *
73
+ * @param lower - The lower inclusive bound of the range.
74
+ * @param upper - The upper inclusive bound of the range.
75
+ *
76
+ * @returns An {@link Expression} that is true if this operand is between the two provided bounds.
77
+ */
78
+ between(lower, upper) {
79
+ return expression({
80
+ stringify: ({ attributeNames, attributeValues }) => {
81
+ return `${this.substitute({ attributeNames, attributeValues })} BETWEEN ${lower.substitute({ attributeNames, attributeValues })} AND ${upper.substitute({ attributeNames, attributeValues })}`;
47
82
  },
48
83
  });
49
84
  }
@@ -51,7 +86,7 @@ export class Operand {
51
86
  contains(rhs) {
52
87
  return expression({
53
88
  stringify: ({ attributeNames, attributeValues }) => {
54
- return `contains(${this.register({ attributeNames, attributeValues })}, ${rhs.register({ attributeNames, attributeValues })})`;
89
+ return `contains(${this.substitute({ attributeNames, attributeValues })}, ${rhs.substitute({ attributeNames, attributeValues })})`;
55
90
  },
56
91
  });
57
92
  }
@@ -67,7 +102,7 @@ export class Operand {
67
102
  equals(rhs) {
68
103
  return expression({
69
104
  stringify: ({ attributeNames, attributeValues }) => {
70
- return `${this.register({ attributeNames, attributeValues })} = ${rhs.register({ attributeNames, attributeValues })}`;
105
+ return `${this.substitute({ attributeNames, attributeValues })} = ${rhs.substitute({ attributeNames, attributeValues })}`;
71
106
  },
72
107
  });
73
108
  }
@@ -76,7 +111,7 @@ export class Operand {
76
111
  */
77
112
  eq = this.equals.bind(this);
78
113
  /**
79
- * Tests that the left operand is greater than the right operand.
114
+ * Tests that this operand is greater than the right operand.
80
115
  *
81
116
  * This uses the `>` operator.
82
117
  *
@@ -87,12 +122,12 @@ export class Operand {
87
122
  greaterThan(rhs) {
88
123
  return expression({
89
124
  stringify: ({ attributeNames, attributeValues }) => {
90
- return `${this.register({ attributeNames, attributeValues })} > ${rhs.register({ attributeNames, attributeValues })}`;
125
+ return `${this.substitute({ attributeNames, attributeValues })} > ${rhs.substitute({ attributeNames, attributeValues })}`;
91
126
  },
92
127
  });
93
128
  }
94
129
  /**
95
- * Tests that the left operand is greater than or equals to the right operand.
130
+ * Tests that this operand is greater than or equals to the right operand.
96
131
  *
97
132
  * This uses the `>=` operator.
98
133
  *
@@ -103,7 +138,7 @@ export class Operand {
103
138
  greaterThanOrEquals(rhs) {
104
139
  return expression({
105
140
  stringify: ({ attributeNames, attributeValues }) => {
106
- return `${this.register({ attributeNames, attributeValues })} >= ${rhs.register({ attributeNames, attributeValues })}`;
141
+ return `${this.substitute({ attributeNames, attributeValues })} >= ${rhs.substitute({ attributeNames, attributeValues })}`;
107
142
  },
108
143
  });
109
144
  }
@@ -116,7 +151,33 @@ export class Operand {
116
151
  */
117
152
  gte = this.greaterThanOrEquals.bind(this);
118
153
  /**
119
- * Tests that the left operand is lower than the right operand.
154
+ * Tests that this operand is contained within the provided list.
155
+ *
156
+ * This uses the `IN` operator.
157
+ *
158
+ * @param operands - The list of operands to check against. This function throws if the list is
159
+ * empty or contains more than 100 operands.
160
+ *
161
+ * @returns The corresponding {@link Expression} that is true if this operand is contained within the provided list.
162
+ */
163
+ in(...operands) {
164
+ if (operands.length === 0) {
165
+ throw new Error("the IN operator requires at least one operand.");
166
+ }
167
+ if (operands.length > 100) {
168
+ throw new Error(`up to 100 operands are support for the IN operator, got ${operands.length}`);
169
+ }
170
+ return expression({
171
+ stringify: ({ attributeNames, attributeValues }) => {
172
+ const operandsString = operands
173
+ .map((operand) => operand.substitute({ attributeNames, attributeValues }))
174
+ .join(",");
175
+ return `${this.substitute({ attributeNames, attributeValues })} IN (${operandsString})`;
176
+ },
177
+ });
178
+ }
179
+ /**
180
+ * Tests that this operand is lower than the right operand.
120
181
  *
121
182
  * This uses the `<` operator.
122
183
  *
@@ -127,12 +188,12 @@ export class Operand {
127
188
  lowerThan(rhs) {
128
189
  return expression({
129
190
  stringify: ({ attributeNames, attributeValues }) => {
130
- return `${this.register({ attributeNames, attributeValues })} < ${rhs.register({ attributeNames, attributeValues })}`;
191
+ return `${this.substitute({ attributeNames, attributeValues })} < ${rhs.substitute({ attributeNames, attributeValues })}`;
131
192
  },
132
193
  });
133
194
  }
134
195
  /**
135
- * Tests that the left operand is lower than or equals to the right operand.
196
+ * Tests that this operand is lower than or equals to the right operand.
136
197
  *
137
198
  * This uses the `<=` operator.
138
199
  *
@@ -143,7 +204,7 @@ export class Operand {
143
204
  lowerThanOrEquals(rhs) {
144
205
  return expression({
145
206
  stringify: ({ attributeNames, attributeValues }) => {
146
- return `${this.register({ attributeNames, attributeValues })} <= ${rhs.register({ attributeNames, attributeValues })}`;
207
+ return `${this.substitute({ attributeNames, attributeValues })} <= ${rhs.substitute({ attributeNames, attributeValues })}`;
147
208
  },
148
209
  });
149
210
  }
@@ -167,7 +228,7 @@ export class Operand {
167
228
  notEquals(rhs) {
168
229
  return expression({
169
230
  stringify: ({ attributeNames, attributeValues }) => {
170
- return `${this.register({ attributeNames, attributeValues })} <> ${rhs.register({ attributeNames, attributeValues })}`;
231
+ return `${this.substitute({ attributeNames, attributeValues })} <> ${rhs.substitute({ attributeNames, attributeValues })}`;
171
232
  },
172
233
  });
173
234
  }
@@ -186,32 +247,40 @@ export class ExpressionAttribute extends Operand {
186
247
  super();
187
248
  this.path = path;
188
249
  }
250
+ /**
251
+ * @returns An {@link Expression} that returns true if the provided attribute path exists.
252
+ */
189
253
  // NOTE: the left hand side of this expression can only be a literal value (tested)
190
254
  exists() {
191
255
  return expression({
192
256
  stringify: ({ attributeNames, attributeValues }) => {
193
- return `attribute_exists(${this.register({ attributeNames, attributeValues })})`;
257
+ return `attribute_exists(${this.substitute({ attributeNames, attributeValues })})`;
194
258
  },
195
259
  });
196
260
  }
197
- // NOTE: the left hand side of this expression can only be a literal value (tested)
198
- notExists() {
261
+ /**
262
+ * @param type - The type to check against.
263
+ * @returns An {@link Expression} that returns true if there exists an attribute at
264
+ * the provided path of the given type.
265
+ */
266
+ // NOTE: the left hand side of this expression *can be* an attribute value pointing to a valid path.
267
+ // NOTE: the right hand side of this expression *must be* an expression attribute (not a literal).
268
+ isType(type) {
199
269
  return expression({
200
270
  stringify: ({ attributeNames, attributeValues }) => {
201
- return `attribute_not_exists(${this.register({ attributeNames, attributeValues })})`;
271
+ return `attribute_type(${this.substitute({ attributeNames, attributeValues })}, ${type.substitute({ attributeNames, attributeValues })})`;
202
272
  },
203
273
  });
204
274
  }
205
- // NOTE: the left hand side of this expression *can be* an attribute value pointing to a valid path.
206
- // NOTE: the right hand side of this expression *must be* an expression attribute (not a literal).
207
- type(type) {
275
+ // NOTE: the left hand side of this expression can only be a literal value (tested)
276
+ notExists() {
208
277
  return expression({
209
278
  stringify: ({ attributeNames, attributeValues }) => {
210
- return `attribute_type(${this.register({ attributeNames, attributeValues })}, ${attributeValues.reference(type)})`;
279
+ return `attribute_not_exists(${this.substitute({ attributeNames, attributeValues })})`;
211
280
  },
212
281
  });
213
282
  }
214
- register(params) {
283
+ substitute(params) {
215
284
  const { attributeNames } = params;
216
285
  return attributeNames.substitute(this.path);
217
286
  }
@@ -225,7 +294,7 @@ export class ExpressionValue extends Operand {
225
294
  super();
226
295
  this.value = value;
227
296
  }
228
- register(params) {
297
+ substitute(params) {
229
298
  const { attributeValues } = params;
230
299
  return attributeValues.reference(this.value).toString();
231
300
  }
@@ -239,8 +308,8 @@ class SizeOperand extends Operand {
239
308
  super();
240
309
  this.inner = operand;
241
310
  }
242
- register(params) {
243
- return `size(${this.inner.register(params)})`;
311
+ substitute(params) {
312
+ return `size(${this.inner.substitute(params)})`;
244
313
  }
245
314
  }
246
315
  //# sourceMappingURL=expression.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"expression.js","sourceRoot":"","sources":["../../../../src/commands/expressions/expression.ts"],"names":[],"mappings":"AA0BA,8JAA8J;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,MAAM,CAAC;QACnC,OAAO,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC1D,CAAC;CACF;AAED,MAAM,UAAU,KAAK,CAAC,KAAqB;IACzC,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,WAAY,SAAQ,OAAO;IACd,KAAK,CAAU;IAEhC,YAAY,OAAgB;QAC1B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;IACvB,CAAC;IAED,QAAQ,CAAC,MAGR;QACC,OAAO,QAAQ,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC;IAChD,CAAC;CACF"}
1
+ {"version":3,"file":"expression.js","sourceRoot":"","sources":["../../../../src/commands/expressions/expression.ts"],"names":[],"mappings":"AAuBA,8JAA8J;AAC9J,MAAM,OAAO,UAAU;IACJ,WAAW,CAAc;IAE1C,YAAY,MAAwB;QAClC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED;;;;;OAKG;IACH,GAAG,CAAC,KAAiB;QACnB,OAAO,IAAI,UAAU,CAAC;YACpB,SAAS,EAAE,CAAC,EAAE,cAAc,EAAE,eAAe,EAAE,EAAE,EAAE;gBACjD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC,CAAC;gBACjE,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC,CAAC;gBACnE,OAAO,IAAI,IAAI,QAAQ,KAAK,GAAG,CAAC;YAClC,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,EAAE,CAAC,KAAiB;QAClB,OAAO,IAAI,UAAU,CAAC;YACpB,SAAS,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U,CAAC,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC,GAAG,CAAC;YACzF,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAED,UAAU,CAAC,MAGV;QACC,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;CACF;AAED,MAAM,UAAU,SAAS,CAAC,IAAmB;IAC3C,OAAO,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,OAAO,eAA0C,SAAQ,OAAO;IACnD,KAAK,CAAI;IAE1B,YAAY,KAAQ;QAClB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,UAAU,CAAC,MAGV;QACC,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;QACnC,OAAO,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC1D,CAAC;CACF;AAED,MAAM,UAAU,KAAK,CACnB,KAAqB;IAErB,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,WAAY,SAAQ,OAAO;IACd,KAAK,CAAU;IAEhC,YAAY,OAAgB;QAC1B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;IACvB,CAAC;IAED,UAAU,CAAC,MAGV;QACC,OAAO,QAAQ,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC;IAClD,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infra-blocks/aws-dynamodb",
3
- "version": "0.13.0",
3
+ "version": "0.14.0-alpha.0",
4
4
  "description": "A convenience wrapper over @aws-sdk/client-dynamodb and @aws-sdk/lib-dynamodb.",
5
5
  "keywords": [
6
6
  "aws",