WhereVisitor

Overview

This class represents the implementation of Visitor patterns and sets the strategy of traversal for the WhereExpression tree.

It is the base class and as such contains basic rules of visiting objects, which may compose a tree. Separate concrete visitor classes derived from it can perform some particular operations, by implementing these operations in their respective Visit methods.

Location


Instance Methods


constructor

 

constructor

 

WhereVisitor()

 

Sub New()

Visit  protected

Calls the appropriate VisitXXX method depending on the type of the given WhereExpression.

 

method Visit(expression: WhereExpression): WhereExpression

 

WhereExpression Visit(WhereExpression expression)

 

Function Visit(expression As WhereExpression) As WhereExpression

Parameters:

  • expression:

VisitBetween  protected

Defines the base rule of traversal for BetweenExpression. First, it visits Expression, then Lower Expression and finally Upper Expression. If parts of BetweenExpression were changed during visits, a new BetweenExpression, containing the new parts, will be obtained as a result.

 

method VisitBetween(expression: BetweenExpression): WhereExpression

 

WhereExpression VisitBetween(BetweenExpression expression)

 

Function VisitBetween(expression As BetweenExpression) As WhereExpression

Parameters:

  • expression:

VisitBinary  protected

Defines the base rule of traversal for BinaryExpression. First, it visits Left Expression, then Right Expression. If parts of BinaryExpression were changed during visits, a new BinaryExpression, containing the new parts, will be obtained.

 

method VisitBinary(expression: BinaryExpression): WhereExpression

 

WhereExpression VisitBinary(BinaryExpression expression)

 

Function VisitBinary(expression As BinaryExpression) As WhereExpression

Parameters:

  • expression:

VisitConstant  protected

Defines the base rule of traversal for ConstantExpressions. Since ConstantExpressions can't consist of other expressions (it's the final object in the WhereExpression tree), this method returns the given ConstantExpression.

 

method VisitConstant(expression: ConstantExpression): WhereExpression

 

WhereExpression VisitConstant(ConstantExpression expression)

 

Function VisitConstant(expression As ConstantExpression) As WhereExpression

Parameters:

  • expression:

VisitDateTimeNow  protected

 

method VisitDateTimeNow(expression: DateTimeNowExpression): WhereExpression

 

WhereExpression VisitDateTimeNow(DateTimeNowExpression expression)

 

Function VisitDateTimeNow(expression As DateTimeNowExpression) As WhereExpression

Parameters:

  • expression:

VisitDateTimePart  protected

 

method VisitDateTimePart(expression: DateTimePartExpression): WhereExpression

 

WhereExpression VisitDateTimePart(DateTimePartExpression expression)

 

Function VisitDateTimePart(expression As DateTimePartExpression) As WhereExpression

Parameters:

  • expression:

VisitDateTimeToday  protected

 

method VisitDateTimeToday(expression: DateTimeTodayExpression): WhereExpression

 

WhereExpression VisitDateTimeToday(DateTimeTodayExpression expression)

 

Function VisitDateTimeToday(expression As DateTimeTodayExpression) As WhereExpression

Parameters:

  • expression:

VisitField  protected

Defines the base rule of traversal for FieldExpressions. Since FieldExpressions can't consist of other expressions (it's the final object in the WhereExpression tree), this method returns the given FieldExpression.

 

method VisitField(expression: FieldExpression): WhereExpression

 

WhereExpression VisitField(FieldExpression expression)

 

Function VisitField(expression As FieldExpression) As WhereExpression

Parameters:

  • expression:

VisitFunctionCall  protected

 

method VisitFunctionCall(expression: FunctionCallExpression): WhereExpression

 

WhereExpression VisitFunctionCall(FunctionCallExpression expression)

 

Function VisitFunctionCall(expression As FunctionCallExpression) As WhereExpression

Parameters:

  • expression:

VisitList  protected

Defines the base rule of traversal for ListExpressions. This method goes through the list and visits every expression on it. If at least one expression on the list was changed during the visit, a new ListExpression, containing the changed items, will be obtained as a result.

 

method VisitList(expression: ListExpression): WhereExpression

 

WhereExpression VisitList(ListExpression expression)

 

Function VisitList(expression As ListExpression) As WhereExpression

Parameters:

  • expression:

VisitMacro  protected

Defines the base rule of traversal for MacroExpressions. This method goes through the items list and visits every expression on it. If at least one expression on the list was changed during the visit, a new MacroExpression, containing the changed items, will be obtained as a result.

 

method VisitMacro(expression: MacroExpression): WhereExpression

 

WhereExpression VisitMacro(MacroExpression expression)

 

Function VisitMacro(expression As MacroExpression) As WhereExpression

Parameters:

  • expression:

VisitNull  protected

Defines the base rule of traversal for NullExpressions. Since NullExpression can't consist of other expressions, this method returns the given expression.

 

method VisitNull(expression: NullExpression): WhereExpression

 

WhereExpression VisitNull(NullExpression expression)

 

Function VisitNull(expression As NullExpression) As WhereExpression

Parameters:

  • expression:

VisitParameter  protected

Defines the base rule of traversal for ParameterExpressions. Since ParameterExpression can't consist of other expressions (it's the final object in the WhereExpression tree), this method returns the given ParameterExpression.

 

method VisitParameter(expression: ParameterExpression): WhereExpression

 

WhereExpression VisitParameter(ParameterExpression expression)

 

Function VisitParameter(expression As ParameterExpression) As WhereExpression

Parameters:

  • expression:

VisitUnary  protected

Defines the base rule of traversal for UnaryExpression. It visits Expression, contained in the given UnaryExpression. If it is changed during the visit, a new UnaryExpression, containing the changed Expression, will be created.

 

method VisitUnary(expression: UnaryExpression): WhereExpression

 

WhereExpression VisitUnary(UnaryExpression expression)

 

Function VisitUnary(expression As UnaryExpression) As WhereExpression

Parameters:

  • expression: