Class QueryResponse
One page of the result of QueryRequest.
public sealed record QueryResponse : IEquatable<QueryResponse>
- Inheritance
-
QueryResponse
- Implements
- Inherited Members
Remarks
A page holds at most 1 MB of read data. Check LastEvaluatedKey, not Count, to find out whether there are more pages.
Constructors
QueryResponse()
public QueryResponse()
Properties
ConsumedCapacity
Gets the capacity the call consumed. Non-null only when the request set ReturnConsumedCapacity; otherwise null.
public ConsumedCapacity? ConsumedCapacity { get; init; }
Property Value
Count
Gets the number of items in this page, after the filter. With Count the only way to see how many matched.
public int Count { get; init; }
Property Value
Items
Gets the items of this page that match the key condition and the filter, in sort key order. Empty when nothing matched and when the request used Count. The list and its items are read-only; do not cast them to change them.
public IReadOnlyList<IReadOnlyDictionary<string, AttributeValue>> Items { get; init; }
Property Value
LastEvaluatedKey
Gets the key of the last item evaluated, to pass as ExclusiveStartKey to read the next page. null on the last page, never an empty dictionary. A key does not guarantee that more items exist: the next page can be empty. Only null means the end.
public IReadOnlyDictionary<string, AttributeValue>? LastEvaluatedKey { get; init; }
Property Value
ScannedCount
Gets the number of items this page evaluated, before the filter. A high value next to a low Count means the query reads much more than it returns. Equal to Count without a filter.
public int ScannedCount { get; init; }
Property Value
Methods
Equals(QueryResponse?)
public bool Equals(QueryResponse? other)
Parameters
otherQueryResponse
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(QueryResponse?, QueryResponse?)
public static bool operator ==(QueryResponse? left, QueryResponse? right)
Parameters
leftQueryResponserightQueryResponse
Returns
operator !=(QueryResponse?, QueryResponse?)
public static bool operator !=(QueryResponse? left, QueryResponse? right)
Parameters
leftQueryResponserightQueryResponse