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.OrderByNode Class Reference

Within an SQL query node, this describes the ordering criteria that will be applied when returning the results of the selection. More...

Inheritance diagram for Deveel.Data.Sql.Parser.OrderByNode:
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

 OrderByNode ()
 

Properties

IExpressionNode Expression [get, private set]
 Gets the expression used to compare results and put in order. More...
 
bool Ascending [get, private set]
 Gets a value indicating whether the returned ordered set will be presented in ascending order. 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 GetOrder (ISqlNode node)
 

Additional Inherited Members

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

Detailed Description

Within an SQL query node, this describes the ordering criteria that will be applied when returning the results of the selection.

Definition at line 25 of file OrderByNode.cs.

Constructor & Destructor Documentation

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

Definition at line 26 of file OrderByNode.cs.

26  {
27  }

Member Function Documentation

void Deveel.Data.Sql.Parser.OrderByNode.GetOrder ( ISqlNode  node)
inlineprivate

Definition at line 53 of file OrderByNode.cs.

53  {
54  var child = node.ChildNodes.FirstOrDefault();
55  if (child is SqlKeyNode) {
56  var keyNode = (SqlKeyNode) child;
57  if (String.Equals(keyNode.Text, "ASC", StringComparison.OrdinalIgnoreCase)) {
58  Ascending = true;
59  } else if (String.Equals(keyNode.Text, "DESC", StringComparison.OrdinalIgnoreCase)) {
60  Ascending = false;
61  }
62  }
63  }
A long string in the system.
bool Ascending
Gets a value indicating whether the returned ordered set will be presented in ascending order...
Definition: OrderByNode.cs:38
override ISqlNode Deveel.Data.Sql.Parser.OrderByNode.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 41 of file OrderByNode.cs.

41  {
42  if (node.NodeName == "sql_reference_expression") {
43  Expression = (IExpressionNode) node;
44  } else if (node.NodeName == "sql_expression") {
45  Expression = (IExpressionNode) node;
46  } else if (node.NodeName == "sort_order") {
47  GetOrder(node);
48  }
49 
50  return base.OnChildNode(node);
51  }
void GetOrder(ISqlNode node)
Definition: OrderByNode.cs:53
IExpressionNode Expression
Gets the expression used to compare results and put in order.
Definition: OrderByNode.cs:32

Property Documentation

bool Deveel.Data.Sql.Parser.OrderByNode.Ascending
getprivate set

Gets a value indicating whether the returned ordered set will be presented in ascending order.

Definition at line 38 of file OrderByNode.cs.

IExpressionNode Deveel.Data.Sql.Parser.OrderByNode.Expression
getprivate set

Gets the expression used to compare results and put in order.

Definition at line 32 of file OrderByNode.cs.


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