Move helper method to more reasonable place
@@ -135,6 +135,14 @@ public class MongoMetadata
return columns.build();
}
+ private List<SchemaTableName> listTables(ConnectorSession session, SchemaTablePrefix prefix)
+ {
+ if (prefix.getTableName() == null) {
+ return listTables(session, prefix.getSchemaName());
+ }
+ return ImmutableList.of(new SchemaTableName(prefix.getSchemaName(), prefix.getTableName()));
+ }
+
@Override
public ColumnMetadata getColumnMetadata(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle columnHandle)
{
@@ -285,14 +293,6 @@ public class MongoMetadata
return ImmutableList.of(schemaNameOrNull);
}
- private List<SchemaTableName> listTables(ConnectorSession session, SchemaTablePrefix prefix)
- {
- if (prefix.getTableName() == null) {
- return listTables(session, prefix.getSchemaName());
- }
- return ImmutableList.of(new SchemaTableName(prefix.getSchemaName(), prefix.getTableName()));
- }
-
private static List<MongoColumnHandle> buildColumnHandles(ConnectorTableMetadata tableMetadata)
{
return tableMetadata.getColumns().stream()
