Package Exports
- dynamodb-read-stream
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (dynamodb-read-stream) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
dynamodb-read-stream
This library provides read stream implementation for DynamoDB.
Example usage
Query reader
const reader = new DocumentClientQueryReadable(
new DocumentClient(), {
TableName: 'someTable',
KeyConditionExpression: 'key = :primaryKey',
ExpressionAttributeValues: {
':primaryKey': 'someValue'
},
Limit: 50
})
const transformOutput = new Transform({
objectMode: true,
transform (chunk: DocumentClient.QueryOutput, encoding: string, callback: (error?: Error, data?: any) => void): void {
callback(undefined, JSON.stringify(chunk) + '\n')
}
})
reader
.pipe(transformOutput)
.pipe(process.stdout)
Scan reader
const reader = new DocumentClientScanReadable(client, {
TableName: 'someTable',
Limit: 50
});
const transformOutput = new Transform({
objectMode: true,
transform (chunk: DocumentClient.ScanOutput, encoding: string, callback: (error?: Error, data?: any) => void): void {
callback(undefined, JSON.stringify(chunk) + '\n')
}
})
reader
.pipe(transformOutput)
.pipe(process.stdout)