Example #1
0
        public override DbExpression Visit(DbSqlQueryExpression exp)
        {
            DbSqlQueryExpression sqlQuery = new DbSqlQueryExpression(exp.Type)
            {
                TakeCount       = exp.TakeCount,
                SkipCount       = exp.SkipCount,
                Table           = (DbFromTableExpression)this.MakeNewExpression(exp.Table),
                Condition       = this.MakeNewExpression(exp.Condition),
                HavingCondition = this.MakeNewExpression(exp.HavingCondition),
                IsDistinct      = exp.IsDistinct
            };

            sqlQuery.ColumnSegments.AddRange(exp.ColumnSegments.Select(a => new DbColumnSegment(this.MakeNewExpression(a.Body), a.Alias)));
            sqlQuery.GroupSegments.AddRange(exp.GroupSegments.Select(a => this.MakeNewExpression(a)));
            sqlQuery.Orderings.AddRange(exp.Orderings.Select(a => new DbOrdering(this.MakeNewExpression(a.Expression), a.OrderType)));

            return(sqlQuery);
        }
Example #2
0
        public DbSqlQueryExpression Update(Type type)
        {
            DbSqlQueryExpression sqlQuery = new DbSqlQueryExpression(type)
            {
                TakeCount       = this.TakeCount,
                SkipCount       = this.SkipCount,
                Table           = this.Table,
                Condition       = this.Condition,
                HavingCondition = this.HavingCondition,
                IsDistinct      = this.IsDistinct
            };

            sqlQuery.ColumnSegments.AddRange(this.ColumnSegments);
            sqlQuery.GroupSegments.AddRange(this.GroupSegments);
            sqlQuery.Orderings.AddRange(this.Orderings);

            return(sqlQuery);
        }
 public DbSubQueryExpression(DbSqlQueryExpression sqlQuery)
     : base(DbExpressionType.SubQuery, UtilConstants.TypeOfVoid)
 {
     this._sqlQuery = sqlQuery;
 }
Example #4
0
 public DbSubQueryExpression(DbSqlQueryExpression sqlQuery)
     : base(DbExpressionType.SubQuery)
 {
     this._sqlQuery = sqlQuery;
 }
 public abstract T Visit(DbSqlQueryExpression exp);
Example #6
0
 public DbExistsExpression(DbSqlQueryExpression sqlQuery)
     : base(DbExpressionType.Exists, UtilConstants.TypeOfBoolean)
 {
     this._sqlQuery = sqlQuery;
 }
Example #7
0
 public virtual T Visit(DbSqlQueryExpression exp)
 {
     throw new NotImplementedException();
 }