提交 c5bef216 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Use Parser.parseCascadeOrRestrict() in more places

上级 c98efe8f
...@@ -1774,10 +1774,9 @@ public class Parser { ...@@ -1774,10 +1774,9 @@ public class Parser {
command.setSchemaName(readUniqueIdentifier()); command.setSchemaName(readUniqueIdentifier());
ifExists = readIfExists(ifExists); ifExists = readIfExists(ifExists);
command.setIfExists(ifExists); command.setIfExists(ifExists);
if (readIf("CASCADE")) { ConstraintActionType dropAction = parseCascadeOrRestrict();
command.setDropAction(ConstraintActionType.CASCADE); if (dropAction != null) {
} else if (readIf("RESTRICT")) { command.setDropAction(dropAction);
command.setDropAction(ConstraintActionType.RESTRICT);
} }
return command; return command;
} else if (readIf("ALL")) { } else if (readIf("ALL")) {
...@@ -1811,10 +1810,9 @@ public class Parser { ...@@ -1811,10 +1810,9 @@ public class Parser {
command.setTypeName(readUniqueIdentifier()); command.setTypeName(readUniqueIdentifier());
ifExists = readIfExists(ifExists); ifExists = readIfExists(ifExists);
command.setIfExists(ifExists); command.setIfExists(ifExists);
if (readIf("CASCADE")) { ConstraintActionType dropAction = parseCascadeOrRestrict();
command.setDropAction(ConstraintActionType.CASCADE); if (dropAction != null) {
} else if (readIf("RESTRICT")) { command.setDropAction(dropAction);
command.setDropAction(ConstraintActionType.RESTRICT);
} }
return command; return command;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论