Created
June 6, 2018 18:16
-
-
Save nathanpeck/2e39000bbfab9354055466f744319cdb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
messages = await this.dynamoDB.query({ | |
TableName: this.tableName, | |
KeyConditionExpression: 'room = :room', | |
Limit: 20, | |
ExpressionAttributeValues: { | |
':room': where.room | |
}, | |
ExclusiveStartKey: where.message ? where : undefined, | |
ScanIndexForward: false // Always return newest items first | |
}).promise(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment