当前位置: 首页>>代码示例>>Java>>正文


Java DatabaseMetaData.getSuperTypes方法代码示例

本文整理汇总了Java中java.sql.DatabaseMetaData.getSuperTypes方法的典型用法代码示例。如果您正苦于以下问题:Java DatabaseMetaData.getSuperTypes方法的具体用法?Java DatabaseMetaData.getSuperTypes怎么用?Java DatabaseMetaData.getSuperTypes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.sql.DatabaseMetaData的用法示例。


在下文中一共展示了DatabaseMetaData.getSuperTypes方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testBug44508

import java.sql.DatabaseMetaData; //导入方法依赖的package包/类
public void testBug44508() throws Exception {
    DatabaseMetaData dbmd = this.conn.getMetaData();

    this.rs = dbmd.getSuperTypes("", "", "");
    ResultSetMetaData rsmd = this.rs.getMetaData();

    assertEquals("TYPE_CAT", rsmd.getColumnName(1)); // Gives TABLE_CAT
    assertEquals("TYPE_SCHEM", rsmd.getColumnName(2)); // Gives TABLE_SCHEM
}
 
开发者ID:bragex,项目名称:the-vigilantes,代码行数:10,代码来源:MetaDataRegressionTest.java

示例2: testGetSuperTypes

import java.sql.DatabaseMetaData; //导入方法依赖的package包/类
@Test public void testGetSuperTypes() throws SQLException {
  DatabaseMetaData metadata = getDatabaseMetadata();
  try (ResultSet rs = metadata.getSuperTypes(null, null, null)) {
    ResultSetMetaData rsMeta = rs.getMetaData();

    assertEquals(6, rsMeta.getColumnCount());
    assertColumn(rsMeta, 1, "TYPE_CAT", Types.VARCHAR, DatabaseMetaData.columnNullable);
    assertColumn(rsMeta, 2, "TYPE_SCHEM", Types.VARCHAR, DatabaseMetaData.columnNullable);
    assertColumn(rsMeta, 3, "TYPE_NAME", Types.VARCHAR, DatabaseMetaData.columnNoNulls);
    assertColumn(rsMeta, 4, "SUPERTYPE_CAT", Types.VARCHAR, DatabaseMetaData.columnNullable);
    assertColumn(rsMeta, 5, "SUPERTYPE_SCHEM", Types.VARCHAR, DatabaseMetaData.columnNullable);
    assertColumn(rsMeta, 6, "SUPERTYPE_NAME", Types.VARCHAR, DatabaseMetaData.columnNoNulls);
  }
}
 
开发者ID:apache,项目名称:calcite-avatica,代码行数:15,代码来源:MetaResultSetTest.java

示例3: runOtherMetaDataTests

import java.sql.DatabaseMetaData; //导入方法依赖的package包/类
private void runOtherMetaDataTests() throws SQLException
{
	DatabaseMetaData metadata = connection.getMetaData();
	try (ResultSet rs = metadata.getCatalogs())
	{
	}
	try (ResultSet rs = metadata.getAttributes("", "", null, null))
	{
	}
	try (ResultSet rs = metadata.getClientInfoProperties())
	{
	}
	try (ResultSet rs = metadata.getFunctionColumns("", "", null, null))
	{
	}
	try (ResultSet rs = metadata.getFunctions("", "", null))
	{
	}
	try (ResultSet rs = metadata.getProcedureColumns("", "", null, null))
	{
	}
	try (ResultSet rs = metadata.getProcedures("", "", null))
	{
	}
	try (ResultSet rs = metadata.getSchemas())
	{
	}
	try (ResultSet rs = metadata.getSchemas("", null))
	{
	}
	try (ResultSet rs = metadata.getSuperTypes("", "", null))
	{
	}
	try (ResultSet rs = metadata.getTableTypes())
	{
	}
	try (ResultSet rs = metadata.getTypeInfo())
	{
	}
	try (ResultSet rs = metadata.getUDTs(null, null, null, null))
	{
	}
	for (String table : TABLES)
	{
		try (ResultSet rs = metadata.getExportedKeys("", "", table))
		{
		}
		try (ResultSet rs = metadata.getImportedKeys("", "", table))
		{
		}
		try (ResultSet rs = metadata.getBestRowIdentifier("", "", table, DatabaseMetaData.bestRowTransaction,
				false))
		{
		}
		try (ResultSet rs = metadata.getColumnPrivileges("", "", table, null))
		{
		}
		try (ResultSet rs = metadata.getPrimaryKeys("", "", table))
		{
		}
		try (ResultSet rs = metadata.getPseudoColumns("", "", table, null))
		{
		}
		try (ResultSet rs = metadata.getSuperTables("", "", table))
		{
		}
		try (ResultSet rs = metadata.getTablePrivileges("", "", table))
		{
		}
		try (ResultSet rs = metadata.getVersionColumns("", "", table))
		{
		}
	}
}
 
开发者ID:olavloite,项目名称:spanner-jdbc,代码行数:75,代码来源:MetaDataTester.java


注:本文中的java.sql.DatabaseMetaData.getSuperTypes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。