2
votes

What is the difference between client.query and Table.query

In which case client.query should be get privilege over Table.query and vice versa

On AWS documentation I came across few points one of them

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 the LastEvaluatedKey element to continue the query in a subsequent operation. Unlike a Scan operation, a Query operation never returns both an empty result set and a LastEvaluatedKey value. LastEvaluatedKey is only provided if the results exceed 1 MB, or if you have used the Limit parameter.

But i didn't find the same for table.query, also I am not able to get LastEvaluatedKey property in table.query method

Few more things are there but not summarized at one place.

Could i get any link or any stuff to understand difference between them

Thanks

1

1 Answers

3
votes

AWS SDK for .NET has multiple APIs for contacting DynamoDB. These are discussed in this blog post. In short, though, both client.Query and Table.Query perform a query against a particular table in DynamoDB, but the latter returns Document objects that are easier to work with. Table.Query also performs the pagination for you, so you don't have to care about LastEvaluatedKey.

You can find more information in the DynamoDB Developer Guide, including the section on high-level interfaces.

If you have further questions, feel free to post to the .NET SDK Forum or the DynamoDB forum.