Пример #1
0
        protected virtual Expression VisitOuterJoined(OuterJoinedExpression outer)
        {
            var test       = this.Visit(outer.Test);
            var expression = this.Visit(outer.Expression);

            return(this.UpdateOuterJoined(outer, test, expression));
        }
Пример #2
0
 protected OuterJoinedExpression UpdateOuterJoined(OuterJoinedExpression outer, Expression test, Expression expression)
 {
     if (test != outer.Test || expression != outer.Expression)
     {
         return(new OuterJoinedExpression(test, expression));
     }
     return(outer);
 }
Пример #3
0
 protected virtual Expression VisitOuterJoined(OuterJoinedExpression outer)
 {
     this.Write("Outer(");
     this.WriteLine(Indentation.Inner);
     this.Visit(outer.Test);
     this.Write(", ");
     this.WriteLine(Indentation.Same);
     this.Visit(outer.Expression);
     this.WriteLine(Indentation.Outer);
     this.Write(")");
     return(outer);
 }
Пример #4
0
        public static ProjectionExpression AddOuterJoinTest(this ProjectionExpression proj, Dialect.Dialect language, Expression expression)
        {
            string           colName      = proj.Select.Columns.GetAvailableColumnName("Test");
            var              colType      = SqlType.Get(expression.Type);
            SelectExpression newSource    = proj.Select.AddColumn(new ColumnDeclaration(colName, expression, colType));
            Expression       newProjector =
                new OuterJoinedExpression(
                    new ColumnExpression(expression.Type, colType, newSource.Alias, colName),
                    proj.Projector
                    );

            return(new ProjectionExpression(newSource, newProjector, proj.Aggregator));
        }