Table of Contents

Class QueryResponse

Namespace
DynaSharp.Requests
Assembly
DynaSharp.dll

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

ConsumedCapacity

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

int

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

IReadOnlyList<IReadOnlyDictionary<string, AttributeValue>>

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

IReadOnlyDictionary<string, AttributeValue>

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

int

Methods

Equals(QueryResponse?)

public bool Equals(QueryResponse? other)

Parameters

other QueryResponse

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(QueryResponse?, QueryResponse?)

public static bool operator ==(QueryResponse? left, QueryResponse? right)

Parameters

left QueryResponse
right QueryResponse

Returns

bool

operator !=(QueryResponse?, QueryResponse?)

public static bool operator !=(QueryResponse? left, QueryResponse? right)

Parameters

left QueryResponse
right QueryResponse

Returns

bool