Extension methods to ISqlNode for diagnostics and other purposes.
More...
Extension methods to ISqlNode for diagnostics and other purposes.
Definition at line 27 of file SqlNodeExtensions.cs.
static int Deveel.Data.Sql.Parser.SqlNodeExtensions.EndColumn |
( |
this ISqlNode |
node | ) |
|
|
inlinestatic |
Definition at line 105 of file SqlNodeExtensions.cs.
106 if (node == null || node.Tokens == null)
109 var token = node.Tokens.LastOrDefault();
110 return token == null ? 0 : token.Column;
static int Deveel.Data.Sql.Parser.SqlNodeExtensions.EndLine |
( |
this ISqlNode |
node | ) |
|
|
inlinestatic |
Definition at line 121 of file SqlNodeExtensions.cs.
122 if (node == null || node.Tokens == null)
125 var token = node.Tokens.LastOrDefault();
126 return token == null ? 0 : token.Line;
static ISqlNode Deveel.Data.Sql.Parser.SqlNodeExtensions.FindByName |
( |
this ISqlNode |
node, |
|
|
string |
nodeName |
|
) |
| |
|
inlinestatic |
Definition at line 57 of file SqlNodeExtensions.cs.
58 foreach (var childNode
in node.ChildNodes) {
59 if (childNode.NodeName.Equals(nodeName))
62 var foundNode = childNode.FindByName(nodeName);
63 if (foundNode != null)
static ISqlNode Deveel.Data.Sql.Parser.SqlNodeExtensions.FindNode |
( |
this ISqlNode |
node, |
|
|
Type |
nodeType |
|
) |
| |
|
inlinestatic |
Definition at line 36 of file SqlNodeExtensions.cs.
37 foreach (var childNode
in node.ChildNodes) {
38 if (nodeType.IsInstanceOfType(childNode))
41 var foundNode = childNode.FindNode(nodeType);
42 if (foundNode != null)
- Type Constraints
-
TNode | : | class | |
TNode | : | ISqlNode | |
Definition at line 28 of file SqlNodeExtensions.cs.
29 var foundNode = node.FindNode(typeof(TNode));
30 if (foundNode == null)
33 return (TNode)foundNode;
static TNode Deveel.Data.Sql.Parser.SqlNodeExtensions.FindNodeOf< TNode > |
( |
this ISqlNode |
node, |
|
|
string |
nodeName |
|
) |
| |
|
inlinestatic |
- Type Constraints
-
TNode | : | class | |
TNode | : | ISqlNode | |
Definition at line 49 of file SqlNodeExtensions.cs.
50 var parent = node.FindByName(nodeName);
54 return parent.FindNode<TNode>();
static IEnumerable Deveel.Data.Sql.Parser.SqlNodeExtensions.FindNodes |
( |
this ISqlNode |
node, |
|
|
Type |
nodeType |
|
) |
| |
|
inlinestatic |
Definition at line 83 of file SqlNodeExtensions.cs.
84 var nodes =
new List<ISqlNode>();
86 foreach (var childNode
in node.ChildNodes) {
87 if (nodeType.IsInstanceOfType(childNode)) {
91 nodes.AddRange(childNode.FindNodes(nodeType).Cast<ISqlNode>());
94 return nodes.ToArray();
- Type Constraints
-
TNode | : | class | |
TNode | : | ISqlNode | |
Definition at line 78 of file SqlNodeExtensions.cs.
79 var foundNodes = node.FindNodes(typeof(TNode));
80 return foundNodes.Cast<TNode>();
static bool Deveel.Data.Sql.Parser.SqlNodeExtensions.HasOptionalNode |
( |
this ISqlNode |
node, |
|
|
string |
nodeName |
|
) |
| |
|
inlinestatic |
Definition at line 70 of file SqlNodeExtensions.cs.
71 var foundNode = node.FindByName(nodeName);
72 if (foundNode == null)
75 return foundNode.ChildNodes.Any();
static int Deveel.Data.Sql.Parser.SqlNodeExtensions.StartColumn |
( |
this ISqlNode |
node | ) |
|
|
inlinestatic |
Definition at line 97 of file SqlNodeExtensions.cs.
98 if (node == null || node.Tokens == null)
101 var token = node.Tokens.FirstOrDefault();
102 return token == null ? 0 : token.Column;
static int Deveel.Data.Sql.Parser.SqlNodeExtensions.StartLine |
( |
this ISqlNode |
node | ) |
|
|
inlinestatic |
Definition at line 113 of file SqlNodeExtensions.cs.
114 if (node == null || node.Tokens == null)
117 var token = node.Tokens.FirstOrDefault();
118 return token == null ? 0 : token.Line;
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb/Deveel.Data.Sql.Parser/SqlNodeExtensions.cs