private static string GetColumnReference(int index, QueryColumnInstanceSymbol column) { if (!string.IsNullOrEmpty(column.Name)) { return(SyntaxFacts.GetValidIdentifier(column.Name)); } var ordinal = index + 1; return(ordinal.ToString(CultureInfo.InvariantCulture)); }
private static BoundQuery CreateBoundQuery(BoundExpression expression) { var factory = new ValueSlotFactory(); var valueSlot = new ValueSlot(factory, @"result", 0, expression.Type); var computedValue = new BoundComputedValue(expression, valueSlot); var constantRelation = new BoundConstantRelation(); var computeRelation = new BoundComputeRelation(constantRelation, new[] { computedValue }); var projectRelation = new BoundProjectRelation(computeRelation, new [] { valueSlot }); var columnSymbol = new QueryColumnInstanceSymbol(valueSlot.Name, valueSlot); return(new BoundQuery(projectRelation, new[] { columnSymbol })); }
public BoundOrderByColumn(QueryColumnInstanceSymbol queryColumn, BoundComparedValue comparedValue) { QueryColumn = queryColumn; ComparedValue = comparedValue; }
public BoundSelectColumn(QueryColumnInstanceSymbol column) { Column = column; }