electrodb 2.14.2 → 2.15.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.
package/isolated-error ADDED
@@ -0,0 +1,488 @@
1
+
2
+ > electrodb@2.14.3 test:unit
3
+ > mocha -r ts-node/register ./test/**.spec.* --grep should iterate through only the specified entity regardless of type using a sort key the between sort key operation on a single attribute sort key on isolated index type
4
+
5
+
6
+
7
+ index types and operations
8
+ query sort key operations
9
+ { queryType: undefined }
10
+ { queryType: undefined }
11
+ { queryType: undefined }
12
+ { queryType: undefined }
13
+ { queryType: undefined }
14
+ { queryType: undefined }
15
+ { queryType: undefined }
16
+ { queryType: undefined }
17
+ { queryType: undefined }
18
+ { queryType: undefined }
19
+ { queryType: undefined }
20
+ { queryType: undefined }
21
+ { queryType: undefined }
22
+ { queryType: undefined }
23
+ { queryType: undefined }
24
+ { queryType: undefined }
25
+ { queryType: undefined }
26
+ { queryType: undefined }
27
+ { queryType: undefined }
28
+ { queryType: undefined }
29
+ { queryType: undefined }
30
+ { queryType: undefined }
31
+ { queryType: undefined }
32
+ { queryType: undefined }
33
+ { queryType: undefined }
34
+ { queryType: undefined }
35
+ { queryType: undefined }
36
+ { queryType: undefined }
37
+ { queryType: undefined }
38
+ { queryType: undefined }
39
+ { queryType: undefined }
40
+ { queryType: undefined }
41
+ { queryType: undefined }
42
+ { queryType: undefined }
43
+ { queryType: undefined }
44
+ { queryType: undefined }
45
+ { queryType: undefined }
46
+ { queryType: undefined }
47
+ { queryType: undefined }
48
+ { queryType: undefined }
49
+ { queryType: undefined }
50
+ { queryType: undefined }
51
+ { queryType: undefined }
52
+ { queryType: undefined }
53
+ { queryType: undefined }
54
+ { queryType: undefined }
55
+ { queryType: undefined }
56
+ { queryType: undefined }
57
+ { queryType: undefined }
58
+ { queryType: undefined }
59
+ { queryType: undefined }
60
+ { queryType: undefined }
61
+ { queryType: undefined }
62
+ { queryType: undefined }
63
+ { queryType: undefined }
64
+ { queryType: undefined }
65
+ { queryType: undefined }
66
+ { queryType: undefined }
67
+ { queryType: undefined }
68
+ { queryType: undefined }
69
+ { queryType: undefined }
70
+ { queryType: undefined }
71
+ { queryType: undefined }
72
+ { queryType: undefined }
73
+ { queryType: undefined }
74
+ { queryType: undefined }
75
+ { queryType: undefined }
76
+ { queryType: undefined }
77
+ { queryType: undefined }
78
+ { queryType: undefined }
79
+ { queryType: undefined }
80
+ { queryType: undefined }
81
+ { queryType: undefined }
82
+ { queryType: undefined }
83
+ { queryType: undefined }
84
+ { queryType: undefined }
85
+ { queryType: undefined }
86
+ { queryType: undefined }
87
+ { queryType: undefined }
88
+ { queryType: undefined }
89
+ items {
90
+ "entity1Items": [
91
+ {
92
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528",
93
+ "prop2": 3,
94
+ "prop3": "5334f2f0-a61d-468d-adae-3cafddf43b62",
95
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
96
+ "prop5": 3,
97
+ "prop6": "6f094157-1bb3-4c5c-94f3-670d9794e7a0",
98
+ "prop7": "fe3eff35-9ed5-42f6-97e5-952da4a5c76d"
99
+ },
100
+ {
101
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528",
102
+ "prop2": 4,
103
+ "prop3": "1e347c51-fcfd-40dd-919f-ba28e5089b1f",
104
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
105
+ "prop5": 4,
106
+ "prop6": "66ca5964-26c8-494e-a165-c8db8d90e375",
107
+ "prop7": "d20de1e3-9456-41ec-8209-785470e8d5d1"
108
+ },
109
+ {
110
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528",
111
+ "prop2": 5,
112
+ "prop3": "be5f3015-7745-4705-8507-2e766c30c1fb",
113
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
114
+ "prop5": 5,
115
+ "prop6": "7a20f042-1c30-4565-b422-e322c3c803e1",
116
+ "prop7": "b4495ae3-3ac3-4848-a526-81608e2cecc0"
117
+ },
118
+ {
119
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528",
120
+ "prop2": 6,
121
+ "prop3": "ca8550a8-01f0-4bf4-ac6a-2002e8b9a8ea",
122
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
123
+ "prop5": 6,
124
+ "prop6": "838fb0ae-937e-4538-ad87-52a52e473bd9",
125
+ "prop7": "f7af41d0-472c-4328-bc77-9f50309d6212"
126
+ },
127
+ {
128
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528",
129
+ "prop2": 7,
130
+ "prop3": "5844e144-260a-45e4-8a47-3cc924214d18",
131
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
132
+ "prop5": 7,
133
+ "prop6": "ed86d3a5-91f7-4f37-8fe5-94feab6711d1",
134
+ "prop7": "87bc90a7-0f45-4288-934d-f7d7379af739"
135
+ }
136
+ ],
137
+ "indexType": "isolated",
138
+ "loaded": [
139
+ {
140
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528",
141
+ "prop2": 0,
142
+ "prop3": "d461866d-792d-4b47-9bc7-2cb1f21606c4",
143
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
144
+ "prop5": 0,
145
+ "prop6": "d2bf0820-e163-459b-9ce5-c6559f060c11",
146
+ "prop7": "947827a8-0fb6-4302-a42a-0a1d0fe36760"
147
+ },
148
+ {
149
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528",
150
+ "prop2": 1,
151
+ "prop3": "3846a495-4c17-489a-84e7-0ae99df783e5",
152
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
153
+ "prop5": 1,
154
+ "prop6": "73e34b24-1a5f-49ca-89cf-9a4d5c5ce1de",
155
+ "prop7": "b7c81373-0a08-4f6b-bf3c-d4a29195e38d"
156
+ },
157
+ {
158
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528",
159
+ "prop2": 2,
160
+ "prop3": "dd8ee6aa-0b04-45e0-96b6-314e202ab4c4",
161
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
162
+ "prop5": 2,
163
+ "prop6": "ec4df376-dfbe-4e3e-b083-755c546d8f0b",
164
+ "prop7": "d415d4ff-155c-4818-9170-92bb0a5d8634"
165
+ },
166
+ {
167
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528",
168
+ "prop2": 3,
169
+ "prop3": "5334f2f0-a61d-468d-adae-3cafddf43b62",
170
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
171
+ "prop5": 3,
172
+ "prop6": "6f094157-1bb3-4c5c-94f3-670d9794e7a0",
173
+ "prop7": "fe3eff35-9ed5-42f6-97e5-952da4a5c76d"
174
+ },
175
+ {
176
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528",
177
+ "prop2": 4,
178
+ "prop3": "1e347c51-fcfd-40dd-919f-ba28e5089b1f",
179
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
180
+ "prop5": 4,
181
+ "prop6": "66ca5964-26c8-494e-a165-c8db8d90e375",
182
+ "prop7": "d20de1e3-9456-41ec-8209-785470e8d5d1"
183
+ },
184
+ {
185
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528",
186
+ "prop2": 5,
187
+ "prop3": "be5f3015-7745-4705-8507-2e766c30c1fb",
188
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
189
+ "prop5": 5,
190
+ "prop6": "7a20f042-1c30-4565-b422-e322c3c803e1",
191
+ "prop7": "b4495ae3-3ac3-4848-a526-81608e2cecc0"
192
+ },
193
+ {
194
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528",
195
+ "prop2": 6,
196
+ "prop3": "ca8550a8-01f0-4bf4-ac6a-2002e8b9a8ea",
197
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
198
+ "prop5": 6,
199
+ "prop6": "838fb0ae-937e-4538-ad87-52a52e473bd9",
200
+ "prop7": "f7af41d0-472c-4328-bc77-9f50309d6212"
201
+ },
202
+ {
203
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528",
204
+ "prop2": 7,
205
+ "prop3": "5844e144-260a-45e4-8a47-3cc924214d18",
206
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
207
+ "prop5": 7,
208
+ "prop6": "ed86d3a5-91f7-4f37-8fe5-94feab6711d1",
209
+ "prop7": "87bc90a7-0f45-4288-934d-f7d7379af739"
210
+ },
211
+ {
212
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528",
213
+ "prop2": 8,
214
+ "prop3": "aec18f4a-f130-43e8-b986-f12a93e70172",
215
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
216
+ "prop5": 8,
217
+ "prop6": "c58852ca-4a27-498a-9ea7-c8e4c779ee25",
218
+ "prop7": "cc0726c6-573b-4ef2-aee1-dc215df6a9c5"
219
+ },
220
+ {
221
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528",
222
+ "prop2": 9,
223
+ "prop3": "c3de74b8-d3c1-4c60-a837-ccb9040c1385",
224
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
225
+ "prop5": 9,
226
+ "prop6": "864c7f30-9a93-479c-82a7-c896a9a38c02",
227
+ "prop7": "5fdd9140-0dc4-41a2-acf8-2a867a5ee07c"
228
+ }
229
+ ]
230
+ }
231
+ { queryType: 'between' }
232
+ params {
233
+ "params": {
234
+ "TableName": "electro",
235
+ "ExpressionAttributeNames": {
236
+ "#pk": "pk",
237
+ "#sk1": "sk"
238
+ },
239
+ "ExpressionAttributeValues": {
240
+ ":pk": "$fb1773e5-fc6b-4ccf-8638-c1b6c6b2bba8#prop1_iso|915303ac-a94f-4d4f-8a69-725587d34528",
241
+ ":sk1": "$primarycollection#isolated+entity1_1#prop2_03",
242
+ ":sk2": "$primarycollection#isolated+entity1_1#prop2_08"
243
+ },
244
+ "KeyConditionExpression": "#pk = :pk and #sk1 BETWEEN :sk1 AND :sk2"
245
+ },
246
+ "first": 3,
247
+ "last": 7
248
+ }
249
+ result {
250
+ data: [
251
+ {
252
+ prop7: 'fe3eff35-9ed5-42f6-97e5-952da4a5c76d',
253
+ prop6: '6f094157-1bb3-4c5c-94f3-670d9794e7a0',
254
+ prop5: 3,
255
+ prop4: 'iso|9b829afd-c4f8-4b47-8553-2102304b082e',
256
+ prop3: '5334f2f0-a61d-468d-adae-3cafddf43b62',
257
+ prop2: 3,
258
+ prop1: 'iso|915303ac-a94f-4d4f-8a69-725587d34528'
259
+ },
260
+ {
261
+ prop7: 'd20de1e3-9456-41ec-8209-785470e8d5d1',
262
+ prop6: '66ca5964-26c8-494e-a165-c8db8d90e375',
263
+ prop5: 4,
264
+ prop4: 'iso|9b829afd-c4f8-4b47-8553-2102304b082e',
265
+ prop3: '1e347c51-fcfd-40dd-919f-ba28e5089b1f',
266
+ prop2: 4,
267
+ prop1: 'iso|915303ac-a94f-4d4f-8a69-725587d34528'
268
+ },
269
+ {
270
+ prop7: 'b4495ae3-3ac3-4848-a526-81608e2cecc0',
271
+ prop6: '7a20f042-1c30-4565-b422-e322c3c803e1',
272
+ prop5: 5,
273
+ prop4: 'iso|9b829afd-c4f8-4b47-8553-2102304b082e',
274
+ prop3: 'be5f3015-7745-4705-8507-2e766c30c1fb',
275
+ prop2: 5,
276
+ prop1: 'iso|915303ac-a94f-4d4f-8a69-725587d34528'
277
+ },
278
+ {
279
+ prop7: 'f7af41d0-472c-4328-bc77-9f50309d6212',
280
+ prop6: '838fb0ae-937e-4538-ad87-52a52e473bd9',
281
+ prop5: 6,
282
+ prop4: 'iso|9b829afd-c4f8-4b47-8553-2102304b082e',
283
+ prop3: 'ca8550a8-01f0-4bf4-ac6a-2002e8b9a8ea',
284
+ prop2: 6,
285
+ prop1: 'iso|915303ac-a94f-4d4f-8a69-725587d34528'
286
+ },
287
+ {
288
+ prop7: '87bc90a7-0f45-4288-934d-f7d7379af739',
289
+ prop6: 'ed86d3a5-91f7-4f37-8fe5-94feab6711d1',
290
+ prop5: 7,
291
+ prop4: 'iso|9b829afd-c4f8-4b47-8553-2102304b082e',
292
+ prop3: '5844e144-260a-45e4-8a47-3cc924214d18',
293
+ prop2: 7,
294
+ prop1: 'iso|915303ac-a94f-4d4f-8a69-725587d34528'
295
+ },
296
+ {
297
+ prop7: 'cc0726c6-573b-4ef2-aee1-dc215df6a9c5',
298
+ prop6: 'c58852ca-4a27-498a-9ea7-c8e4c779ee25',
299
+ prop5: 8,
300
+ prop4: 'iso|9b829afd-c4f8-4b47-8553-2102304b082e',
301
+ prop3: 'aec18f4a-f130-43e8-b986-f12a93e70172',
302
+ prop2: 8,
303
+ prop1: 'iso|915303ac-a94f-4d4f-8a69-725587d34528'
304
+ }
305
+ ],
306
+ entity1Items: [
307
+ {
308
+ prop1: 'iso|915303ac-a94f-4d4f-8a69-725587d34528',
309
+ prop2: 3,
310
+ prop3: '5334f2f0-a61d-468d-adae-3cafddf43b62',
311
+ prop4: 'iso|9b829afd-c4f8-4b47-8553-2102304b082e',
312
+ prop5: 3,
313
+ prop6: '6f094157-1bb3-4c5c-94f3-670d9794e7a0',
314
+ prop7: 'fe3eff35-9ed5-42f6-97e5-952da4a5c76d'
315
+ },
316
+ {
317
+ prop1: 'iso|915303ac-a94f-4d4f-8a69-725587d34528',
318
+ prop2: 4,
319
+ prop3: '1e347c51-fcfd-40dd-919f-ba28e5089b1f',
320
+ prop4: 'iso|9b829afd-c4f8-4b47-8553-2102304b082e',
321
+ prop5: 4,
322
+ prop6: '66ca5964-26c8-494e-a165-c8db8d90e375',
323
+ prop7: 'd20de1e3-9456-41ec-8209-785470e8d5d1'
324
+ },
325
+ {
326
+ prop1: 'iso|915303ac-a94f-4d4f-8a69-725587d34528',
327
+ prop2: 5,
328
+ prop3: 'be5f3015-7745-4705-8507-2e766c30c1fb',
329
+ prop4: 'iso|9b829afd-c4f8-4b47-8553-2102304b082e',
330
+ prop5: 5,
331
+ prop6: '7a20f042-1c30-4565-b422-e322c3c803e1',
332
+ prop7: 'b4495ae3-3ac3-4848-a526-81608e2cecc0'
333
+ },
334
+ {
335
+ prop1: 'iso|915303ac-a94f-4d4f-8a69-725587d34528',
336
+ prop2: 6,
337
+ prop3: 'ca8550a8-01f0-4bf4-ac6a-2002e8b9a8ea',
338
+ prop4: 'iso|9b829afd-c4f8-4b47-8553-2102304b082e',
339
+ prop5: 6,
340
+ prop6: '838fb0ae-937e-4538-ad87-52a52e473bd9',
341
+ prop7: 'f7af41d0-472c-4328-bc77-9f50309d6212'
342
+ },
343
+ {
344
+ prop1: 'iso|915303ac-a94f-4d4f-8a69-725587d34528',
345
+ prop2: 7,
346
+ prop3: '5844e144-260a-45e4-8a47-3cc924214d18',
347
+ prop4: 'iso|9b829afd-c4f8-4b47-8553-2102304b082e',
348
+ prop5: 7,
349
+ prop6: 'ed86d3a5-91f7-4f37-8fe5-94feab6711d1',
350
+ prop7: '87bc90a7-0f45-4288-934d-f7d7379af739'
351
+ }
352
+ ]
353
+ }
354
+ {
355
+ "err": {
356
+ "name": "AssertionError",
357
+ "message": "expected 6 to equal 5",
358
+ "showDiff": true,
359
+ "actual": 6,
360
+ "expected": 5,
361
+ "stack": "AssertionError: expected 6 to equal 5\n at compareItems (/Users/tywalch/media/code/projects/electrodb/test/ts_connected.service.spec.ts:997:29)\n at Context.<anonymous> (/Users/tywalch/media/code/projects/electrodb/test/ts_connected.service.spec.ts:1565:11)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)"
362
+ },
363
+ "provided": [
364
+ {
365
+ "prop7": "cc0726c6-573b-4ef2-aee1-dc215df6a9c5",
366
+ "prop6": "c58852ca-4a27-498a-9ea7-c8e4c779ee25",
367
+ "prop5": 8,
368
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
369
+ "prop3": "aec18f4a-f130-43e8-b986-f12a93e70172",
370
+ "prop2": 8,
371
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528"
372
+ },
373
+ {
374
+ "prop7": "87bc90a7-0f45-4288-934d-f7d7379af739",
375
+ "prop6": "ed86d3a5-91f7-4f37-8fe5-94feab6711d1",
376
+ "prop5": 7,
377
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
378
+ "prop3": "5844e144-260a-45e4-8a47-3cc924214d18",
379
+ "prop2": 7,
380
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528"
381
+ },
382
+ {
383
+ "prop7": "f7af41d0-472c-4328-bc77-9f50309d6212",
384
+ "prop6": "838fb0ae-937e-4538-ad87-52a52e473bd9",
385
+ "prop5": 6,
386
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
387
+ "prop3": "ca8550a8-01f0-4bf4-ac6a-2002e8b9a8ea",
388
+ "prop2": 6,
389
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528"
390
+ },
391
+ {
392
+ "prop7": "b4495ae3-3ac3-4848-a526-81608e2cecc0",
393
+ "prop6": "7a20f042-1c30-4565-b422-e322c3c803e1",
394
+ "prop5": 5,
395
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
396
+ "prop3": "be5f3015-7745-4705-8507-2e766c30c1fb",
397
+ "prop2": 5,
398
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528"
399
+ },
400
+ {
401
+ "prop7": "d20de1e3-9456-41ec-8209-785470e8d5d1",
402
+ "prop6": "66ca5964-26c8-494e-a165-c8db8d90e375",
403
+ "prop5": 4,
404
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
405
+ "prop3": "1e347c51-fcfd-40dd-919f-ba28e5089b1f",
406
+ "prop2": 4,
407
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528"
408
+ },
409
+ {
410
+ "prop7": "fe3eff35-9ed5-42f6-97e5-952da4a5c76d",
411
+ "prop6": "6f094157-1bb3-4c5c-94f3-670d9794e7a0",
412
+ "prop5": 3,
413
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
414
+ "prop3": "5334f2f0-a61d-468d-adae-3cafddf43b62",
415
+ "prop2": 3,
416
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528"
417
+ }
418
+ ],
419
+ "expected": [
420
+ {
421
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528",
422
+ "prop2": 7,
423
+ "prop3": "5844e144-260a-45e4-8a47-3cc924214d18",
424
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
425
+ "prop5": 7,
426
+ "prop6": "ed86d3a5-91f7-4f37-8fe5-94feab6711d1",
427
+ "prop7": "87bc90a7-0f45-4288-934d-f7d7379af739"
428
+ },
429
+ {
430
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528",
431
+ "prop2": 6,
432
+ "prop3": "ca8550a8-01f0-4bf4-ac6a-2002e8b9a8ea",
433
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
434
+ "prop5": 6,
435
+ "prop6": "838fb0ae-937e-4538-ad87-52a52e473bd9",
436
+ "prop7": "f7af41d0-472c-4328-bc77-9f50309d6212"
437
+ },
438
+ {
439
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528",
440
+ "prop2": 5,
441
+ "prop3": "be5f3015-7745-4705-8507-2e766c30c1fb",
442
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
443
+ "prop5": 5,
444
+ "prop6": "7a20f042-1c30-4565-b422-e322c3c803e1",
445
+ "prop7": "b4495ae3-3ac3-4848-a526-81608e2cecc0"
446
+ },
447
+ {
448
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528",
449
+ "prop2": 4,
450
+ "prop3": "1e347c51-fcfd-40dd-919f-ba28e5089b1f",
451
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
452
+ "prop5": 4,
453
+ "prop6": "66ca5964-26c8-494e-a165-c8db8d90e375",
454
+ "prop7": "d20de1e3-9456-41ec-8209-785470e8d5d1"
455
+ },
456
+ {
457
+ "prop1": "iso|915303ac-a94f-4d4f-8a69-725587d34528",
458
+ "prop2": 3,
459
+ "prop3": "5334f2f0-a61d-468d-adae-3cafddf43b62",
460
+ "prop4": "iso|9b829afd-c4f8-4b47-8553-2102304b082e",
461
+ "prop5": 3,
462
+ "prop6": "6f094157-1bb3-4c5c-94f3-670d9794e7a0",
463
+ "prop7": "fe3eff35-9ed5-42f6-97e5-952da4a5c76d"
464
+ }
465
+ ]
466
+ }
467
+ 1) should iterate through only the specified entity regardless of type using a sort key the between sort key operation on a single attribute sort key on isolated index type
468
+
469
+
470
+ 0 passing (64ms)
471
+ 1 failing
472
+
473
+ 1) index types and operations
474
+ query sort key operations
475
+ should iterate through only the specified entity regardless of type using a sort key the between sort key operation on a single attribute sort key on isolated index type:
476
+
477
+ AssertionError: expected 6 to equal 5
478
+ + expected - actual
479
+
480
+ -6
481
+ +5
482
+
483
+ at compareItems (test/ts_connected.service.spec.ts:997:29)
484
+ at Context.<anonymous> (test/ts_connected.service.spec.ts:1565:11)
485
+ at processTicksAndRejections (node:internal/process/task_queues:95:5)
486
+
487
+
488
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electrodb",
3
- "version": "2.14.2",
3
+ "version": "2.15.0",
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": {
@@ -55,6 +55,7 @@
55
55
  "@types/mocha": "^8.0.3",
56
56
  "@types/node": "^15.14.9",
57
57
  "@types/uuid": "^8.3.0",
58
+ "aws-cdk-lib": "^2.100.0",
58
59
  "aws-sdk": "2.630.0",
59
60
  "browserify": "^17.0.0",
60
61
  "chai": "4.2.0",
@@ -72,8 +73,7 @@
72
73
  "ts-node": "^10.9.1",
73
74
  "tsd": "^0.28.1",
74
75
  "typescript": "^5.2.2",
75
- "uuid": "7.0.1",
76
- "aws-cdk-lib": "^2.100.0"
76
+ "uuid": "7.0.1"
77
77
  },
78
78
  "keywords": [
79
79
  "electrodb",
@@ -88,7 +88,8 @@
88
88
  "directory": "test"
89
89
  },
90
90
  "dependencies": {
91
- "@aws-sdk/lib-dynamodb": "3.395.0",
91
+ "@aws-sdk/lib-dynamodb": "^3.654.0",
92
+ "@aws-sdk/util-dynamodb": "^3.654.0",
92
93
  "jsonschema": "1.2.7"
93
94
  }
94
95
  }
package/src/client.js CHANGED
@@ -1,5 +1,5 @@
1
1
  const lib = require('@aws-sdk/lib-dynamodb')
2
- const util = require('@aws-sdk/lib-dynamodb/dist-cjs/commands/utils')
2
+ const util = require('@aws-sdk/util-dynamodb')
3
3
  const { isFunction } = require("./validations");
4
4
  const { ElectroError, ErrorCodes } = require("./errors");
5
5
  const DocumentClientVersions = {
@@ -7,7 +7,16 @@ const DocumentClientVersions = {
7
7
  v3: "v3",
8
8
  electro: "electro",
9
9
  };
10
- const unmarshallOutput = util.unmarshallOutput || ((val) => val);
10
+ const unmarshallItem = (value) => {
11
+ const unmarshall = util.unmarshall || ((val) => val);
12
+ try {
13
+ value.Item = unmarshall(value.Item);
14
+ } catch(err) {
15
+ console.error('Internal Error: Failed to unmarshal input', err);
16
+ }
17
+
18
+ return value;
19
+ }
11
20
 
12
21
  const v3Methods = ["send"];
13
22
  const v2Methods = [
@@ -89,7 +98,7 @@ class DocumentClientV2Wrapper {
89
98
  return {
90
99
  canceled: cancellationReasons.map((reason) => {
91
100
  if (reason.Item) {
92
- return unmarshallOutput(reason, [{ key: "Item" }]);
101
+ return unmarshallItem(reason);
93
102
  }
94
103
  return reason;
95
104
  }),
@@ -202,7 +211,7 @@ class DocumentClientV3Wrapper {
202
211
  return {
203
212
  canceled: err.CancellationReasons.map((reason) => {
204
213
  if (reason.Item) {
205
- return unmarshallOutput(reason, [{ key: "Item" }]);
214
+ return unmarshallItem(reason);
206
215
  }
207
216
  return reason;
208
217
  }),
@@ -225,7 +234,7 @@ class DocumentClientV3Wrapper {
225
234
  return {
226
235
  canceled: err.CancellationReasons.map((reason) => {
227
236
  if (reason.Item) {
228
- return unmarshallOutput(reason, [{ key: "Item" }]);
237
+ return unmarshallItem(reason);
229
238
  }
230
239
  return reason;
231
240
  }),
package/src/entity.js CHANGED
@@ -3121,8 +3121,16 @@ class Entity {
3121
3121
  indexHasSk && this.model.facets.byIndex[index].sk.length === 0;
3122
3122
  let hasPrefix =
3123
3123
  indexHasSk && this.model.prefixes[index].sk.prefix !== undefined;
3124
- if (noImpactSk && noAttributeSk && hasPrefix) {
3125
- keys.sk.push(this.model.prefixes[index].sk.prefix);
3124
+ let hasPostfix =
3125
+ indexHasSk && this.model.prefixes[index].sk.prefix !== undefined;
3126
+ if (noImpactSk && noAttributeSk) {
3127
+ let key = hasPrefix ? this.model.prefixes[index].sk.prefix : '';
3128
+ if (hasPostfix) {
3129
+ key = `${key}${this.model.prefixes[index].sk.postfix}`;
3130
+ }
3131
+ if (key) {
3132
+ keys.sk.push(key);
3133
+ }
3126
3134
  }
3127
3135
  }
3128
3136