An SQL node describing an in-line CASE
conditional expression.
More...
|
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...
|
|
virtual void | OnNodeInit () |
| After the initialization of the node from the parser, this method is invoked to let the specific initialization to occur. More...
|
|
|
IEnumerable< CaseSwitchNode > | CaseSwitches [get, private set] |
| Gets a read-only list of switches that will be evaluated to return the result of the expresion. More...
|
|
IExpressionNode | ElseExpression [get, private set] |
| Gets a fallback expression that will be evaluated if none of CaseSwitches is be evaluated. More...
|
|
IExpressionNode | TestExpression [get, private set] |
| Gets the main expression to be evaluated against the CaseSwitches More...
|
|
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< ISqlNode > | ChildNodes [get, private set] |
| Gets an immutable list of nodes, children of the current node. More...
|
|
IEnumerable< Token > | Tokens [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] |
|
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< ISqlNode > | ChildNodes [get] |
| Gets a read-only enumeration of the children nodes, if any. More...
|
|
IEnumerable< Token > | Tokens [get] |
| Gets an enumeration of the tokens composing the this node. More...
|
|
An SQL node describing an in-line CASE
conditional expression.
Definition at line 25 of file SqlCaseExpressionNode.cs.
Deveel.Data.Sql.Parser.SqlCaseExpressionNode.SqlCaseExpressionNode |
( |
| ) |
|
|
inlinepackage |
void Deveel.Data.Sql.Parser.SqlCaseExpressionNode.GetElse |
( |
ISqlNode |
node | ) |
|
|
inlineprivate |
Definition at line 63 of file SqlCaseExpressionNode.cs.
64 foreach (var childNode
in node.ChildNodes) {
65 if (childNode is IExpressionNode) {
IExpressionNode ElseExpression
Gets a fallback expression that will be evaluated if none of CaseSwitches is be evaluated.
void Deveel.Data.Sql.Parser.SqlCaseExpressionNode.GetWhenThenList |
( |
ISqlNode |
node | ) |
|
|
inlineprivate |
Definition at line 72 of file SqlCaseExpressionNode.cs.
73 var switches =
new List<CaseSwitchNode>();
75 foreach (var childNode
in node.ChildNodes) {
76 if (childNode is CaseSwitchNode)
77 switches.Add((CaseSwitchNode)childNode);
IEnumerable< CaseSwitchNode > CaseSwitches
Gets a read-only list of switches that will be evaluated to return the result of the expresion...
override ISqlNode Deveel.Data.Sql.Parser.SqlCaseExpressionNode.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 47 of file SqlCaseExpressionNode.cs.
48 if (node.NodeName ==
"case_test_expression_opt") {
49 if (node.ChildNodes.Any()) {
50 var exp = node.ChildNodes.First();
51 if (exp is IExpressionNode)
54 }
else if (node.NodeName ==
"case_when_then_list") {
56 }
else if (node.NodeName ==
"case_else_opt") {
60 return base.OnChildNode(node);
IExpressionNode TestExpression
Gets the main expression to be evaluated against the CaseSwitches
void GetElse(ISqlNode node)
void GetWhenThenList(ISqlNode node)
IEnumerable<CaseSwitchNode> Deveel.Data.Sql.Parser.SqlCaseExpressionNode.CaseSwitches |
|
getprivate set |
IExpressionNode Deveel.Data.Sql.Parser.SqlCaseExpressionNode.ElseExpression |
|
getprivate set |
IExpressionNode Deveel.Data.Sql.Parser.SqlCaseExpressionNode.TestExpression |
|
getprivate set |
The documentation for this class was generated from the following file: