code: public Collection<String> listColumns(String table) throws SQLException {
  	Collection<String> result = new ArrayList<String>();
  	DatabaseMetaData dbm = connection.getMetaData();
  	ResultSet rs = dbm.getColumns(null, null, table, null);
  	while (rs.next()) {
  	    result.add(rs.getString("COLUMN_NAME"));
  	}
  	return result;
      }
docs: Get a list of all of the columns on a table.
  
  @param table
  The table to check.
  @return A list of all of the columns.
  @throws DatabaseException
  If a database error occurs.