You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/03/09 18:37:04 UTC

[GitHub] [netbeans] matthiasblaesing commented on a change in pull request #2010: [NETBEANS-1603] MySQL Procedures in DB Explorer

matthiasblaesing commented on a change in pull request #2010: [NETBEANS-1603] MySQL Procedures in DB Explorer
URL: https://github.com/apache/netbeans/pull/2010#discussion_r389874971
 
 

 ##########
 File path: ide/db/src/org/netbeans/modules/db/explorer/node/ProcedureNode.java
 ##########
 @@ -429,40 +435,42 @@ public String getParams() {
             String escapedName = "";
             String query = "";
             try {
+                boolean function = false;
                 switch (getType()) {
                     case Function:
+                        function = true;
                     case Procedure:
                         escapedName = getName().replace("'", "''");
-                        query = "SELECT param_list FROM mysql.proc WHERE name = '" // NOI18N
-                                + escapedName + "';"; // NOI18N
-                        try (Statement stat = connection.getJDBCConnection().createStatement();
-                                ResultSet rs = stat.executeQuery(query);) {
+                        query = "SELECT GROUP_CONCAT(CONCAT(" + (function ? "" : "parameter_mode,' ',") + "parameter_name,' ',dtd_identifier)) AS routine_params" // NOI18N
+                              + " FROM information_schema.parameters" // NOI18N
+                              + " WHERE ordinal_position>0 AND specific_name='" + escapedName + "';"; // NOI18N
 
 Review comment:
   This needs an order by.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists