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

The node that represents a switch in a CASE expression More...

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

 CaseSwitchNode ()
 

Properties

IExpressionNode WhenExpression [get, private set]
 Gets the conditional expression in the node. More...
 
IExpressionNode ThenExpression [get, private set]
 Gets an optional fallback expression of the node. 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 Attributes

bool whenFound
 

Additional Inherited Members

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

Detailed Description

The node that represents a switch in a CASE expression

See also
SqlCaseExpressionNode

Definition at line 24 of file CaseSwitchNode.cs.

Constructor & Destructor Documentation

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

Definition at line 25 of file CaseSwitchNode.cs.

25  {
26  }

Member Function Documentation

override ISqlNode Deveel.Data.Sql.Parser.CaseSwitchNode.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 CaseSwitchNode.cs.

41  {
42  if (node is SqlKeyNode && ((SqlKeyNode) node).Text == "WHEN") {
43  whenFound = true;
44  } else if (node is IExpressionNode) {
45  if (whenFound) {
46  WhenExpression = (IExpressionNode) node;
47  } else {
48  ThenExpression = (IExpressionNode) node;
49  }
50  }
51  return base.OnChildNode(node);
52  }
IExpressionNode WhenExpression
Gets the conditional expression in the node.
IExpressionNode ThenExpression
Gets an optional fallback expression of the node.

Member Data Documentation

bool Deveel.Data.Sql.Parser.CaseSwitchNode.whenFound
private

Definition at line 38 of file CaseSwitchNode.cs.

Property Documentation

IExpressionNode Deveel.Data.Sql.Parser.CaseSwitchNode.ThenExpression
getprivate set

Gets an optional fallback expression of the node.

Definition at line 36 of file CaseSwitchNode.cs.

IExpressionNode Deveel.Data.Sql.Parser.CaseSwitchNode.WhenExpression
getprivate set

Gets the conditional expression in the node.

Definition at line 31 of file CaseSwitchNode.cs.


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