@Internal public class PostgresCatalog extends AbstractJdbcCatalog
baseUrl, defaultUrl, pwd, username
Modifier | Constructor and Description |
---|---|
protected |
PostgresCatalog(String catalogName,
String defaultDatabase,
String username,
String pwd,
String baseUrl) |
Modifier and Type | Method and Description |
---|---|
CatalogDatabase |
getDatabase(String databaseName)
Get a database from this catalog.
|
CatalogBaseTable |
getTable(ObjectPath tablePath)
Get a CatalogTable or CatalogView identified by tablePath.
|
List<String> |
listDatabases()
Get the names of all databases in this catalog.
|
List<String> |
listTables(String databaseName)
Get names of all tables and views under this database.
|
boolean |
tableExists(ObjectPath tablePath)
Check if a table or view exists in this catalog.
|
alterDatabase, alterFunction, alterPartition, alterPartitionColumnStatistics, alterPartitionStatistics, alterTable, alterTableColumnStatistics, alterTableStatistics, close, createDatabase, createFunction, createPartition, createTable, databaseExists, dropDatabase, dropFunction, dropPartition, dropTable, functionExists, getBaseUrl, getFactory, getFunction, getPartition, getPartitionColumnStatistics, getPartitionStatistics, getPassword, getPrimaryKey, getTableColumnStatistics, getTableStatistics, getUsername, listFunctions, listPartitions, listPartitions, listPartitionsByFilter, listViews, open, partitionExists, renameTable
getDefaultDatabase, getName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dropDatabase, getFunctionDefinitionFactory, getTableFactory
public static final String DEFAULT_DATABASE
public static final String PG_SERIAL
public static final String PG_BIGSERIAL
public static final String PG_BYTEA
public static final String PG_BYTEA_ARRAY
public static final String PG_SMALLINT
public static final String PG_SMALLINT_ARRAY
public static final String PG_INTEGER
public static final String PG_INTEGER_ARRAY
public static final String PG_BIGINT
public static final String PG_BIGINT_ARRAY
public static final String PG_REAL
public static final String PG_REAL_ARRAY
public static final String PG_DOUBLE_PRECISION
public static final String PG_DOUBLE_PRECISION_ARRAY
public static final String PG_NUMERIC
public static final String PG_NUMERIC_ARRAY
public static final String PG_BOOLEAN
public static final String PG_BOOLEAN_ARRAY
public static final String PG_TIMESTAMP
public static final String PG_TIMESTAMP_ARRAY
public static final String PG_TIMESTAMPTZ
public static final String PG_TIMESTAMPTZ_ARRAY
public static final String PG_DATE
public static final String PG_DATE_ARRAY
public static final String PG_TIME
public static final String PG_TIME_ARRAY
public static final String PG_TEXT
public static final String PG_TEXT_ARRAY
public static final String PG_CHAR
public static final String PG_CHAR_ARRAY
public static final String PG_CHARACTER
public static final String PG_CHARACTER_ARRAY
public static final String PG_CHARACTER_VARYING
public static final String PG_CHARACTER_VARYING_ARRAY
public List<String> listDatabases() throws CatalogException
Catalog
CatalogException
- in case of any runtime exceptionpublic CatalogDatabase getDatabase(String databaseName) throws DatabaseNotExistException, CatalogException
Catalog
databaseName
- Name of the databaseDatabaseNotExistException
- if the database does not existCatalogException
- in case of any runtime exceptionpublic List<String> listTables(String databaseName) throws DatabaseNotExistException, CatalogException
Catalog
DatabaseNotExistException
- if the database does not existCatalogException
- in case of any runtime exceptionpublic CatalogBaseTable getTable(ObjectPath tablePath) throws TableNotExistException, CatalogException
Catalog
tablePath
- Path of the table or viewTableNotExistException
- if the target does not existCatalogException
- in case of any runtime exceptionpublic boolean tableExists(ObjectPath tablePath) throws CatalogException
Catalog
tablePath
- Path of the table or viewCatalogException
- in case of any runtime exceptionCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.