Class PostgresCatalog
- java.lang.Object
-
- org.apache.flink.table.catalog.AbstractCatalog
-
- org.apache.flink.connector.jdbc.catalog.AbstractJdbcCatalog
-
- org.apache.flink.connector.jdbc.databases.postgres.catalog.PostgresCatalog
-
- All Implemented Interfaces:
org.apache.flink.table.catalog.Catalog
@Internal public class PostgresCatalog extends AbstractJdbcCatalog
Catalog for PostgreSQL.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_DATABASE-
Fields inherited from class org.apache.flink.connector.jdbc.catalog.AbstractJdbcCatalog
baseUrl, defaultUrl, pwd, userClassLoader, username
-
-
Constructor Summary
Constructors Constructor Description PostgresCatalog(ClassLoader userClassLoader, String catalogName, String defaultDatabase, String username, String pwd, String baseUrl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.flink.table.types.DataTypefromJDBCType(org.apache.flink.table.catalog.ObjectPath tablePath, ResultSetMetaData metadata, int colIndex)Converts Postgres type to FlinkDataType.protected StringgetSchemaName(org.apache.flink.table.catalog.ObjectPath tablePath)protected StringgetSchemaTableName(org.apache.flink.table.catalog.ObjectPath tablePath)protected StringgetTableName(org.apache.flink.table.catalog.ObjectPath tablePath)List<String>listDatabases()List<String>listTables(String databaseName)booleantableExists(org.apache.flink.table.catalog.ObjectPath tablePath)-
Methods inherited from class org.apache.flink.connector.jdbc.catalog.AbstractJdbcCatalog
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
-
Methods inherited from class org.apache.flink.table.catalog.AbstractCatalog
getDefaultDatabase, getName
-
-
-
-
Field Detail
-
DEFAULT_DATABASE
public static final String DEFAULT_DATABASE
- See Also:
- Constant Field Values
-
-
Method Detail
-
listDatabases
public List<String> listDatabases() throws org.apache.flink.table.catalog.exceptions.CatalogException
- Throws:
org.apache.flink.table.catalog.exceptions.CatalogException
-
listTables
public List<String> listTables(String databaseName) throws org.apache.flink.table.catalog.exceptions.DatabaseNotExistException, org.apache.flink.table.catalog.exceptions.CatalogException
- Throws:
org.apache.flink.table.catalog.exceptions.DatabaseNotExistExceptionorg.apache.flink.table.catalog.exceptions.CatalogException
-
fromJDBCType
protected org.apache.flink.table.types.DataType fromJDBCType(org.apache.flink.table.catalog.ObjectPath tablePath, ResultSetMetaData metadata, int colIndex) throws SQLExceptionConverts Postgres type to FlinkDataType.- Overrides:
fromJDBCTypein classAbstractJdbcCatalog- Throws:
SQLException- See Also:
TypeInfoCache
-
tableExists
public boolean tableExists(org.apache.flink.table.catalog.ObjectPath tablePath) throws org.apache.flink.table.catalog.exceptions.CatalogException- Throws:
org.apache.flink.table.catalog.exceptions.CatalogException
-
getTableName
protected String getTableName(org.apache.flink.table.catalog.ObjectPath tablePath)
- Overrides:
getTableNamein classAbstractJdbcCatalog
-
getSchemaName
protected String getSchemaName(org.apache.flink.table.catalog.ObjectPath tablePath)
- Overrides:
getSchemaNamein classAbstractJdbcCatalog
-
getSchemaTableName
protected String getSchemaTableName(org.apache.flink.table.catalog.ObjectPath tablePath)
- Overrides:
getSchemaTableNamein classAbstractJdbcCatalog
-
-