public void testResultSets() throws Exception {
  DatabaseMetaData dbmd=con.getMetaData();
  ResultSet rs;
  rs=dbmd.getAttributes(null,null,null,null);
  assertTrue(checkColumnNames(rs,new String[]{"TYPE_CAT","TYPE_SCHEM","TYPE_NAME","ATTR_NAME","DATA_TYPE","ATTR_TYPE_NAME","ATTR_SIZE","DECIMAL_DIGITS","NUM_PREC_RADIX","NULLABLE","REMARKS","ATTR_DEF","SQL_DATA_TYPE","SQL_DATETIME_SUB","CHAR_OCTET_LENGTH","ORDINAL_POSITION","IS_NULLABLE","SCOPE_CATALOG","SCOPE_SCHEMA","SCOPE_TABLE","SOURCE_DATA_TYPE"}));
  assertFalse(rs.next());
  rs.close();
  rs=dbmd.getSuperTables(null,null,"%");
  assertTrue(checkColumnNames(rs,new String[]{"TABLE_CAT","TABLE_SCHEM","TABLE_NAME","SUPERTABLE_NAME"}));
  assertFalse(rs.next());
  rs.close();
  rs=dbmd.getSuperTypes(null,null,"%");
  assertTrue(checkColumnNames(rs,new String[]{"TYPE_CAT","TYPE_SCHEM","TYPE_NAME","SUPERTYPE_CAT","SUPERTYPE_SCHEM","SUPERTYPE_NAME"}));
  assertFalse(rs.next());
  rs.close();
}

public void testResultSets ( ) throws Exception { DatabaseMetaData dbmd = con . getMetaData ( ) ; ResultSet rs ; rs = dbmd . getAttributes ( null , null , null , null ) ; assertTrue ( checkColumnNames ( rs , new String [ ] { "TYPE_CAT" , "TYPE_SCHEM" , "TYPE_NAME" , "ATTR_NAME" , "DATA_TYPE" , "ATTR_TYPE_NAME" , "ATTR_SIZE" , "DECIMAL_DIGITS" , "NUM_PREC_RADIX" , "NULLABLE" , "REMARKS" , "ATTR_DEF" , "SQL_DATA_TYPE" , "SQL_DATETIME_SUB" , "CHAR_OCTET_LENGTH" , "ORDINAL_POSITION" , "IS_NULLABLE" , "SCOPE_CATALOG" , "SCOPE_SCHEMA" , "SCOPE_TABLE" , "SOURCE_DATA_TYPE" } ) ) ; assertFalse ( rs . next ( ) ) ; rs . close ( ) ; rs = dbmd . getSuperTables ( null , null , "%" ) ; assertTrue ( checkColumnNames ( rs , new String [ ] { "TABLE_CAT" , "TABLE_SCHEM" , "TABLE_NAME" , "SUPERTABLE_NAME" } ) ) ; assertFalse ( rs . next ( ) ) ; rs . close ( ) ; rs = dbmd . getSuperTypes ( null , null , "%" ) ; assertTrue ( checkColumnNames ( rs , new String [ ] { "TYPE_CAT" , "TYPE_SCHEM" , "TYPE_NAME" , "SUPERTYPE_CAT" , "SUPERTYPE_SCHEM" , "SUPERTYPE_NAME" } ) ) ; assertFalse ( rs . next ( ) ) ; rs . close ( ) ; }
test meta data functions that return result sets .
