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:
[email protected]
With regards,
Apache Git Services