Example #1
0
        public override Statement EmitStatement(EmitMode mode)
        {
            ProjectExpression expression = new ProjectExpression();

            expression.Expression = (Expression)Nodes[0].EmitStatement(mode);
            foreach (Schema.TableVarColumn column in TableVar.Columns)
            {
                expression.Columns.Add(new ColumnExpression(Schema.Object.EnsureRooted(column.Name)));
            }
            expression.Modifiers = Modifiers;
            return(expression);
        }
 /// <summary>
 /// Initialize a new instance of ProjectArgument
 /// </summary>
 /// <param name="Attribute">Attribute name</param>
 /// <param name="ParentEntity">Entity that owns attribute</param>
 /// <param name="Expression">Expression to apply to the attribute</param>
 public ProjectArgument(DataAttribute Attribute, QueryableEntity ParentEntity, ProjectExpression Expression)
 {
     this.Attribute    = Attribute;
     this.ParentEntity = ParentEntity;
     this.Expression   = Expression;
 }