strongduanmu commented on code in PR #20616:
URL: https://github.com/apache/shardingsphere/pull/20616#discussion_r963213382
##########
shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/dialect/PostgreSQLSchemaMetaDataLoader.java:
##########
@@ -107,6 +116,29 @@ private Collection<ViewMetaData> loadViewMetaData(final
DataSource dataSource, f
return result;
}
+ private Map<String, Multimap<String, ConstraintMetaData>>
loadConstraintMetaDataMap(final DataSource dataSource,
+
final Collection<String> schemaNames) throws SQLException {
+ Map<String, Multimap<String, ConstraintMetaData>> result = new
LinkedHashMap<>();
+ try (Connection connection = dataSource.getConnection();
PreparedStatement preparedStatement =
connection.prepareStatement(getConstraintKeyMetaDataSQL(schemaNames))) {
+ try (ResultSet resultSet = preparedStatement.executeQuery()) {
+ while (resultSet.next()) {
+ String schemaName = resultSet.getString("table_schema");
+ Multimap<String, ConstraintMetaData> constraintMetaData =
result.computeIfAbsent(schemaName, key -> LinkedHashMultimap.create());
+
Review Comment:
Please remove useless blank line.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]