Skip to content

Commit 92418f8

Browse files
authored
Merge pull request #86 from teccod/master
Filters for KPI
2 parents 77d79a2 + 3386b81 commit 92418f8

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

MDX2JSON/AbstractREST.cls

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ ClassMethod ConvertRequestBody() As %Status
6565
return:$$$ISERR(st) st
6666
return:'$IsObject(obj) $$$ERROR($$$ArgumentIsNotAnObject,"Body")
6767

68+
// if this is a KPI request content
69+
if ($FIND(obj.KPI, ".kpi") = ($LENGTH(obj.KPI) + 1)) {
70+
// Prepare DynamicObject instead of proxyObject
71+
// Without this we got error later "ERROR #5002: ObjectScript error: <METHOD DOES NOT EXIST>zWriteJSONfromKPI+8^MDX2JSON.REST.1 *%Size,%Library.ListOfObjects
72+
// while applying filters to KPI
73+
set obj = {}.%FromJSON(content)
74+
}
75+
6876
set %request.Content = obj // obj here is a valid UTF8 proxyObject with required property
6977
return $$$OK
7078
}

MDX2JSON/REST.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ ClassMethod Test() As %Status
114114
set obj.Status = "OK"
115115
set obj.Embed = $g(^MDX2JSON.Embed, $g(^%MDX2JSON.Embed, ""))
116116
set obj.User = $Username
117-
set obj.Version = "2.3.5"
117+
set obj.Version = "3.2.5"
118118
set obj.Parent = ##class(MDX2JSON.Tests).#LastCommit
119119
set obj.ParentTS = ##class(MDX2JSON.Tests).#LastCommitTS
120120
set obj.DefaultApp = $System.CSP.GetDefaultApp($Namespace)

module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Export generator="Cache" version="25">
33
<Document name="MDX2JSON.ZPM"><Module>
44
<Name>MDX2JSON</Name>
5-
<Version>3.2.4</Version>
5+
<Version>3.2.5</Version>
66
<Description>RESTful web api for MDX to JSON transformation (plus JSONP and XML/A) for InterSystems IRIS. Also provides information about DeepSee objects.</Description>
77
<Packaging>module</Packaging>
88
<SourcesRoot>./</SourcesRoot>

0 commit comments

Comments
 (0)