adamsaghy commented on code in PR #2402:
URL: https://github.com/apache/fineract/pull/2402#discussion_r912808115
##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseSpecificSQLGenerator.java:
##########
@@ -168,4 +168,14 @@ public String currentSchema() {
throw new IllegalStateException("Database type is not supported
for current schema " + databaseTypeResolver.databaseType());
}
}
+
+ public String getBoolean(boolean condition) {
+ if (databaseTypeResolver.isMySQL()) {
Review Comment:
Well...the truth lies between.
select * from stretchy_report where self_service_user_report = '0'; -> Valid
select * from stretchy_report where self_service_user_report = '1'; -> Valid
select * from stretchy_report where self_service_user_report = 0; -> Valid
select * from stretchy_report where self_service_user_report = 1; -> Valid
select * from stretchy_report where self_service_user_report = false; ->
Valid
select * from stretchy_report where self_service_user_report = true; -> Valid
select * from stretchy_report where self_service_user_report = 'false'; ->
Valid, but by sheer luck (no error, but evaluate as false)
select * from stretchy_report where self_service_user_report = 'true'; ->
Invalid, no error and evaluate it as false
Unfortunately, the stretchy report SQLs are using sometimes as a string this
value.
--
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]