示例#1
0
        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));
        }
示例#2
0
        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 }));
        }
示例#3
0
 public BoundOrderByColumn(QueryColumnInstanceSymbol queryColumn, BoundComparedValue comparedValue)
 {
     QueryColumn   = queryColumn;
     ComparedValue = comparedValue;
 }
 public BoundSelectColumn(QueryColumnInstanceSymbol column)
 {
     Column = column;
 }