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

Classes

class  GroupVariableResolver
 

Public Member Functions

 TableGroupResolver (FunctionTable table)
 
DataObject Resolve (ObjectName variable, int setIndex)
 Returns the value of a variable of a group. More...
 
IVariableResolver GetVariableResolver (int setIndex)
 Returns a IVariableResolver that can be used to resolve variable in the get set of the group. More...
 
void SetUpGroupForRow (int rowIndex)
 

Properties

FunctionTable Table [get, private set]
 
int GroupId [get, private set]
 
int Count [get]
 
- Properties inherited from Deveel.Data.Sql.IGroupResolver
int GroupId [get]
 A number that uniquely identifies this group from all the others in the set of groups. More...
 
int Count [get]
 Gets the total number of items in this group. More...
 

Private Member Functions

void EnsureGroup ()
 
ITableVariableResolver CreateVariableResolver ()
 

Private Attributes

IList< int > group
 
ITableVariableResolver groupVarResolver
 

Detailed Description

Definition at line 422 of file FunctionTable.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Tables.FunctionTable.TableGroupResolver.TableGroupResolver ( FunctionTable  table)
inline

Definition at line 426 of file FunctionTable.cs.

Member Function Documentation

ITableVariableResolver Deveel.Data.Sql.Tables.FunctionTable.TableGroupResolver.CreateVariableResolver ( )
inlineprivate

Definition at line 470 of file FunctionTable.cs.

470  {
471  if (groupVarResolver == null)
472  groupVarResolver = new GroupVariableResolver(this);
473 
474  return groupVarResolver;
475  }
void Deveel.Data.Sql.Tables.FunctionTable.TableGroupResolver.EnsureGroup ( )
inlineprivate

Definition at line 446 of file FunctionTable.cs.

IVariableResolver Deveel.Data.Sql.Tables.FunctionTable.TableGroupResolver.GetVariableResolver ( int  setIndex)
inline

Returns a IVariableResolver that can be used to resolve variable in the get set of the group.

Parameters
setIndex

The object returned is undefined after the next call to this method.

Returns

Implements Deveel.Data.Sql.IGroupResolver.

Definition at line 477 of file FunctionTable.cs.

477  {
478  var resolver = CreateVariableResolver();
479  resolver = resolver.ForRow(setIndex);
480  return resolver;
481  }
DataObject Deveel.Data.Sql.Tables.FunctionTable.TableGroupResolver.Resolve ( ObjectName  variable,
int  setIndex 
)
inline

Returns the value of a variable of a group.

Parameters
variable
setIndex

The set index signifies the set item of the group. For example, if the group contains 10 items, then set_index may be between 0 and 9. Return types must be either a String, BigDecimal or Boolean.

Returns

Implements Deveel.Data.Sql.IGroupResolver.

Definition at line 456 of file FunctionTable.cs.

456  {
457  int colIndex = Table.ReferenceTable.FindColumn(variable);
458  if (colIndex == -1)
459  throw new InvalidOperationException(String.Format("Column {0} not found in table {1}.", variable, Table.TableName));
460 
461  EnsureGroup();
462 
463  int rowIndex = setIndex;
464  if (group != null)
465  rowIndex = group[setIndex];
466 
467  return Table.ReferenceTable.GetValue(rowIndex, colIndex);
468  }
A long string in the system.
DataObject GetValue(long rowNumber, int columnOffset)
Gets a single cell within the table that is located at the given column offset and row...
void Deveel.Data.Sql.Tables.FunctionTable.TableGroupResolver.SetUpGroupForRow ( int  rowIndex)
inline

Definition at line 483 of file FunctionTable.cs.

483  {
484  if (Table.wholeTableAsGroup) {
485  if (GroupId != -2) {
486  GroupId = -2;
487  group = null;
488  }
489  } else {
490  int g = Table.GetRowGroup(rowIndex);
491  if (g != GroupId) {
492  GroupId = g;
493  group = null;
494  }
495  }
496  }

Member Data Documentation

IList<int> Deveel.Data.Sql.Tables.FunctionTable.TableGroupResolver.group
private

Definition at line 423 of file FunctionTable.cs.

ITableVariableResolver Deveel.Data.Sql.Tables.FunctionTable.TableGroupResolver.groupVarResolver
private

Definition at line 424 of file FunctionTable.cs.

Property Documentation

int Deveel.Data.Sql.Tables.FunctionTable.TableGroupResolver.Count
get

Definition at line 435 of file FunctionTable.cs.

int Deveel.Data.Sql.Tables.FunctionTable.TableGroupResolver.GroupId
getprivate set

Definition at line 433 of file FunctionTable.cs.

FunctionTable Deveel.Data.Sql.Tables.FunctionTable.TableGroupResolver.Table
getprivate set

Definition at line 431 of file FunctionTable.cs.


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