@jupiterone/dynamodb-dao
Advanced tools
Comparing version 1.2.0 to 1.2.2
@@ -11,2 +11,3 @@ import { DocumentClient } from 'aws-sdk/clients/dynamodb'; | ||
attributeValues?: AttributeValues; | ||
consistentRead?: boolean; | ||
} | ||
@@ -26,2 +27,3 @@ export interface ScanInput extends BaseScanInput { | ||
attributeValues: AttributeValues; | ||
consistentRead?: boolean; | ||
} | ||
@@ -28,0 +30,0 @@ export interface QueryInputWithLimit extends QueryInput { |
@@ -241,3 +241,3 @@ "use strict"; | ||
async query(input) { | ||
const { index, startAt, attributeNames, attributeValues, scanIndexForward, keyConditionExpression, filterExpression, limit = exports.DEFAULT_QUERY_LIMIT, } = input; | ||
const { index, startAt, attributeNames, attributeValues, scanIndexForward, keyConditionExpression, filterExpression, limit = exports.DEFAULT_QUERY_LIMIT, consistentRead, } = input; | ||
let startKey; | ||
@@ -258,2 +258,3 @@ if (startAt) { | ||
ExpressionAttributeValues: attributeValues, | ||
ConsistentRead: consistentRead, | ||
}) | ||
@@ -323,3 +324,3 @@ .promise(); | ||
async scan(input = {}) { | ||
const { index, startAt, attributeNames, attributeValues, filterExpression, segment, totalSegments, limit = exports.DEFAULT_QUERY_LIMIT, } = input; | ||
const { index, startAt, attributeNames, attributeValues, filterExpression, segment, totalSegments, limit = exports.DEFAULT_QUERY_LIMIT, consistentRead, } = input; | ||
if (segment !== undefined && totalSegments === undefined) { | ||
@@ -346,2 +347,3 @@ throw new Error('If segment is defined, totalSegments must also be defined.'); | ||
TotalSegments: totalSegments, | ||
ConsistentRead: consistentRead, | ||
}) | ||
@@ -348,0 +350,0 @@ .promise(); |
{ | ||
"name": "@jupiterone/dynamodb-dao", | ||
"version": "1.2.0", | ||
"version": "1.2.2", | ||
"description": "DynamoDB Data Access Object (DAO) helper library", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
26291
556