Skip to content

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

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

View source
public Task<List<TResult>> QueryAllAsync<TResult>(string tableName, Dictionary<string, AttributeValue> keys, string keyConditionExpression, Func<Dictionary<string, AttributeValue>, TResult> resolver, string indexName = "", bool scanIndexForward = true, 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)
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