Skip to content
This repository was archived by the owner on Jun 19, 2023. It is now read-only.

fix scan startKey issue #182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/dynamodb-data-mapper/src/DataMapper.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ describe('DataMapper', () => {

const mapper = new DataMapper({
client: mockDynamoDbClient as any,
});
});

class Item {
get [DynamoDbTable]() { return 'foo' }
Expand Down Expand Up @@ -1800,7 +1800,7 @@ describe('DataMapper', () => {
const describeTablePromiseFunc = jest.fn(() => Promise.resolve({
Table: {
TableStatus: 'ACTIVE',
GlobalSecondaryIndexes: [
GlobalSecondaryIndexes: [
{
IndexName: 'DescriptionIndex'
}
Expand Down Expand Up @@ -3892,7 +3892,7 @@ describe('DataMapper', () => {
};
}
},
{startKey: {fizz: 100}}
{startKey: {fizz: 100, pop: 20}}
);

await results.next();
Expand Down
2 changes: 1 addition & 1 deletion packages/dynamodb-data-mapper/src/marshallStartKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export function marshallStartKey(
const key: Key = {};
for (const propertyName of Object.keys(startKey)) {
const propSchema = schema[propertyName];
const { attributeName = propertyName } = propSchema;
if (propSchema) {
const { attributeName = propertyName } = propSchema;
key[attributeName] = marshallValue(
propSchema,
startKey[propertyName]
Expand Down