Commit 4a21ba78 authored by Quxl's avatar Quxl

x

parent f0da7c0a
...@@ -68,14 +68,16 @@ public class MysqlTo { ...@@ -68,14 +68,16 @@ public class MysqlTo {
List<String> paramyKeys = new ArrayList<String>(); List<String> paramyKeys = new ArrayList<String>();
while(set.next()) { while(set.next()) {
String columnName = set.getString("COLUMN_NAME").trim(); String columnName = set.getString("COLUMN_NAME").trim();
String columnType = set.getString("COLUMN_TYPE").trim(); if(!names.contains(columnName)) {
String columnComment = set.getString("COLUMN_COMMENT"); String columnType = set.getString("COLUMN_TYPE").trim();
String constraintName = set.getString("CONSTRAINT_NAME"); String columnComment = set.getString("COLUMN_COMMENT");
names.add(columnName); String constraintName = set.getString("CONSTRAINT_NAME");
types.add(columnType); names.add(columnName);
comments.add(columnComment); types.add(columnType);
if("PRIMARY".equals(constraintName)) { comments.add(columnComment);
paramyKeys.add(columnName); if("PRIMARY".equals(constraintName)) {
paramyKeys.add(columnName);
}
} }
} }
ReverseUtil.parseEntity(pkg_name, author, root, name, comment, paramyKeys, names, types, comments); ReverseUtil.parseEntity(pkg_name, author, root, name, comment, paramyKeys, names, types, comments);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment