-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: storedby and last updated in enrollment analytics [DHIS2-11775] #8909
feat: storedby and last updated in enrollment analytics [DHIS2-11775] #8909
Conversation
Kudos, SonarCloud Quality Gate passed! |
Set<AnalyticsPeriodBoundary> boundaries = map.get( programStage ); | ||
|
||
String eventTableName = "analytics_event_" + programIndicator.getProgram().getUid(); | ||
sql += " (select count(*) from " + eventTableName + " where " + eventTableName + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
waht do you think about replacement of '... ( select count(*)..) > 0' with 'exists(select 1 from ... limit 1)'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense and should improve performances. So generally speaking I agree with that.
However this code was just moved from somewhere else and is not meant to be modified within this ticket scope.
I'd suggest to create a specific task for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, agree, can you please create a ticket for this and assign it to me? Please in comment let me know where is this code coming from. I would like to change it as well. Thank you :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general 👍 I would just add some Javadocs on the main classes and methods.
Refactored the time condition rendering a bit to accommodate enrollments.