本文整理汇总了C#中ISqlNode.FindNode方法的典型用法代码示例。如果您正苦于以下问题:C# ISqlNode.FindNode方法的具体用法?C# ISqlNode.FindNode怎么用?C# ISqlNode.FindNode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISqlNode
的用法示例。
在下文中一共展示了ISqlNode.FindNode方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnChildNode
protected override ISqlNode OnChildNode(ISqlNode node)
{
if (node.NodeName.Equals("label_opt")) {
Label = node.FindNode<StringLiteralNode>().Value;
} else if (node.NodeName.Equals("when_opt")) {
WhenExpression = node.FindNode<IExpressionNode>();
}
return base.OnChildNode(node);
}
示例2: OnChildNode
protected override ISqlNode OnChildNode(ISqlNode node)
{
if (node.NodeName.Equals("label_opt")) {
Label = node.FindNode<IdentifierNode>().Text;
} else if (node.NodeName.Equals("when_opt")) {
WhenExpression = node.FindNode<IExpressionNode>();
}
return base.OnChildNode(node);
}
示例3: OnChildNode
protected override ISqlNode OnChildNode(ISqlNode node)
{
if (node.NodeName.Equals("exception_name_opt"))
ExceptionName = node.FindNode<IdentifierNode>().Text;
return base.OnChildNode(node);
}
示例4: OnChildNode
protected override ISqlNode OnChildNode(ISqlNode node)
{
if (node is ObjectNameNode) {
TableName = ((ObjectNameNode) node).Name;
} else if (node.NodeName == "column_set_list") {
Columns = node.FindNodes<UpdateColumnNode>();
} else if (node.NodeName == "update_where") {
WhereExpression = node.FindNode<IExpressionNode>();
} else if (node.NodeName == "limit_opt") {
var child = node.FindNode<IntegerLiteralNode>();
if (child != null)
Limit = (int) child.Value;
}
return base.OnChildNode(node);
}
示例5: OnChildNode
protected override ISqlNode OnChildNode(ISqlNode node)
{
if (node is ObjectNameNode) {
TableName = ((ObjectNameNode) node).Name;
} else if (node.NodeName.Equals("insert_source")) {
var colNode = node.FindByName("column_list_opt");
if (colNode != null)
ColumnNames = colNode.FindNodes<IdentifierNode>().Select(x => x.Text);
ValuesInsert = node.FindNode<ValuesInsertNode>();
SetInsert = node.FindNode<SetInsertNode>();
QueryInsert = node.FindNode<QueryInsertNode>();
}
return base.OnChildNode(node);
}
示例6: GetFromCursor
private void GetFromCursor(ISqlNode node)
{
var idNode = node.FindNode<IdentifierNode>();
if (idNode != null) {
FromCursor = true;
CursorName = idNode.Text;
}
}
示例7: OnChildNode
protected override ISqlNode OnChildNode(ISqlNode node)
{
if (node is IdentifierNode) {
UserName = ((IdentifierNode) node).Text;
} else if (node.NodeName.Equals("identified")) {
Identificator = node.FindNode<IUserIdentificatorNode>();
}
return base.OnChildNode(node);
}
示例8: OnChildNode
protected override ISqlNode OnChildNode(ISqlNode node)
{
if (node.NodeName == "drop_procedure_trigger") {
var idNode = node.FindNode<ObjectNameNode>();
if (idNode == null)
throw new SqlParseException("Could not find the name of the trigger to delete.");
TriggerName = idNode.Name;
} else if (node.NodeName == "drop_callback_trigger") {
CallbackTrigger = true;
var tableNameNode = node.FindNode<ObjectNameNode>();
if (tableNameNode == null)
throw new SqlParseException("Could not find the name of the table in a DROP CALLBACK TRIGGER");
TableName = tableNameNode.Name;
}
return base.OnChildNode(node);
}
示例9: OnChildNode
protected override ISqlNode OnChildNode(ISqlNode node)
{
if (node is ObjectNameNode) {
SequenceName = ((ObjectNameNode) node).Name;
} else if (node.NodeName.Equals("start_opt")) {
StartWith = node.FindNode<IExpressionNode>();
} else if (node.NodeName.Equals("increment_opt")) {
IncrementBy = node.FindNode<IExpressionNode>();
} else if (node.NodeName.Equals("minvalue_opt")) {
MinValue = node.FindNode<IExpressionNode>();
} else if (node.NodeName.Equals("maxvalue_opt")) {
MaxValue = node.FindNode<IExpressionNode>();
} else if (node.NodeName.Equals("cycle_opt")) {
Cycle = node.ChildNodes.Any();
} else if (node.NodeName.Equals("cache_opt")) {
Cache = node.FindNode<IExpressionNode>();
}
return base.OnChildNode(node);
}
示例10: OnChildNode
protected override ISqlNode OnChildNode(ISqlNode node)
{
if (node.NodeName.Equals("plsql_label_opt")) {
var labelNode = node.FindNode<LabelNode>();
if (labelNode != null)
Label = labelNode.Text;
} else if (node.NodeName.Equals("declare_statement_opt")) {
Declarations = node.FindNodes<IDeclareNode>();
} else if (node is PlSqlCodeBlockNode) {
CodeBlock = (PlSqlCodeBlockNode) node;
}
return base.OnChildNode(node);
}
示例11: OnChildNode
/// <inheritdoc/>
protected override ISqlNode OnChildNode(ISqlNode node)
{
if (node.NodeName == "join_type") {
GetJoinType(node);
} else if (node is IFromSourceNode) {
Source = (IFromSourceNode) node;
} else if (node.NodeName == "from_source") {
Source = (IFromSourceNode) node.ChildNodes.FirstOrDefault();
} else if (node.NodeName == "on_opt") {
OnExpression = node.FindNode<IExpressionNode>();
} else if (node.NodeName == "join_opt") {
var join = node.ChildNodes.FirstOrDefault();
if (join != null)
NextJoin = (JoinNode) join;
}
return base.OnChildNode(node);
}
示例12: GetUserType
private void GetUserType(ISqlNode node)
{
IsPrimitive = false;
TypeName = node.FindNode<ObjectNameNode>().Name;
var optMetaList = node.FindByName("user_type_meta_opt");
if (optMetaList != null) {
GetMeta(optMetaList.ChildNodes.FirstOrDefault());
}
}