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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to