ruanwenjun commented on code in PR #18073:
URL: 
https://github.com/apache/dolphinscheduler/pull/18073#discussion_r2963575741


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/DataSourceServiceImpl.java:
##########
@@ -417,9 +418,72 @@ public List<DataSource> authedDatasource(User loginUser, 
Integer userId) {
     }
 
     @Override
-    public List<ParamsOptions> getTables(Integer datasourceId, String 
database) {
+    public List<ParamsOptions> getDatabases(User loginUser, Integer 
datasourceId) {

Review Comment:
   Why change the method order, all you need is add a permission check.



##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/DataSourceService.java:
##########
@@ -131,26 +133,36 @@ public interface DataSourceService {
     List<DataSource> authedDatasource(User loginUser, Integer userId);
 
     /**
-     * get tables
-     * @param datasourceId
-     * @param database
-     * @return
+     * Retrieves the list of databases (or schemas) available in a specific 
data source.
+     *
+     * @param loginUser    current logged-in user
+     * @param datasourceId ID of the data source
+     * @return list of {@link ParamsOptions} representing database/schema names
+     * @throws ServiceException if permission denied, resource not found, or 
connection fails
      */
-    List<ParamsOptions> getTables(Integer datasourceId, String database);
+    List<ParamsOptions> getDatabases(User loginUser, Integer datasourceId);

Review Comment:
   Don't change the method order. This will increase the review work.



-- 
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]

Reply via email to