DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Classes | Static Public Member Functions | Static Private Member Functions | List of all members
Deveel.Data.Linq.Evaluator Class Reference

Classes

class  Nominator
 Performs bottom-up analysis to determine which nodes can possibly be part of an evaluated sub-tree. More...
 
class  SubtreeEvaluator
 Evaluates & replaces sub-trees when first candidate is reached (top-down) More...
 

Static Public Member Functions

static Expression PartialEval (Expression expression, Func< Expression, bool > fnCanBeEvaluated)
 Performs evaluation & replacement of independent sub-trees More...
 
static Expression PartialEval (Expression expression)
 Performs evaluation & replacement of independent sub-trees More...
 

Static Private Member Functions

static bool CanBeEvaluatedLocally (Expression expression)
 

Detailed Description

Definition at line 22 of file Evaluator.cs.

Member Function Documentation

static bool Deveel.Data.Linq.Evaluator.CanBeEvaluatedLocally ( Expression  expression)
inlinestaticprivate

Definition at line 42 of file Evaluator.cs.

42  {
43  return expression.NodeType != ExpressionType.Parameter;
44  }
static Expression Deveel.Data.Linq.Evaluator.PartialEval ( Expression  expression,
Func< Expression, bool >  fnCanBeEvaluated 
)
inlinestatic

Performs evaluation & replacement of independent sub-trees

Parameters
expressionThe root of the expression tree.
fnCanBeEvaluatedA function that decides whether a given expression node can be part of the local function.
Returns
A new tree with sub-trees evaluated and replaced.

Definition at line 29 of file Evaluator.cs.

29  {
30  return new SubtreeEvaluator(new Nominator(fnCanBeEvaluated).Nominate(expression)).Eval(expression);
31  }
static Expression Deveel.Data.Linq.Evaluator.PartialEval ( Expression  expression)
inlinestatic

Performs evaluation & replacement of independent sub-trees

Parameters
expressionThe root of the expression tree.
Returns
A new tree with sub-trees evaluated and replaced.

Definition at line 38 of file Evaluator.cs.

38  {
39  return PartialEval(expression, CanBeEvaluatedLocally);
40  }
static bool CanBeEvaluatedLocally(Expression expression)
Definition: Evaluator.cs:42
static Expression PartialEval(Expression expression, Func< Expression, bool > fnCanBeEvaluated)
Performs evaluation & replacement of independent sub-trees
Definition: Evaluator.cs:29

The documentation for this class was generated from the following file: