Skip to content

Commit

Permalink
fix: Update code
Browse files Browse the repository at this point in the history
  • Loading branch information
larshelge committed Nov 24, 2024
1 parent ec6c906 commit 7db77c5
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ private List<AnalyticsTableColumn> getColumnsFromOrgUnitTrackedEntityAttribute(
}

/**
* Creates a select statement for data element insertion.
* Creates a select statement for the given select expression.
*
* @param dataElement the data element to create the select statement for.
* @param selectExpression the select expression.
Expand Down Expand Up @@ -687,8 +687,16 @@ private String getSelectForInsert(
return replaceQualify(sqlTemplate, variables);
}

/**
* Returns a list of columns.
*
* @param dataElement the {@link DataElement}.
* @param selectExpression the select expression.
* @param dataFilterClause the data filter clause.
* @return a list of {@link AnayticsTableColumn}.
*/
private List<AnalyticsTableColumn> getColumnFromDataElementWithLegendSet(
DataElement dataElement, String select, String dataClause) {
DataElement dataElement, String selectExpression, String dataFilterClause) {
String query =
"""
(select l.uid from ${maplegend} l
Expand All @@ -705,9 +713,9 @@ private List<AnalyticsTableColumn> getColumnFromDataElementWithLegendSet(
replaceQualify(
query,
Map.of(
"select", select,
"select", selectExpression,
"legendSetId", String.valueOf(ls.getId()),
"dataClause", dataClause,
"dataClause", dataFilterClause,
"column", column));

return AnalyticsTableColumn.builder()
Expand Down

0 comments on commit 7db77c5

Please sign in to comment.