提交 83663e41 authored 作者: Noel Grandin's avatar Noel Grandin

improve local variable name

上级 5b6bf351
...@@ -244,20 +244,20 @@ public class AlterTableAddConstraint extends SchemaCommand { ...@@ -244,20 +244,20 @@ public class AlterTableAddConstraint extends SchemaCommand {
} }
int id = getObjectId(); int id = getObjectId();
String name = generateConstraintName(table); String name = generateConstraintName(table);
ConstraintReferential ref = new ConstraintReferential(getSchema(), ConstraintReferential refConstraint = new ConstraintReferential(getSchema(),
id, name, table); id, name, table);
ref.setColumns(indexColumns); refConstraint.setColumns(indexColumns);
ref.setIndex(index, isOwner); refConstraint.setIndex(index, isOwner);
ref.setRefTable(refTable); refConstraint.setRefTable(refTable);
ref.setRefColumns(refIndexColumns); refConstraint.setRefColumns(refIndexColumns);
ref.setRefIndex(refIndex, isRefOwner); refConstraint.setRefIndex(refIndex, isRefOwner);
if (checkExisting) { if (checkExisting) {
ref.checkExistingData(session); refConstraint.checkExistingData(session);
} }
constraint = ref; refTable.addConstraint(refConstraint);
refTable.addConstraint(constraint); refConstraint.setDeleteAction(deleteAction);
ref.setDeleteAction(deleteAction); refConstraint.setUpdateAction(updateAction);
ref.setUpdateAction(updateAction); constraint = refConstraint;
break; break;
} }
default: default:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论