DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Properties | List of all members
Deveel.Data.Sql.Expressions.ConstantVisitor Class Reference
Inheritance diagram for Deveel.Data.Sql.Expressions.ConstantVisitor:
Deveel.Data.Sql.Expressions.SqlExpressionVisitor

Public Member Functions

 ConstantVisitor ()
 
override SqlExpression VisitConstant (SqlConstantExpression constant)
 
override SqlExpression VisitReference (SqlReferenceExpression reference)
 
override SqlExpression VisitVariableReference (SqlVariableReferenceExpression reference)
 
override SqlExpression VisitFunctionCall (SqlFunctionCallExpression expression)
 Visits the expression that calls the function defined. More...
 
override SqlExpression VisitQuery (SqlQueryExpression query)
 
- Public Member Functions inherited from Deveel.Data.Sql.Expressions.SqlExpressionVisitor
virtual SqlExpression Visit (SqlExpression expression)
 Visits a given SQL expression. More...
 
virtual SqlExpression[] VisitExpressionList (SqlExpression[] list)
 Visits a list of expressions given. More...
 
virtual SqlExpression VisitBinary (SqlBinaryExpression binaryEpression)
 
virtual SqlExpression VisitUnary (SqlUnaryExpression unary)
 
virtual SqlExpression VisitCast (SqlCastExpression castExpression)
 
virtual SqlExpression VisitAssign (SqlAssignExpression assign)
 
virtual SqlExpression VisitConditional (SqlConditionalExpression conditional)
 
virtual SqlExpression VisitTuple (SqlTupleExpression expression)
 

Properties

bool IsConstant [get, private set]
 

Detailed Description

Definition at line 23 of file ConstantVisitor.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Expressions.ConstantVisitor.ConstantVisitor ( )
inline

Definition at line 24 of file ConstantVisitor.cs.

24  {
25  IsConstant = true;
26  }

Member Function Documentation

override SqlExpression Deveel.Data.Sql.Expressions.ConstantVisitor.VisitConstant ( SqlConstantExpression  constant)
inlinevirtual

Parameters
constant
Returns

Reimplemented from Deveel.Data.Sql.Expressions.SqlExpressionVisitor.

Definition at line 30 of file ConstantVisitor.cs.

30  {
31  var value = constant.Value;
32  if (value.Type.TypeCode == SqlTypeCode.Array) {
33  var array = value.Value as SqlArray;
34  if (array != null && !array.IsNull) {
35  foreach (var exp in array) {
36  if (!exp.IsConstant()) {
37  IsConstant = false;
38  break;
39  }
40  }
41  }
42  }
43 
44  return base.VisitConstant(constant);
45  }
SqlTypeCode
Enumerates the codes of all SQL types handled by the system.
Definition: SqlTypeCode.cs:23
An object that provides methods for accessing a finite collection of SQL expressions.
Definition: SqlArray.cs:28
override SqlExpression Deveel.Data.Sql.Expressions.ConstantVisitor.VisitFunctionCall ( SqlFunctionCallExpression  expression)
inlinevirtual

Visits the expression that calls the function defined.

Parameters
expressionThe SqlFunctionCallExpression to visit.
Returns

Reimplemented from Deveel.Data.Sql.Expressions.SqlExpressionVisitor.

Definition at line 57 of file ConstantVisitor.cs.

57  {
58  return base.VisitFunctionCall(expression);
59  }
override SqlExpression Deveel.Data.Sql.Expressions.ConstantVisitor.VisitQuery ( SqlQueryExpression  query)
inlinevirtual

Parameters
query
Returns

Reimplemented from Deveel.Data.Sql.Expressions.SqlExpressionVisitor.

Definition at line 61 of file ConstantVisitor.cs.

61  {
62  return base.VisitQuery(query);
63  }
override SqlExpression Deveel.Data.Sql.Expressions.ConstantVisitor.VisitReference ( SqlReferenceExpression  reference)
inlinevirtual

Parameters
reference
Returns

Reimplemented from Deveel.Data.Sql.Expressions.SqlExpressionVisitor.

Definition at line 47 of file ConstantVisitor.cs.

47  {
48  IsConstant = false;
49  return base.VisitReference(reference);
50  }
override SqlExpression Deveel.Data.Sql.Expressions.ConstantVisitor.VisitVariableReference ( SqlVariableReferenceExpression  reference)
inlinevirtual

Reimplemented from Deveel.Data.Sql.Expressions.SqlExpressionVisitor.

Definition at line 52 of file ConstantVisitor.cs.

52  {
53  IsConstant = false;
54  return base.VisitVariableReference(reference);
55  }

Property Documentation

bool Deveel.Data.Sql.Expressions.ConstantVisitor.IsConstant
getprivate set

Definition at line 28 of file ConstantVisitor.cs.


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