fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [fineract] thesmallstar commented on a change in pull request #730: Added: SQL builder toString function
Date Tue, 10 Mar 2020 16:15:12 GMT
thesmallstar commented on a change in pull request #730: Added: SQL builder toString function
URL: https://github.com/apache/fineract/pull/730#discussion_r390436199
 
 

 ##########
 File path: fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/utils/SQLBuilder.java
 ##########
 @@ -118,9 +121,40 @@ public String getSQLTemplate() {
     /*
      * Returns a String representation suitable for debugging and log output.
      * This is ONLY intended for debugging in logs, and NEVER for passing to a JDBC database.
+     */
     @Override
     public String toString() {
-        return "SQLBuilder{..."; // TODO implement this...
+       StringBuilder whereClause  = new StringBuilder("SQLBuilder{");
+       for (int i=0;i<args.size();i++)
+        {
+            if (i!=0)
+            {
+                whereClause.append("  AND  ");
+            }
+            else
+            {
+                whereClause.append("WHERE  ");
+            }
+            Object currentArg = args.get(i);
+            String currentCri = crts.get(i);
+            StringBuilder modifiedArg  = new StringBuilder("[");
 
 Review comment:
   Yes, on it. 

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

Mime
View raw message