@@ -92,7 +92,7 @@ ClassMethod WriteJSONfromQuery(CubeKey As %String, QueryKey As %String, Timeout
9292
9393/// Execute SQL query taken from KPI and extract column values by name of column
9494/// Output array with list of values like so pValue(n) = $LB(sNameList(i)...)
95- ClassMethod getSQLValues (pSQL , Output pValues As %String ) As %Status
95+ ClassMethod GetSQLValues (pSQL , Output pValues As %String , Output tResultSet As %SQL . Statement ) As %Status
9696{
9797
9898 set st = $$$OK
@@ -128,12 +128,11 @@ ClassMethod WriteDrillthroughJSONKPI(tKPI As %String, pFilters As %String, pSele
128128
129129 if (kpitype =" sql" ) {
130130 set pSQL = $classmethod (tKpiClassName ," %OnGetListingSQL" ,pFilters ,pSelection ) // invoke corresponding method from given kpi and get sql query
131- Set stmt = ##class (%SQL.Statement ).%ExecDirect (,pSQL )
132- set values = ..getSQLValues (pSQL , .pValue )
131+ set values = ..GetSQLValues (pSQL , .pValue , .tResultSet )
133132
134- for i =1 :1 :stmt .%GetMetadata ().columnCount
133+ for i =1 :1 :tResultSet .%GetMetadata ().columnCount
135134 {
136- set pList (i ) = stmt .%GetMetadata ().columns .GetAt (i ).label
135+ set pList (i ) = tResultSet .%GetMetadata ().columns .GetAt (i ).label
137136 set pList (i , " columnNo" ) = i
138137 Set tKpiPropIdx = $O (pList (" " ),1 ,tProperty )
139138 Set tKpiPropList = " "
0 commit comments