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

Public Member Functions

 RangeSetUpdater (IRequest context, ColumnInfo field, IndexRangeSet indexRangeSet)
 
IndexRangeSet Update (SqlExpression expression)
 
override SqlExpression VisitBinary (SqlBinaryExpression binaryEpression)
 
- 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 VisitFunctionCall (SqlFunctionCallExpression expression)
 Visits the expression that calls the function defined. More...
 
virtual SqlExpression VisitUnary (SqlUnaryExpression unary)
 
virtual SqlExpression VisitCast (SqlCastExpression castExpression)
 
virtual SqlExpression VisitReference (SqlReferenceExpression reference)
 
virtual SqlExpression VisitVariableReference (SqlVariableReferenceExpression reference)
 
virtual SqlExpression VisitAssign (SqlAssignExpression assign)
 
virtual SqlExpression VisitConstant (SqlConstantExpression constant)
 
virtual SqlExpression VisitConditional (SqlConditionalExpression conditional)
 
virtual SqlExpression VisitTuple (SqlTupleExpression expression)
 
virtual SqlExpression VisitQuery (SqlQueryExpression query)
 

Private Attributes

IndexRangeSet indexRangeSet
 
readonly IRequest context
 
readonly ColumnInfo field
 

Detailed Description

Definition at line 110 of file RangeSelectNode.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Query.RangeSelectNode.RangeSetUpdater.RangeSetUpdater ( IRequest  context,
ColumnInfo  field,
IndexRangeSet  indexRangeSet 
)
inline

Definition at line 115 of file RangeSelectNode.cs.

115  {
116  this.context = context;
117  this.field = field;
118  this.indexRangeSet = indexRangeSet;
119  }

Member Function Documentation

IndexRangeSet Deveel.Data.Sql.Query.RangeSelectNode.RangeSetUpdater.Update ( SqlExpression  expression)
inline

Definition at line 121 of file RangeSelectNode.cs.

121  {
122  Visit(expression);
123  return indexRangeSet;
124  }
virtual SqlExpression Visit(SqlExpression expression)
Visits a given SQL expression.
override SqlExpression Deveel.Data.Sql.Query.RangeSelectNode.RangeSetUpdater.VisitBinary ( SqlBinaryExpression  binaryEpression)
inlinevirtual

Parameters
binaryEpression
Returns

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

Definition at line 126 of file RangeSelectNode.cs.

126  {
127  var op = binaryEpression.ExpressionType;
128 
129  // Evaluate to an object
130  var value = binaryEpression.Right.EvaluateToConstant(context, null);
131 
132  // If the evaluated object is not of a comparable type, then it becomes
133  // null.
134  var fieldType = field.ColumnType;
135  if (!value.Type.IsComparable(fieldType))
136  value = DataObject.Null(fieldType);
137 
138  // Intersect this in the range set
140 
141  return base.VisitBinary(binaryEpression);
142  }
static DataObject Null(SqlType type)
Definition: DataObject.cs:630
Represents a dynamic object that encapsulates a defined SqlType and a compatible constant ISqlObject ...
Definition: DataObject.cs:35
SqlType ColumnType
Gets the SqlType that cells within a table for this column will handle.
Definition: ColumnInfo.cs:99
IndexRangeSet Intersect(SqlExpressionType op, DataObject value)

Member Data Documentation

readonly IRequest Deveel.Data.Sql.Query.RangeSelectNode.RangeSetUpdater.context
private

Definition at line 112 of file RangeSelectNode.cs.

readonly ColumnInfo Deveel.Data.Sql.Query.RangeSelectNode.RangeSetUpdater.field
private

Definition at line 113 of file RangeSelectNode.cs.

IndexRangeSet Deveel.Data.Sql.Query.RangeSelectNode.RangeSetUpdater.indexRangeSet
private

Definition at line 111 of file RangeSelectNode.cs.


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