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

Use Parser.parseCascadeOrRestrict() in more places

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