Skip to content

Commit 8ae5f4e

Browse files
authored
REFACTOR: rework drillthrough processing
Replaced deprecated class %ZEN.Auxilary with custom processing script. Fix <STRINGSTACK> error when SQL contain more that 13500 rows
1 parent e2e895a commit 8ae5f4e

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

MDX2JSON/Utils.cls

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,25 @@ ClassMethod WriteDrillthroughJSON(pMDX As %String) As %Status
258258
return:$$$ISERR(st) st
259259

260260
set SQL = RS.%GetListingSQL()
261-
do ##class(%ZEN.Auxiliary.altJSONSQLProvider).%WriteJSONFromSQL(,SQL,,$$$MaxCacheInt)
261+
262+
set rs = ##class(%SQL.Statement).%ExecDirect(, SQL)
263+
set list = []
264+
265+
while rs.%Next() {
266+
set row = {}
267+
for i=1:1:rs.%ResultColumnCount {
268+
set colName = rs.%GetMetadata().columns.GetAt(i).colName
269+
set colValue = rs.%GetData(i)
270+
do row.%Set(colName, colValue)
271+
}
272+
do list.%Push(row)
273+
}
274+
275+
set result = {
276+
"children": (list)
277+
}
278+
279+
do result.%ToJSON(.stream)
262280

263281
return $$$OK
264282
}
@@ -782,3 +800,4 @@ ClassMethod UpdateWidget(widgetToUpdate As %DeepSee.Dashboard.Widget, data As %Z
782800
}
783801

784802
}
803+

0 commit comments

Comments
 (0)