Class PostgresMetadataAccessor
- java.lang.Object
-
- org.apache.flink.cdc.connectors.postgres.source.PostgresMetadataAccessor
-
- All Implemented Interfaces:
MetadataAccessor
@Internal public class PostgresMetadataAccessor extends Object implements MetadataAccessor
-
-
Constructor Summary
Constructors Constructor Description PostgresMetadataAccessor(PostgresSourceConfig sourceConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SchemagetTableSchema(TableId tableId)Get theSchemaof the given table.List<String>listNamespaces()Always throwUnsupportedOperationExceptionbecause postgres does not support namespace.List<String>listSchemas(String namespace)List all database from postgres.List<TableId>listTables(String namespace, String dbName)List tables from postgres.
-
-
-
Constructor Detail
-
PostgresMetadataAccessor
public PostgresMetadataAccessor(PostgresSourceConfig sourceConfig)
-
-
Method Detail
-
listNamespaces
public List<String> listNamespaces()
Always throwUnsupportedOperationExceptionbecause postgres does not support namespace.- Specified by:
listNamespacesin interfaceMetadataAccessor- Returns:
- The list of namespaces
-
listSchemas
public List<String> listSchemas(@Nullable String namespace)
List all database from postgres.- Specified by:
listSchemasin interfaceMetadataAccessor- Parameters:
namespace- This parameter is ignored because postgres does not support namespace.- Returns:
- The list of database
-
listTables
public List<TableId> listTables(@Nullable String namespace, @Nullable String dbName)
List tables from postgres.- Specified by:
listTablesin interfaceMetadataAccessor- Parameters:
namespace- This parameter is ignored because postgres does not support namespace.dbName- The database to list tables from. If null, list tables from all databases.- Returns:
- The list of
TableIds.
-
getTableSchema
public Schema getTableSchema(TableId tableId)
Get theSchemaof the given table.- Specified by:
getTableSchemain interfaceMetadataAccessor- Parameters:
tableId- TheTableIdof the given table.- Returns:
- The
Schemaof the table.
-
-