A Query operation directly accesses items from a table using the table primary key, or from an index using the index key. You must provide a specific hash key value. You can narrow the scope of the query by using comparison operators on the range key value, or on the index key. You can use the ScanIndexForward parameter to get results in forward or reverse order, by range key or by index key.
Queries that do not return results consume the minimum read capacity units according to the type of read.
If the total number of items meeting the query criteria exceeds the result set size limit of 1 MB, the query stops and results are returned to the user with a LastEvaluatedKey to continue the query in a subsequent operation. Unlike a Scan operation, a Query operation never returns an empty result set and a LastEvaluatedKey . The LastEvaluatedKey is only provided if the results exceed 1 MB, or if you have used Limit .
To request a strongly consistent result, set ConsistentRead to true.
@see com.amazonaws.services.dynamodbv2.AmazonDynamoDB#query(QueryRequest)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|