@SuppressWarnings("unchecked")
	private List<Column> getTableColumns(Table table, List<String> primaryKeys, List<String> indices, Map<Object, Object> uniqueIndices, Map<Object, Object> uniqueColumns) throws SQLException {

		List<Column> pkList = new ArrayList<Column>();
		List<Column> columns = new LinkedList<Column>();
		ResultSet columnRs = getColumnsResultSet(table);

		while (columnRs.next()) {
			int sqlType = columnRs.getInt("DATA_TYPE");
			String sqlTypeName = columnRs.getString("TYPE_NAME");
			if ("INT".equals(sqlTypeName)) {
				sqlTypeName = "INTEGER";
			}
			if ("TEXT".equals(sqlTypeName)) {
				sqlTypeName = "VARCHAR";
			}
			if ("DATETIME".equals(sqlTypeName)) {
				sqlTypeName = "TIMESTAMP";
			}
			String columnName = columnRs.getString("COLUMN_NAME");
			String columnDefaultValue = columnRs.getString("COLUMN_DEF");
			boolean isNullable = (DatabaseMetaData.columnNullable == columnRs.getInt("NULLABLE"));
			int size = columnRs.getInt("COLUMN_SIZE");
			int decimalDigits = columnRs.getInt("DECIMAL_DIGITS");

			String comment = columnRs.getString("REMARKS");// 列字段注释

			boolean isPk = primaryKeys.contains(columnName);
			boolean ifFk = table.getImportedKeys().getHasImportedKeyColumn(columnName);
			boolean isIndexed = indices.contains(columnName);
			String uniqueIndex = (String) uniqueIndices.get(columnName);
			List<String> columnsInUniqueIndex = null;
			if (uniqueIndex != null) {
				columnsInUniqueIndex = (List<String>) uniqueColumns.get(uniqueIndex);
			}

			boolean isUnique = columnsInUniqueIndex != null && columnsInUniqueIndex.size() == 1;
			if (isUnique) {
				log.debug("unique column:" + columnName);
			}
			Column column = new Column(table, sqlType, sqlTypeName, columnName, size, decimalDigits, isPk, ifFk, isNullable, isIndexed, isUnique, columnDefaultValue, comment);

			columns.add(column);
			if (isPk) {
				pkList.add(column);
			}
		}
		table.setPrimaryKeyColumns(pkList);
		columnRs.close();
		return columns;
	}