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

Public Member Functions

 ExpressionChecker (ColumnChecker checker)
 
override SqlExpression VisitReference (SqlReferenceExpression reference)
 
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 VisitFunctionCall (SqlFunctionCallExpression expression)
 Visits the expression that calls the function defined. More...
 
virtual SqlExpression VisitBinary (SqlBinaryExpression binaryEpression)
 
virtual SqlExpression VisitUnary (SqlUnaryExpression unary)
 
virtual SqlExpression VisitCast (SqlCastExpression castExpression)
 
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)
 

Private Attributes

readonly ColumnChecker checker
 

Detailed Description

Definition at line 110 of file ColumnChecker.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Statements.ColumnChecker.ExpressionChecker.ExpressionChecker ( ColumnChecker  checker)
inline

Definition at line 113 of file ColumnChecker.cs.

113  {
114  this.checker = checker;
115  }

Member Function Documentation

override SqlExpression Deveel.Data.Sql.Statements.ColumnChecker.ExpressionChecker.VisitQuery ( SqlQueryExpression  query)
inlinevirtual

Parameters
query
Returns

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

Definition at line 130 of file ColumnChecker.cs.

130  {
131  throw new InvalidOperationException("Sub-queries are not permitted in a CHECK expression.");
132  }
override SqlExpression Deveel.Data.Sql.Statements.ColumnChecker.ExpressionChecker.VisitReference ( SqlReferenceExpression  reference)
inlinevirtual

Parameters
reference
Returns

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

Definition at line 117 of file ColumnChecker.cs.

117  {
118  var refName = reference.ReferenceName;
119  var origColumn = refName.Name;
120  var resolvedColumn = checker.ResolveColumnName(origColumn);
121  if (resolvedColumn == null)
122  throw new InvalidOperationException(String.Format("Column '{0} not found in table.", origColumn));
123 
124  if (!origColumn.Equals(resolvedColumn))
125  refName = new ObjectName(refName.Parent, resolvedColumn);
126 
127  return SqlExpression.Reference(refName);
128  }
ObjectName ReferenceName
Gets the name of the object referenced by the expression.
A long string in the system.
string Name
Gets the name of the object being referenced.
Definition: ObjectName.cs:108
static SqlReferenceExpression Reference(ObjectName objectName)
Defines the base class for instances that represent SQL expression tree nodes.
abstract string ResolveColumnName(string columnName)

Member Data Documentation

readonly ColumnChecker Deveel.Data.Sql.Statements.ColumnChecker.ExpressionChecker.checker
private

Definition at line 111 of file ColumnChecker.cs.


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