Table of Contents

Struct Page<T>

Namespace
DynaSharp
Assembly
DynaSharp.dll

One page of a Query or Scan: what one response of DynamoDB holds. A page ends at 1 MB of data read, or at the limit, whichever comes first. A page of a fan-out is the exception: it is a stretch of the merge, of the size that was asked for, made of as many responses as that took.

public readonly struct Page<T>

Type Parameters

T

The type of the items.

Inherited Members

Remarks

A page can be empty and still have a next one, because a filter runs after the read: HasMore is what tells the end, never the number of items.

Properties

ConsumedCapacity

Gets the capacity this page consumed, if ReturnCapacity asked for it. For a page of a fan-out it is the sum of all its calls.

public ConsumedCapacity? ConsumedCapacity { get; }

Property Value

ConsumedCapacity

Count

Gets the number of items after the filter.

public int Count { get; }

Property Value

int

HasMore

Gets a value indicating whether DynamoDB has more to read. The next page can turn out empty: DynamoDB does not look ahead.

public bool HasMore { get; }

Property Value

bool

Items

Gets the items of the page, in the order of the sort key for a query and in no useful order for a scan. It is empty after CountAsync.

public IReadOnlyList<T> Items { get; }

Property Value

IReadOnlyList<T>

Remarks

Items of other entities. A typed read holds only its own entity. The items of other entities under the same partition key are read, count against the limit and are in ScannedCount, so a page can hold fewer items than its limit. QueryCommand<T> says how a condition on the sort key reads the entity alone.

Next

Gets where the next page starts, or the default value at the end of the read. Pass it to PageAsync, or hand Next.ToString() to a client.

public ContinuationToken Next { get; }

Property Value

ContinuationToken

ScannedCount

Gets the number of items read before the filter, which is what capacity is charged for. A typed read of an entity with a discriminator filters on it, so items of other types of the table are in this number and not in Count.

public int ScannedCount { get; }

Property Value

int