DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Protected Member Functions | Properties | Private Member Functions | List of all members
Deveel.Data.Sql.Query.GroupNode Class Reference
Inheritance diagram for Deveel.Data.Sql.Query.GroupNode:
Deveel.Data.Sql.Query.SingleQueryPlanNode Deveel.Data.Sql.Query.IQueryPlanNode Deveel.Data.Serialization.ISerializable

Public Member Functions

 GroupNode (IQueryPlanNode child, ObjectName groupMaxColumn, SqlExpression[] functions, string[] names)
 
 GroupNode (IQueryPlanNode child, ObjectName[] columnNames, ObjectName groupMaxColumn, SqlExpression[] functions, string[] names)
 
override ITable Evaluate (IRequest context)
 

Protected Member Functions

override void GetData (SerializeData data)
 
- Protected Member Functions inherited from Deveel.Data.Sql.Query.SingleQueryPlanNode
 SingleQueryPlanNode (IQueryPlanNode child)
 
 SingleQueryPlanNode (ObjectData data)
 

Properties

ObjectName[] ColumnNames [get, private set]
 
ObjectName GroupMaxColumn [get, private set]
 
SqlExpression[] Functions [get, private set]
 
string[] Names [get, private set]
 
- Properties inherited from Deveel.Data.Sql.Query.SingleQueryPlanNode
IQueryPlanNode Child [get, private set]
 Gets the single child node of the plan. More...
 

Private Member Functions

 GroupNode (ObjectData data)
 

Detailed Description

Definition at line 25 of file GroupNode.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Query.GroupNode.GroupNode ( IQueryPlanNode  child,
ObjectName  groupMaxColumn,
SqlExpression[]  functions,
string[]  names 
)
inline

Definition at line 26 of file GroupNode.cs.

27  : this(child, new ObjectName[0], groupMaxColumn, functions, names) {
28  }
Deveel.Data.Sql.Query.GroupNode.GroupNode ( IQueryPlanNode  child,
ObjectName[]  columnNames,
ObjectName  groupMaxColumn,
SqlExpression[]  functions,
string[]  names 
)
inline

Definition at line 30 of file GroupNode.cs.

30  : base(child) {
31  ColumnNames = columnNames;
32  GroupMaxColumn = groupMaxColumn;
33  Functions = functions;
34  Names = names;
35  }
Deveel.Data.Sql.Query.GroupNode.GroupNode ( ObjectData  data)
inlineprivate

Definition at line 37 of file GroupNode.cs.

38  : base(data) {
39  ColumnNames = data.GetValue<ObjectName[]>("Columns");
40  GroupMaxColumn = data.GetValue<ObjectName>("GroupMax");
41  Functions = data.GetValue<SqlExpression[]>("Functions");
42  Names = data.GetValue<string[]>("Names");
43  }
Defines the base class for instances that represent SQL expression tree nodes.

Member Function Documentation

override ITable Deveel.Data.Sql.Query.GroupNode.Evaluate ( IRequest  context)
inlinevirtual

Implements Deveel.Data.Sql.Query.SingleQueryPlanNode.

Definition at line 60 of file GroupNode.cs.

60  {
61  var childTable = Child.Evaluate(context);
62  var funTable = new FunctionTable(childTable, Functions, Names, context);
63 
64  // If no columns then it is implied the whole table is the group.
65  if (ColumnNames == null) {
66  funTable = funTable.AsGroup();
67  } else {
68  funTable = funTable.CreateGroupMatrix(ColumnNames);
69  }
70 
71  return funTable.MergeWith(GroupMaxColumn);
72  }
ITable Evaluate(IRequest context)
IQueryPlanNode Child
Gets the single child node of the plan.
override void Deveel.Data.Sql.Query.GroupNode.GetData ( SerializeData  data)
inlineprotectedvirtual

Reimplemented from Deveel.Data.Sql.Query.SingleQueryPlanNode.

Definition at line 53 of file GroupNode.cs.

53  {
54  data.SetValue("Columns", ColumnNames);
55  data.SetValue("GroupMax", GroupMaxColumn);
56  data.SetValue("Functions", Functions);
57  data.SetValue("Names", Names);
58  }
void SetValue(string key, Type type, object value)

Property Documentation

ObjectName [] Deveel.Data.Sql.Query.GroupNode.ColumnNames
getprivate set

Definition at line 45 of file GroupNode.cs.

SqlExpression [] Deveel.Data.Sql.Query.GroupNode.Functions
getprivate set

Definition at line 49 of file GroupNode.cs.

ObjectName Deveel.Data.Sql.Query.GroupNode.GroupMaxColumn
getprivate set

Definition at line 47 of file GroupNode.cs.

string [] Deveel.Data.Sql.Query.GroupNode.Names
getprivate set

Definition at line 51 of file GroupNode.cs.


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