private List getTableColumns(
      Table table, List primaryKeys, List indices, Map uniqueIndices, Map uniqueColumns)
      throws SQLException {
    // get the columns
    List columns = new LinkedList();
    ResultSet columnRs = getColumnsResultSet(table);

    while (columnRs.next()) {
      int sqlType = columnRs.getInt("DATA_TYPE");
      String sqlTypeName = columnRs.getString("TYPE_NAME");
      String columnName = columnRs.getString("COLUMN_NAME");
      String columnDefaultValue = columnRs.getString("COLUMN_DEF");

      String remarks = columnRs.getString("REMARKS");
      if (remarks == null && dbHelper.isOracleDataBase()) {
        remarks = getOracleColumnComments(table.getSqlName(), columnName);
      }

      // if columnNoNulls or columnNullableUnknown assume "not nullable"
      boolean isNullable = (DatabaseMetaData.columnNullable == columnRs.getInt("NULLABLE"));
      int size = columnRs.getInt("COLUMN_SIZE");
      int decimalDigits = columnRs.getInt("DECIMAL_DIGITS");

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

      boolean isUnique = columnsInUniqueIndex != null && columnsInUniqueIndex.size() == 1;
      if (isUnique) {
        GLogger.trace("unique column:" + columnName);
      }
      Column column =
          new Column(
              table,
              sqlType,
              sqlTypeName,
              columnName,
              size,
              decimalDigits,
              isPk,
              isNullable,
              isIndexed,
              isUnique,
              columnDefaultValue,
              remarks);
      BeanHelper.copyProperties(
          column, TableOverrideValuesProvider.getColumnOverrideValues(table, column));
      columns.add(column);
    }
    columnRs.close();
    return columns;
  }