Context

Ecng.Data.Sql

方法

EmitOrderByColumn
private void EmitOrderByColumn(Query query, string alias, string columnName)
context.EmitOrderByColumn(query, alias, columnName)

Emits one column reference for ORDER BY — qualified ([alias].[column]) when the alias is known and the column isn't a SELECT-list projection alias, otherwise bare [column]. SELECT-list aliases (from view processors or explicit Select(...)) can't be qualified because the column doesn't exist on the underlying table.

字段

Aliases
public readonly Dictionary<ParameterExpression, string> Aliases
value = context.Aliases

Symbol table mapping each LINQ-lambda parameter to the SQL alias it refers to. Filled in lazily by the translator as it descends into Where/Select/Join/OrderBy lambdas; consulted by alias resolution in place of the string-name heuristic when present.

AnonProjectionAliases
public readonly Dictionary<ValueTuple<Type, MemberInfo>, string> AnonProjectionAliases
value = context.AnonProjectionAliases

Records the SQL alias backing each member of an anonymous projection produced by a Join's result selector (e.g. (a, b) => new { A=a, B=b }). Lets a downstream Where(p => p.B.Field) resolve p.B through the underlying join alias instead of the main FROM alias.

GroupKeySelector
public Expression GroupKeySelector
value = context.GroupKeySelector

Body of the most recent GroupBy key selector lambda. Used by VisitNew to project g.Key back into the resolved grouping column when rendering the Select that follows GroupBy.

PredicatePosition
public bool PredicatePosition
value = context.PredicatePosition

True while visiting a boolean PREDICATE position — the root of a WHERE body, an operand of &&/||, the operand of !, or a conditional (CASE) test. It is cleared when descending into a value context (a comparison/arithmetic operand, a conditional THEN/ELSE, a projection). A correlated Any() renders as a bare exists(...) predicate only here; in a value position it must be a scalar sub-query instead.

PreknownJoinAliases
public readonly HashSet<string> PreknownJoinAliases
value = context.PreknownJoinAliases

Names of join inner aliases discovered by a pre-walk of the source chain. Used to resolve transparent-id chains during projection-time visits — before JoinParts itself is populated by the recursive source visit at the end of MethodCallExpression).