SchemaProviderpublic class DefaultSchemaProvider extends Object implements SchemaProvider
| Constructor | Description |
|---|---|
DefaultSchemaProvider(Connection conn) |
| Modifier and Type | Method | Description |
|---|---|---|
List<QualifiedName> |
findTables(String dbName,
String tableNamePattern) |
Find all tables matching the specified pattern.
|
List<QualifiedName> |
findTables(String dbName,
String tableNamePattern,
boolean all) |
|
String |
getDbName(String dbName,
String tableName) |
Find the database containing this table.
|
List<String> |
getDbNames(String dbName) |
PRAGMA database_list
|
String |
getSchema(String dbName,
String tableName) |
public DefaultSchemaProvider(Connection conn)
public List<QualifiedName> findTables(String dbName, String tableNamePattern) throws SQLException
SchemaProviderfindTables in interface SchemaProviderdbName - May be null to search in all databases, empty to search in "temp" and "main".tableNamePattern - LIKE pattern. May be null to retrieve all tables.SQLExceptionpublic List<QualifiedName> findTables(String dbName, String tableNamePattern, boolean all) throws SQLException
SQLExceptionpublic String getDbName(String dbName, String tableName) throws SQLException
SchemaProvidergetDbName in interface SchemaProviderdbName - May be null to search in all databases, empty to search in "temp" and "main".tableName - Table name"temp" or "main" or attached database name.
If there is no table matching tableName, the returned value is undefined.SQLExceptionpublic List<String> getDbNames(String dbName) throws SQLException
SchemaProvidergetDbNames in interface SchemaProviderdbName - May be null to search in all databases, empty to search in "temp" and "main".SQLExceptionpublic String getSchema(String dbName, String tableName) throws SQLException
getSchema in interface SchemaProviderdbName - null means "main".tableName - Table nameSQLExceptionCopyright © 2018. All rights reserved.