Table of Contents

Class RunSearchPage

Namespace
FlowOrchestrator.Core.Storage
Assembly
FlowOrchestrator.Core.dll

One page of SearchRunsAsync(RunSearchQuery, CancellationToken) results, newest first.

public sealed record RunSearchPage : IEquatable<RunSearchPage>
Inheritance
RunSearchPage
Implements
Inherited Members

Constructors

RunSearchPage(IReadOnlyList<FlowRunRecord>, bool, int?)

One page of SearchRunsAsync(RunSearchQuery, CancellationToken) results, newest first.

public RunSearchPage(IReadOnlyList<FlowRunRecord> Runs, bool HasMore, int? TotalCount)

Parameters

Runs IReadOnlyList<FlowRunRecord>

Rows for the requested page; at most Take.

HasMore bool

true when at least one more matching row exists after this page. Providers learn this by reading Take + 1 rows, so it never costs a count.

TotalCount int?

Exact number of matching rows, or null when the query did not ask for it or carried a text / run-id term (see CountsTotal).

Properties

HasMore

true when at least one more matching row exists after this page. Providers learn this by reading Take + 1 rows, so it never costs a count.

public bool HasMore { get; init; }

Property Value

bool

NextCursor

Cursor that continues after the last row of this page; set when HasMore is true. Pass it as After to read the next page.

public RunSearchCursor? NextCursor { get; init; }

Property Value

RunSearchCursor?

Runs

Rows for the requested page; at most Take.

public IReadOnlyList<FlowRunRecord> Runs { get; init; }

Property Value

IReadOnlyList<FlowRunRecord>

TotalCount

Exact number of matching rows, or null when the query did not ask for it or carried a text / run-id term (see CountsTotal).

public int? TotalCount { get; init; }

Property Value

int?

TotalIsLowerBound

true when TotalCount stopped at TotalCountCap: more rows than that match.

public bool TotalIsLowerBound { get; init; }

Property Value

bool

Methods

FromRows(List<FlowRunRecord>, int, int?, int?)

Builds a page from rows read in list order with Take + 1: trims the extra row, derives HasMore and NextCursor, and applies the count cap to total.

public static RunSearchPage FromRows(List<FlowRunRecord> rows, int take, int? total, int? totalCountCap)

Parameters

rows List<FlowRunRecord>

Rows in list order. Trimmed in place to take.

take int

The page size.

total int?

The counted total, or null when no count was taken. A capped count has read at most cap + 1 rows.

totalCountCap int?

The cap the count ran with, or null for an exact count.

Returns

RunSearchPage

The page.