Class StructuredTrim
Instructs a store to keep only the best KeepCount records — in Ordering order — among the records matching ScopeFilters, discarding the rest. A literal per-record cap, applied within the given scope only.
Inherited Members
Namespace: Serenity.Persistence.Domain.ValueObjects
Assembly: Serenity.Global.Domain.dll
Syntax
public sealed class StructuredTrim
Constructors
StructuredTrim(IReadOnlyList<FieldFilter>, IReadOnlyList<OrderField>, int)
Creates a new StructuredTrim.
Declaration
public StructuredTrim(IReadOnlyList<FieldFilter> scopeFilters, IReadOnlyList<OrderField> ordering, int keepCount)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<FieldFilter> | scopeFilters | |
| IReadOnlyList<OrderField> | ordering | |
| int | keepCount |
Properties
KeepCount
The number of records to keep within the scope.
Declaration
public int KeepCount { get; }
Property Value
| Type | Description |
|---|---|
| int |
Ordering
Ordering used to decide which records are "best" and therefore kept.
Declaration
public IReadOnlyList<OrderField> Ordering { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<OrderField> |
ScopeFilters
Predicates ANDed together to scope which records the trim considers.
Declaration
public IReadOnlyList<FieldFilter> ScopeFilters { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<FieldFilter> |