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

Public Member Functions

 RowVariableResolver (Row row)
 
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...
 

Package Functions

void NextAssignment ()
 

Properties

int SetId [get]
 

Private Attributes

readonly Row row
 
int assignmentCount
 

Detailed Description

Definition at line 434 of file Row.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Tables.Row.RowVariableResolver.RowVariableResolver ( Row  row)
inline

Definition at line 438 of file Row.cs.

438  {
439  this.row = row;
440  }

Member Function Documentation

void Deveel.Data.Sql.Tables.Row.RowVariableResolver.NextAssignment ( )
inlinepackage

Definition at line 442 of file Row.cs.

442  {
443  ++assignmentCount;
444  }
DataObject Deveel.Data.Sql.Tables.Row.RowVariableResolver.Resolve ( ObjectName  variable)
inline

Returns the value of a given variable.

Parameters
variable
Returns

Implements Deveel.Data.Sql.IVariableResolver.

Definition at line 450 of file Row.cs.

450  {
451  string colName = columnName.Name;
452 
453  int colIndex = row.Table.TableInfo.IndexOfColumn(colName);
454  if (colIndex == -1)
455  throw new InvalidOperationException(String.Format("Column '{0}' could not be found in table '{1}'", colName, row.Table.FullName));
456 
457  DataObject value;
458  if (!row.values.TryGetValue(colIndex, out value))
459  throw new InvalidOperationException("Column " + colName + " hasn't been set yet.");
460 
461  return value;
462  }
A long string in the system.
ObjectName FullName
Gets the fully qualified name of the object used to resolve it uniquely within the database...
Definition: IDbObject.cs:30
ITable Table
Gets the instance of the table that contains the row.
Definition: Row.cs:92
TableInfo TableInfo
Gets the metadata information of the table, used to resolve the column sources.
Definition: ITable.cs:47
int IndexOfColumn(string columnName)
Gets the offset of the column with the given name.
Definition: TableInfo.cs:310
Dictionary< int, DataObject > values
Definition: Row.cs:46
SqlType Deveel.Data.Sql.Tables.Row.RowVariableResolver.ReturnType ( ObjectName  variable)
inline

Returns the SqlType of object the given variable is.

Parameters
variable
Returns

Implements Deveel.Data.Sql.IVariableResolver.

Definition at line 464 of file Row.cs.

464  {
465  string colName = columnName.Name;
466 
467  int colIndex = row.Table.TableInfo.IndexOfColumn(colName);
468  if (colIndex == -1)
469  throw new InvalidOperationException("Can't find column: " + colName);
470 
471  return row.Table.TableInfo[colIndex].ColumnType;
472  }
ITable Table
Gets the instance of the table that contains the row.
Definition: Row.cs:92
TableInfo TableInfo
Gets the metadata information of the table, used to resolve the column sources.
Definition: ITable.cs:47
int IndexOfColumn(string columnName)
Gets the offset of the column with the given name.
Definition: TableInfo.cs:310

Member Data Documentation

int Deveel.Data.Sql.Tables.Row.RowVariableResolver.assignmentCount
private

Definition at line 436 of file Row.cs.

readonly Row Deveel.Data.Sql.Tables.Row.RowVariableResolver.row
private

Definition at line 435 of file Row.cs.

Property Documentation

int Deveel.Data.Sql.Tables.Row.RowVariableResolver.SetId
get

Definition at line 446 of file Row.cs.


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