Esempio n. 1
0
        ReadOnlyCollection <Expression> values;  // either select or expressions are assigned

        /// <summary>
        ///
        /// </summary>
        /// <param name="expression"></param>
        /// <param name="select"></param>
        public InExpression(Expression expression, SelectExpression select)
            : base(DbExpressionType.In, typeof(bool), select)
        {
            this.expression = expression;
        }
Esempio n. 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="type"></param>
 /// <param name="select"></param>
 public ScalarExpression(Type type, SelectExpression select)
     : base(DbExpressionType.Scalar, type, select)
 {
 }
Esempio n. 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="select"></param>
 public ExistsExpression(SelectExpression select)
     : base(DbExpressionType.Exists, typeof(bool), select)
 {
 }
Esempio n. 4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="eType"></param>
 /// <param name="type"></param>
 /// <param name="select"></param>
 protected SubqueryExpression(DbExpressionType eType, Type type, SelectExpression select)
     : base(eType, type)
 {
     System.Diagnostics.Debug.Assert(eType == DbExpressionType.Scalar || eType == DbExpressionType.Exists || eType == DbExpressionType.In);
     this.select = select;
 }
Esempio n. 5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="select"></param>
 /// <param name="groupBy"></param>
 /// <returns></returns>
 public static SelectExpression SetGroupBy(this SelectExpression select, IEnumerable <Expression> groupBy)
 {
     return(new SelectExpression(select.Alias, select.Columns, select.From, select.Where, select.OrderBy, groupBy, select.IsDistinct, select.Skip, select.Take));
 }
Esempio n. 6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="select"></param>
 /// <param name="columns"></param>
 /// <returns></returns>
 public static SelectExpression SetColumns(this SelectExpression select, IEnumerable <ColumnDeclaration> columns)
 {
     return(new SelectExpression(select.Alias, columns.OrderBy(c => c.Name), select.From, select.Where, select.OrderBy, select.GroupBy, select.IsDistinct, select.Skip, select.Take));
 }
Esempio n. 7
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="source"></param>
 /// <param name="projector"></param>
 public ProjectionExpression(SelectExpression source, Expression projector)
     : this(source, projector, null)
 {
 }
Esempio n. 8
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="select"></param>
 /// <returns></returns>
 protected virtual Expression VisitSelect(SelectExpression select)
 {
     this.Write(select.QueryText);
     return(select);
 }