mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
removed duplicate method.
This commit is contained in:
@@ -1107,29 +1107,6 @@ public class SQLCreateTableStatement extends SQLStatementImpl implements SQLDDLS
|
||||
this.rowFormat = x;
|
||||
}
|
||||
|
||||
public SQLColumnDefinition getColumn(String name) {
|
||||
if (name == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return getColumn(
|
||||
FnvHash.hashCode64(name)
|
||||
);
|
||||
}
|
||||
|
||||
public SQLColumnDefinition getColumn(long nameHash) {
|
||||
for (SQLTableElement element : this.tableElementList) {
|
||||
if (element instanceof SQLColumnDefinition) {
|
||||
SQLColumnDefinition column = (SQLColumnDefinition) element;
|
||||
if (column.nameHashCode64() == nameHash) {
|
||||
return column;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isPrimaryColumn(long columnNameHash) {
|
||||
SQLPrimaryKey pk = this.findPrimaryKey();
|
||||
if (pk == null) {
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ public class MySqlCreateTableTest112 extends MysqlTest {
|
||||
stmt.accept(v);
|
||||
|
||||
assertEquals(4, v.getColumns().size());
|
||||
SQLColumnDefinition column = stmt.getColumn("id");
|
||||
SQLColumnDefinition column = stmt.findColumn("id");
|
||||
assertNotNull(column);
|
||||
assertEquals(2, column.getConstraints().size());
|
||||
assertTrue(column.isPrimaryKey());
|
||||
|
||||
Reference in New Issue
Block a user