public JoinNode(IQueryPlanNode left, IQueryPlanNode right, ObjectName leftVar, Operator joinOp, Expression rightExpression) : base(left, right) { this.leftVar = leftVar; this.joinOp = joinOp; this.rightExpression = rightExpression; }
private Expression DoPrepare(Expression expression) { if (preparer.CanPrepare(expression)) expression = preparer.Prepare(expression); return expression; }
public SimpleSelectNode(IQueryPlanNode child, ObjectName leftVar, Operator op, Expression rightExpression) : base(child) { this.leftVar = leftVar; this.op = op; this.rightExpression = rightExpression; }
public TypeIsExpression(Expression expression, DataType typeOperand) { if (typeOperand == null) throw new ArgumentNullException("typeOperand"); TypeOperand = typeOperand; Expression = expression; }
public AssignmentStatement(Expression member, Expression assignExpression) { if (member == null) throw new ArgumentNullException("member"); AssignExpression = assignExpression; Member = member; }
public IList<CorrelatedVariable> Discover(Expression expression, ref int level, IList<CorrelatedVariable> list) { variables = list; queryLevel = level; Visit(expression); return variables; }
/// <summary> /// Groups over the given columns from the child. /// </summary> /// <param name="child"></param> /// <param name="columns"></param> /// <param name="groupMaxColumn"></param> /// <param name="functionList"></param> /// <param name="nameList"></param> public GroupNode(IQueryPlanNode child, ObjectName[] columns, ObjectName groupMaxColumn, Expression[] functionList, string[] nameList) : base(child) { this.columns = columns; this.groupMaxColumn = groupMaxColumn; this.functionList = functionList; this.nameList = nameList; }
protected virtual Expression Visit(Expression exp) { if (exp == null) return null; switch (exp.ExpressionType) { case ExpressionType.Negative: case ExpressionType.Positive: case ExpressionType.Not: return VisitUnary((UnaryExpression) exp); case ExpressionType.Add: case ExpressionType.Subtract: case ExpressionType.Multiply: case ExpressionType.Divide: case ExpressionType.Modulo: case ExpressionType.And: case ExpressionType.Or: case ExpressionType.Smaller: case ExpressionType.SmallerOrEqual: case ExpressionType.Greater: case ExpressionType.GreaterOrEqual: case ExpressionType.Equal: case ExpressionType.NotEqual: case ExpressionType.Is: case ExpressionType.Like: case ExpressionType.Any: case ExpressionType.All: return VisitBinary((BinaryExpression) exp); case ExpressionType.Conditional: return VisitConditional((ConditionalExpression) exp); case ExpressionType.Constant: return VisitConstant((ConstantExpression) exp); case ExpressionType.Variable: return VisitVariable((VariableExpression) exp); case ExpressionType.CorrelatedVariable: return VisitCorrelatedVariable((CorrelatedVariableExpression) exp); case ExpressionType.Call: return VisitFunctionCall((FunctionCallExpression) exp); case ExpressionType.Query: return VisitQuery((QueryExpression) exp); case ExpressionType.Subset: return VisitSubset((SubsetExpression) exp); default: throw new Exception(string.Format("Unhandled expression type: '{0}'", exp.ExpressionType)); } }
public static BinaryExpression Binary(Expression first, ExpressionType type, Expression second) { if (type == ExpressionType.Equal) return Equal(first, second); if (type == ExpressionType.NotEqual) return NotEqual(first, second); if (type == ExpressionType.Smaller) return Smaller(first, second); if (type == ExpressionType.Greater) return Greater(first, second); if (type == ExpressionType.SmallerOrEqual) return SmallerOrEqual(first, second); if (type == ExpressionType.GreaterOrEqual) return GreaterOrEqual(first, second); if (type == ExpressionType.Add) return Add(first, second); if (type == ExpressionType.Multiply) return Multiply(first, second); if (type == ExpressionType.Subset) return Subtract(first, second); if (type == ExpressionType.Divide) return Divide(first, second); if (type == ExpressionType.Modulo) return Modulo(first, second); if (type == ExpressionType.Exponent) return Exponent(first, second); if (type == ExpressionType.Like) return Like(first, second); if (type == ExpressionType.And) return And(first, second); if (type == ExpressionType.Or) return Or(first, second); throw new NotSupportedException(); }
public MultiColumnEquiSelectNode(IQueryPlanNode child, ObjectName[] columns, Expression[] values) : base(child) { this.columns = columns; this.values = values; }
public ConstantSelectNode(IQueryPlanNode child, Expression exp) : base(child) { expression = exp; }
public SmallerOrEqualExpression(Expression left, Expression right) : base(left, right) { }
public Expression PrepareExpression(Expression expression) { return Visit(expression); }
public FunctionalSelectNode(IQueryPlanNode child, Expression expression) : base(child) { this.expression = expression; }
public DataType FindReturnType(Expression expression) { Visit(expression); return returnType; }
public ConditionalExpression(Expression test, Expression ifTrue) : this(test, ifTrue, null) { }
protected UnaryExpression(Expression operand) { Operand = operand; }
public IsExpression(Expression left, Expression right) : base(left, right) { }
public LikeExpression(Expression left, Expression right) : this(left, right, null) { }
public MultiplyExpression(Expression left, Expression right) : base(left, right) { }
public EqualExpression(Expression left, Expression right) : base(left, right) { }
public IList<Expression> Break(Expression expression) { Visit(expression); return list; }
public LikeExpression(Expression left, Expression right, Expression escape) : base(left, right) { Escape = escape; }
public bool Explore(Expression expression) { Visit(expression); return aggregateFound; }
public bool Inspect(Expression expression) { Visit(expression); return hasSubQuery; }
public SubsetExpression(Expression child) : base(child) { }
public SubtractExpression(Expression left, Expression right) : base(left, right) { }
public ExponentExpression(Expression left, Expression right) : base(left, right) { }
public ConditionalExpression(Expression test, Expression ifTrue, Expression ifFalse) { IfFalse = ifFalse; IfTrue = ifTrue; Test = test; }
public DivideExpression(Expression left, Expression right) : base(left, right) { }