Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion MDX2JSON/Utils.cls
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -782,3 +800,4 @@ ClassMethod UpdateWidget(widgetToUpdate As %DeepSee.Dashboard.Widget, data As %Z
}

}

Loading