@Internal public class PostgresCatalog extends AbstractJdbcCatalog
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_DATABASE |
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 |
---|---|
protected DataType |
fromJDBCType(ObjectPath tablePath,
ResultSetMetaData metadata,
int colIndex)
Converts Postgres type to Flink
DataType . |
protected String |
getSchemaName(ObjectPath tablePath) |
protected String |
getSchemaTableName(ObjectPath tablePath) |
protected String |
getTableName(ObjectPath 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, extractColumnValuesBySQL, functionExists, getBaseUrl, getDatabase, getFactory, getFunction, getPartition, getPartitionColumnStatistics, getPartitionStatistics, getPassword, getPrimaryKey, getTable, 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, supportsManagedTable
public static final String DEFAULT_DATABASE
public List<String> listDatabases() throws CatalogException
Catalog
CatalogException
- 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 exceptionprotected DataType fromJDBCType(ObjectPath tablePath, ResultSetMetaData metadata, int colIndex) throws SQLException
DataType
.fromJDBCType
in class AbstractJdbcCatalog
SQLException
TypeInfoCache
public boolean tableExists(ObjectPath tablePath) throws CatalogException
Catalog
tablePath
- Path of the table or viewCatalogException
- in case of any runtime exceptionprotected String getTableName(ObjectPath tablePath)
getTableName
in class AbstractJdbcCatalog
protected String getSchemaName(ObjectPath tablePath)
getSchemaName
in class AbstractJdbcCatalog
protected String getSchemaTableName(ObjectPath tablePath)
getSchemaTableName
in class AbstractJdbcCatalog
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.