Method BuildOrderByClause<TProps>(QueryContext<TProps>, IReadOnlyDictionary<string, FieldInfo>, string?, SqlParameterCollector?, IReadOnlySet<string>?, string)

Assembly: redb.MSSql.Pro.dll

Generates ORDER BY clause.
T-SQL requires ORDER BY for OFFSET/FETCH.
Deduplicates columns to avoid "column specified more than once" error.
Supports simple properties, arithmetic expressions and functions.
Uses CTE fields directly when available (optimized).

public string BuildOrderByClause<TProps>(QueryContext<TProps> context, IReadOnlyDictionary<string, FieldInfo> fields, string? distinctPartitionExpr, SqlParameterCollector? collector = null, IReadOnlySet<string>? cteFieldNames = null, string cteAlias = "pvt_cte") where TProps : class, new()