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.DefaultChecker Class Reference
Inheritance diagram for Deveel.Data.Sql.Statements.ColumnChecker.DefaultChecker:
Deveel.Data.Sql.Statements.ColumnChecker

Public Member Functions

 DefaultChecker (TableInfo tableInfo, bool ignoreCase)
 
override string ResolveColumnName (string columnName)
 
- Public Member Functions inherited from Deveel.Data.Sql.Statements.ColumnChecker
string StripTableName (string tableDomain, string column)
 
IEnumerable< string > StripColumnList (string tableDomain, IEnumerable< string > columnList)
 
SqlExpression CheckExpression (SqlExpression expression)
 
IEnumerable< string > CheckColumns (IEnumerable< string > columnNames)
 

Private Attributes

readonly TableInfo tableInfo
 
readonly bool ignoreCase
 

Additional Inherited Members

- Static Public Member Functions inherited from Deveel.Data.Sql.Statements.ColumnChecker
static ColumnChecker Default (IRequest context, ObjectName tableName)
 

Detailed Description

Definition at line 81 of file ColumnChecker.cs.

Constructor & Destructor Documentation

Definition at line 85 of file ColumnChecker.cs.

85  {
86  this.tableInfo = tableInfo;
87  this.ignoreCase = ignoreCase;
88  }

Member Function Documentation

override string Deveel.Data.Sql.Statements.ColumnChecker.DefaultChecker.ResolveColumnName ( string  columnName)
inlinevirtual

Implements Deveel.Data.Sql.Statements.ColumnChecker.

Definition at line 90 of file ColumnChecker.cs.

90  {
91  var comparison = ignoreCase ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal;
92  string foundColumn = null;
93 
94  foreach (var columnInfo in tableInfo) {
95  if (foundColumn != null)
96  throw new InvalidOperationException(String.Format("Column name '{0}' caused an ambiguous match in table.", columnName));
97 
98  if (String.Equals(columnInfo.ColumnName, columnName, comparison))
99  foundColumn = columnInfo.ColumnName;
100  }
101 
102  return foundColumn;
103  }
A long string in the system.

Member Data Documentation

readonly bool Deveel.Data.Sql.Statements.ColumnChecker.DefaultChecker.ignoreCase
private

Definition at line 83 of file ColumnChecker.cs.

readonly TableInfo Deveel.Data.Sql.Statements.ColumnChecker.DefaultChecker.tableInfo
private

Definition at line 82 of file ColumnChecker.cs.


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