From 8ae5f4e1921ce8133bd54f7aeee1c954d599656f Mon Sep 17 00:00:00 2001 From: Dmitrij Vladimirov <47441164+Frisle@users.noreply.github.com> Date: Fri, 13 Feb 2026 11:00:06 +0500 Subject: [PATCH] REFACTOR: rework drillthrough processing Replaced deprecated class %ZEN.Auxilary with custom processing script. Fix error when SQL contain more that 13500 rows --- MDX2JSON/Utils.cls | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/MDX2JSON/Utils.cls b/MDX2JSON/Utils.cls index 88201d1..835322d 100644 --- a/MDX2JSON/Utils.cls +++ b/MDX2JSON/Utils.cls @@ -258,7 +258,25 @@ ClassMethod WriteDrillthroughJSON(pMDX As %String) As %Status return:$$$ISERR(st) st set SQL = RS.%GetListingSQL() - do ##class(%ZEN.Auxiliary.altJSONSQLProvider).%WriteJSONFromSQL(,SQL,,$$$MaxCacheInt) + + set rs = ##class(%SQL.Statement).%ExecDirect(, SQL) + set list = [] + + while rs.%Next() { + set row = {} + for i=1:1:rs.%ResultColumnCount { + set colName = rs.%GetMetadata().columns.GetAt(i).colName + set colValue = rs.%GetData(i) + do row.%Set(colName, colValue) + } + do list.%Push(row) + } + + set result = { + "children": (list) + } + + do result.%ToJSON(.stream) return $$$OK } @@ -782,3 +800,4 @@ ClassMethod UpdateWidget(widgetToUpdate As %DeepSee.Dashboard.Widget, data As %Z } } +