Interface IPositionalStructuredStore
Optional IStructuredStore capability for backends that can compute a "window around a target record" query server-side (e.g. via a window function), instead of the caller loading the full ordered result set and slicing it client-side.
Namespace: Serenity.Persistence.Domain.Interfaces
Assembly: Serenity.Global.Domain.dll
Syntax
public interface IPositionalStructuredStore
Methods
QueryWindowAroundAsync(StoreTable, IReadOnlyList<FieldFilter>, IReadOnlyList<string>, IReadOnlyList<OrderField>, FieldFilter, int, CancellationToken)
Returns the records within radius positions (in
ordering order, after collapsing to one per
distinctBy group) on either side of the record matching
targetKey within scope. Returns an empty list when
no record matches targetKey.
Declaration
Task<IReadOnlyList<StructuredRecord>> QueryWindowAroundAsync(StoreTable table, IReadOnlyList<FieldFilter> scope, IReadOnlyList<string> distinctBy, IReadOnlyList<OrderField> ordering, FieldFilter targetKey, int radius, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| StoreTable | table | |
| IReadOnlyList<FieldFilter> | scope | |
| IReadOnlyList<string> | distinctBy | |
| IReadOnlyList<OrderField> | ordering | |
| FieldFilter | targetKey | |
| int | radius | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<IReadOnlyList<StructuredRecord>> |