Class OrderingExpressionParser

Namespace: redb.Core.Query
Assembly: redb.Core.dll

Parses ordering expressions from LINQ to REDB query format.
Supports simple properties, ternary operators, arithmetic expressions and functions.

public class OrderingExpressionParser : IOrderingExpressionParser

Inheritance

ObjectOrderingExpressionParser

Implements

Methods

ParseMultipleOrderings<TProps>(IEnumerable<(LambdaExpression KeySelector, SortDirection Direction)>)

Parse multiple orderings.

public IReadOnlyList<OrderingExpression> ParseMultipleOrderings<TProps>(IEnumerable<(LambdaExpression KeySelector, SortDirection Direction)> orderings) where TProps : class

ParseOrdering<TProps, TKey>(Expression<Func<TProps, TKey>>, SortDirection)

Parse ordering expression for Props fields.

public OrderingExpression ParseOrdering<TProps, TKey>(Expression<Func<TProps, TKey>> keySelector, SortDirection direction) where TProps : class

ParseRedbOrdering<TKey>(Expression<Func<IRedbObject, TKey>>, SortDirection)

Parse sorting by base IRedbObject fields (id, name, date_create, etc.)

public OrderingExpression ParseRedbOrdering<TKey>(Expression<Func<IRedbObject, TKey>> keySelector, SortDirection direction)