@ginger.io/beyonce
Advanced tools
Comparing version 0.0.57 to 0.0.58
@@ -64,3 +64,3 @@ "use strict"; | ||
let pendingOperation = buildOperation(options); | ||
let { lastEvaluatedKey } = options; | ||
let lastEvaluatedKey = options.lastEvaluatedKey; | ||
while (pendingOperation !== undefined) { | ||
@@ -76,2 +76,3 @@ const items = []; | ||
else { | ||
lastEvaluatedKey = undefined; | ||
pendingOperation = undefined; | ||
@@ -78,0 +79,0 @@ } |
{ | ||
"name": "@ginger.io/beyonce", | ||
"version": "0.0.57", | ||
"version": "0.0.58", | ||
"description": "Type-safe DynamoDB query builder for TypeScript. Designed with single-table architecture in mind.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -47,3 +47,3 @@ import { JayZ } from "@ginger.io/jay-z" | ||
let pendingOperation: T | undefined = buildOperation(options) | ||
let { lastEvaluatedKey } = options | ||
let lastEvaluatedKey = options.lastEvaluatedKey | ||
@@ -62,2 +62,3 @@ while (pendingOperation !== undefined) { | ||
} else { | ||
lastEvaluatedKey = undefined | ||
pendingOperation = undefined | ||
@@ -64,0 +65,0 @@ } |
@@ -214,5 +214,6 @@ import { JayZ } from "@ginger.io/jay-z" | ||
await Promise.all([db.put(musician), db.put(song1), db.put(song2)]) | ||
const key = MusicianPartition.key({ id: musician.id }) | ||
const { value: response1 } = await db | ||
.query(MusicianPartition.key({ id: musician.id })) | ||
.query(key) | ||
.iterator({ pageSize: 1 }) | ||
@@ -224,3 +225,3 @@ .next() | ||
const { value: response2 } = await db | ||
.query(MusicianPartition.key({ id: musician.id })) | ||
.query(key) | ||
.iterator({ | ||
@@ -233,2 +234,13 @@ cursor: response1.cursor, | ||
expect(response2.items).toEqual({ musician: [], song: [song1] }) | ||
const { value: response3 } = await db | ||
.query(key) | ||
.iterator({ | ||
cursor: response2.cursor, | ||
pageSize: 100 | ||
}) | ||
.next() | ||
expect(response3.items).toEqual({ musician: [], song: [song2] }) | ||
expect(response3.cursor).toEqual(undefined) | ||
} | ||
@@ -235,0 +247,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
305112
5455