DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Protected Member Functions | Package Functions | Properties | Private Member Functions | List of all members
Deveel.Data.Sql.Parser.GroupByNode Class Reference

A node that describes the GROUP BY clause in a SQL query. More...

Inheritance diagram for Deveel.Data.Sql.Parser.GroupByNode:
Deveel.Data.Sql.Parser.SqlNode Deveel.Data.Sql.Parser.ISqlNode

Protected Member Functions

override ISqlNode OnChildNode (ISqlNode node)
 During the initialization of the node from the parser, this method is called for every child node added to ChildNodes More...
 
- Protected Member Functions inherited from Deveel.Data.Sql.Parser.SqlNode
virtual void OnNodeInit ()
 After the initialization of the node from the parser, this method is invoked to let the specific initialization to occur. More...
 

Package Functions

 GroupByNode ()
 

Properties

IEnumerable< IExpressionNodeGroupExpressions [get, private set]
 Gets the expression node to group the results. More...
 
IExpressionNode HavingExpression [get, private set]
 Gets the HAVING expression used to filter the grouped results. More...
 
- Properties inherited from Deveel.Data.Sql.Parser.SqlNode
ISqlNode Parent [get, private set]
 Gets the parent of the current node. More...
 
string NodeName [get, private set]
 Gets the name of the node, as expressed in the SQL grammar. More...
 
IEnumerable< ISqlNodeChildNodes [get, private set]
 Gets an immutable list of nodes, children of the current node. More...
 
IEnumerable< TokenTokens [get, private set]
 Gets an immutable list of Token that represent the source of this node. More...
 
string ISqlNode. NodeName [get]
 
ISqlNode ISqlNode. Parent [get]
 
IEnumerable< ISqlNode > ISqlNode. ChildNodes [get]
 
IEnumerable< Token > ISqlNode. Tokens [get]
 
- Properties inherited from Deveel.Data.Sql.Parser.ISqlNode
string NodeName [get]
 Gets the name of the node analyzed from the parser. More...
 
ISqlNode Parent [get]
 Gets a reference to the parent ISqlNode, if any. More...
 
IEnumerable< ISqlNodeChildNodes [get]
 Gets a read-only enumeration of the children nodes, if any. More...
 
IEnumerable< TokenTokens [get]
 Gets an enumeration of the tokens composing the this node. More...
 

Private Member Functions

void GetGroupExpressions (ISqlNode node)
 

Additional Inherited Members

- Public Member Functions inherited from Deveel.Data.Sql.Parser.SqlNode
 SqlNode ()
 

Detailed Description

A node that describes the GROUP BY clause in a SQL query.

Definition at line 25 of file GroupByNode.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Parser.GroupByNode.GroupByNode ( )
inlinepackage

Definition at line 26 of file GroupByNode.cs.

26  {
27  }

Member Function Documentation

void Deveel.Data.Sql.Parser.GroupByNode.GetGroupExpressions ( ISqlNode  node)
inlineprivate

Definition at line 50 of file GroupByNode.cs.

50  {
51  var exps = new List<IExpressionNode>();
52  foreach (var childNode in node.ChildNodes) {
53  if (childNode is IExpressionNode)
54  exps.Add((IExpressionNode) childNode);
55  }
56 
57  GroupExpressions = exps.ToArray();
58  }
IEnumerable< IExpressionNode > GroupExpressions
Gets the expression node to group the results.
Definition: GroupByNode.cs:32
override ISqlNode Deveel.Data.Sql.Parser.GroupByNode.OnChildNode ( ISqlNode  node)
inlineprotectedvirtual

During the initialization of the node from the parser, this method is called for every child node added to ChildNodes

Reimplemented from Deveel.Data.Sql.Parser.SqlNode.

Definition at line 40 of file GroupByNode.cs.

40  {
41  if (node.NodeName == "sql_expression_list") {
42  GetGroupExpressions(node);
43  } else if (node.NodeName == "having_clause_opt") {
44  HavingExpression = node.ChildNodes.FirstOrDefault() as IExpressionNode;
45  }
46 
47  return base.OnChildNode(node);
48  }
IExpressionNode HavingExpression
Gets the HAVING expression used to filter the grouped results.
Definition: GroupByNode.cs:37
IEnumerable< ISqlNode > ChildNodes
Gets a read-only enumeration of the children nodes, if any.
Definition: ISqlNode.cs:39
void GetGroupExpressions(ISqlNode node)
Definition: GroupByNode.cs:50

Property Documentation

IEnumerable<IExpressionNode> Deveel.Data.Sql.Parser.GroupByNode.GroupExpressions
getprivate set

Gets the expression node to group the results.

Definition at line 32 of file GroupByNode.cs.

IExpressionNode Deveel.Data.Sql.Parser.GroupByNode.HavingExpression
getprivate set

Gets the HAVING expression used to filter the grouped results.

Definition at line 37 of file GroupByNode.cs.


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