提交 bac9220a authored 作者: Thomas Mueller's avatar Thomas Mueller

Source code formatting.

上级 8acef7b9
...@@ -4953,18 +4953,15 @@ public class Parser { ...@@ -4953,18 +4953,15 @@ public class Parser {
command.setType(CommandInterface.ALTER_TABLE_ADD_COLUMN); command.setType(CommandInterface.ALTER_TABLE_ADD_COLUMN);
command.setTable(table); command.setTable(table);
ArrayList<Column> columnsToAdd = New.arrayList(); ArrayList<Column> columnsToAdd = New.arrayList();
if (readIf("(")) {
boolean b = readIf("(");
if (b) {
command.setIfNotExists(false); command.setIfNotExists(false);
do{ do {
String columnName = readColumnIdentifier(); String columnName = readColumnIdentifier();
Column column = parseColumnForTable(columnName, true); Column column = parseColumnForTable(columnName, true);
columnsToAdd.add(column); columnsToAdd.add(column);
} while (readIf(",")); } while (readIf(","));
read(")"); read(")");
command.setNewColumns(columnsToAdd); command.setNewColumns(columnsToAdd);
} else { } else {
boolean ifNotExists = readIfNoExists(); boolean ifNotExists = readIfNoExists();
command.setIfNotExists(ifNotExists); command.setIfNotExists(ifNotExists);
...@@ -4974,11 +4971,9 @@ public class Parser { ...@@ -4974,11 +4971,9 @@ public class Parser {
if (readIf("BEFORE")) { if (readIf("BEFORE")) {
command.setAddBefore(readColumnIdentifier()); command.setAddBefore(readColumnIdentifier());
} }
} }
command.setNewColumns(columnsToAdd); command.setNewColumns(columnsToAdd);
return command; return command;
} }
private int parseAction() { private int parseAction() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论