public class SqlServerMetadataCollector extends JdbcMetadataCollector
DatabaseMetaData.getSchemas()
method instead of
the actual schemas. Unfortunately, the DatabaseMetaData.getTables(String, String, String, String[])
method actually
returns schema names, so the default JdbcMetadataCollector
implementation doesn't match up correctly. This class should
be used when the Microsoft JDBC driver is used for database connectivity. The jTDS driver has already corrected this bug and
can use the default JdbcMetadataCollector
.Constructor and Description |
---|
SqlServerMetadataCollector() |
Modifier and Type | Method and Description |
---|---|
List<String> |
getSchemaNames(Connection conn,
String catalogName)
Return the list of schema names that currently exist in the database to which
connection is connected within the
named catalog. |
getCatalogNames, getColumns, getDatabaseMetadata, getForeignKeys, getProcedures, getTables
public List<String> getSchemaNames(Connection conn, String catalogName) throws JdbcMetadataException
MetadataCollector
connection
is connected within the
named catalog. If catalogName
is null, then all schema names should be returned regardless of the catalog with
which they are associated. The schema names must be sorted in a manner that is stable between successive calls to this
method.getSchemaNames
in interface MetadataCollector
getSchemaNames
in class JdbcMetadataCollector
conn
- the connection to the database; must not be non-null and must be open. This connection should not be closed by
this method.catalogName
- the name of the catalog to which returned schemas must belong, or null if all schemas are to be returnedJdbcMetadataException
- if the schema names cannot be retrievedDatabaseMetaData.getSchemas()
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.