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

Public Member Functions

 TableVariableResolver (Table table)
 
 TableVariableResolver (Table table, int rowIndex)
 
DataObject Resolve (ObjectName columnName)
 Returns the value of a given variable. More...
 
SqlType ReturnType (ObjectName columnName)
 Returns the SqlType of object the given variable is. More...
 
ITableVariableResolver ForRow (int row)
 

Private Member Functions

int FindColumnName (ObjectName columnName)
 

Private Attributes

readonly Table table
 
readonly int rowIndex
 

Detailed Description

Definition at line 176 of file Table.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Tables.Table.TableVariableResolver.TableVariableResolver ( Table  table)
inline

Definition at line 177 of file Table.cs.

178  : this(table, -1) {
179  }
Deveel.Data.Sql.Tables.Table.TableVariableResolver.TableVariableResolver ( Table  table,
int  rowIndex 
)
inline

Definition at line 181 of file Table.cs.

181  {
182  this.table = table;
183  this.rowIndex = rowIndex;
184  }

Member Function Documentation

int Deveel.Data.Sql.Tables.Table.TableVariableResolver.FindColumnName ( ObjectName  columnName)
inlineprivate

Definition at line 189 of file Table.cs.

189  {
190  int colIndex = table.FindColumn(columnName);
191  if (colIndex == -1) {
192  throw new InvalidOperationException("Can't find column: " + columnName);
193  }
194  return colIndex;
195  }
int FindColumn(ObjectName columnName)
Definition: Table.cs:143
ITableVariableResolver Deveel.Data.Sql.Tables.Table.TableVariableResolver.ForRow ( int  row)
inline

Implements Deveel.Data.Sql.ITableVariableResolver.

Definition at line 205 of file Table.cs.

205  {
206  return new TableVariableResolver(table, row);
207  }
DataObject Deveel.Data.Sql.Tables.Table.TableVariableResolver.Resolve ( ObjectName  variable)
inline

Returns the value of a given variable.

Parameters
variable
Returns

Implements Deveel.Data.Sql.IVariableResolver.

Definition at line 197 of file Table.cs.

197  {
198  return table.GetValue(rowIndex, FindColumnName(columnName));
199  }
abstract DataObject GetValue(long rowNumber, int columnOffset)
Gets a single cell within the table that is located at the given column offset and row...
int FindColumnName(ObjectName columnName)
Definition: Table.cs:189
SqlType Deveel.Data.Sql.Tables.Table.TableVariableResolver.ReturnType ( ObjectName  variable)
inline

Returns the SqlType of object the given variable is.

Parameters
variable
Returns

Implements Deveel.Data.Sql.IVariableResolver.

Definition at line 201 of file Table.cs.

201  {
202  return table.GetColumnType(columnName);
203  }
SqlType GetColumnType(int columnOffset)
Definition: Table.cs:162

Member Data Documentation

readonly int Deveel.Data.Sql.Tables.Table.TableVariableResolver.rowIndex
private

Definition at line 187 of file Table.cs.

readonly Table Deveel.Data.Sql.Tables.Table.TableVariableResolver.table
private

Definition at line 186 of file Table.cs.


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