Skip to content

DynamoDBStorage.QueryAsync(string, Dictionary<string, AttributeValue>, string, Func<Dictionary<string, AttributeValue>, TResult>, string, bool, Dictionary<string, AttributeValue>, bool)

QueryAsync(string, Dictionary<string, AttributeValue>, string, Func<Dictionary<string, AttributeValue>, TResult>, string, bool, Dictionary<string, AttributeValue>, bool)

View source
public Task<(List<TResult> results, Dictionary<string, AttributeValue>? lastEvaluatedKey)> DynamoDBStorage.QueryAsync<TResult>(string tableName, Dictionary<string, AttributeValue> keys, string keyConditionExpression, Func<Dictionary<string, AttributeValue>, TResult> resolver, string indexName = "", bool scanIndexForward = true, Dictionary<string, AttributeValue>? lastEvaluatedKey = null, bool consistentRead = true)
Query for multiple entries in a DynamoDB table by filtering its keys

Parameters

tableNamestring
The name of the table to search for the entries
keysDictionary<string, AttributeValue>
The table entry keys to search for
keyConditionExpressionstring
the expression that will filter the keys
resolverFunc<Dictionary<string, AttributeValue>, TResult>
Function that will be called to translate the returned fields into a concrete type. This Function is only called if the result is != null and will be called for each entry that match the query and added to the results list
indexNamestring
In case a secondary index is used in the keyConditionExpression
scanIndexForwardbool
In case an index is used, show if the seek order is ascending (true) or descending (false)
lastEvaluatedKeyDictionary<string, AttributeValue>
The primary key of the first item that this operation will evaluate. Use the value that was returned for LastEvaluatedKey in the previous operation
consistentReadbool
Determines the read consistency model. Note that if a GSI is used, this must be false.

Returns

The collection containing a list of objects translated by the resolver function and the LastEvaluatedKey for paged results