Beispiel #1
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 }));
        }
Beispiel #2
0
 internal TableInstanceSymbol(string name, TableSymbol table, ValueSlotFactory valueFactory)
     : this(name, table, (ti, c) => valueFactory.CreateNamed($"{ti.Name}.{c.Name}", c.Type))
 {
 }