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

Public Member Functions

 ColumnsResolver (TableInfo tableInfo, bool ignoreCase)
 
override SqlExpression VisitReference (SqlReferenceExpression reference)
 
- 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)
 
virtual SqlExpression VisitQuery (SqlQueryExpression query)
 

Private Attributes

readonly TableInfo tableInfo
 
readonly bool ignoreCase
 

Detailed Description

Definition at line 355 of file TableInfo.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Tables.TableInfo.ColumnsResolver.ColumnsResolver ( TableInfo  tableInfo,
bool  ignoreCase 
)
inline

Definition at line 359 of file TableInfo.cs.

359  {
360  this.tableInfo = tableInfo;
361  this.ignoreCase = ignoreCase;
362  }

Member Function Documentation

override SqlExpression Deveel.Data.Sql.Tables.TableInfo.ColumnsResolver.VisitReference ( SqlReferenceExpression  reference)
inlinevirtual

Parameters
reference
Returns

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

Definition at line 364 of file TableInfo.cs.

364  {
365  var exp = reference;
366 
367  var colName = exp.ReferenceName.Name;
368  var comparison = ignoreCase ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal;
369 
370  foreach (var columnInfo in tableInfo) {
371  if (String.Equals(colName, columnInfo.ColumnName, comparison)) {
372  exp = SqlExpression.Reference(new ObjectName(tableInfo.TableName, columnInfo.ColumnName));
373  }
374  }
375 
376  return exp;
377  }
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.

Member Data Documentation

readonly bool Deveel.Data.Sql.Tables.TableInfo.ColumnsResolver.ignoreCase
private

Definition at line 357 of file TableInfo.cs.

readonly TableInfo Deveel.Data.Sql.Tables.TableInfo.ColumnsResolver.tableInfo
private

Definition at line 356 of file TableInfo.cs.


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