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

Public Member Functions

 TableColumnChecker (IEnumerable< SqlTableColumn > columns, 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 IEnumerable< SqlTableColumncolumns
 
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 139 of file CreateTableStatement.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Statements.CreateTableStatement.TableColumnChecker.TableColumnChecker ( IEnumerable< SqlTableColumn columns,
bool  ignoreCase 
)
inline

Member Function Documentation

override string Deveel.Data.Sql.Statements.CreateTableStatement.TableColumnChecker.ResolveColumnName ( string  columnName)
inlinevirtual

Implements Deveel.Data.Sql.Statements.ColumnChecker.

Definition at line 148 of file CreateTableStatement.cs.

148  {
149  var comparison = ignoreCase ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal;
150  string foundColumn = null;
151 
152  foreach (var columnInfo in columns) {
153  if (foundColumn != null)
154  throw new InvalidOperationException(String.Format("Column name '{0}' caused an ambiguous match in table.", columnName));
155 
156  if (String.Equals(columnInfo.ColumnName, columnName, comparison))
157  foundColumn = columnInfo.ColumnName;
158  }
159 
160  return foundColumn;
161  }
A long string in the system.

Member Data Documentation

readonly IEnumerable<SqlTableColumn> Deveel.Data.Sql.Statements.CreateTableStatement.TableColumnChecker.columns
private

Definition at line 140 of file CreateTableStatement.cs.

readonly bool Deveel.Data.Sql.Statements.CreateTableStatement.TableColumnChecker.ignoreCase
private

Definition at line 141 of file CreateTableStatement.cs.


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