Created
November 10, 2022 23:01
-
-
Save vladholubiev/35bd4f891166a7dca551f38d5c8d35de to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import {parallelScan} from './src'; | |
(async () => { | |
console.time('fetch'); | |
const data = await parallelScan( | |
{ | |
TableName: 'notifications', | |
FilterExpression: '#updatedAt > :updatedAt and #senderId = :senderId', | |
ExpressionAttributeNames: { | |
'#updatedAt': 'updatedAt', | |
'#senderId': 'senderId', | |
}, | |
ExpressionAttributeValues: { | |
':updatedAt': '2022-01-01T00:00:00.000Z', | |
':senderId': 'foo-1', | |
}, | |
ProjectionExpression: 'updatedAt', | |
}, | |
{concurrency: 250} | |
); | |
console.timeEnd('fetch'); | |
console.log(data); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment