iris-pex-embedded-python 3.2.0b2__py3-none-any.whl → 3.2.0b4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of iris-pex-embedded-python might be problematic. Click here for more details.

iop/cls/IOP/Message.cls CHANGED
@@ -1,4 +1,4 @@
1
- Class IOP.Message Extends (Ens.MessageBody, %CSP.Page, %XML.Adaptor, Ens.VDoc.Interface)
1
+ Class IOP.Message Extends (Ens.MessageBody, %CSP.Page, Ens.VDoc.Interface)
2
2
  {
3
3
 
4
4
  Parameter DOCCLASSNAME = "JSON Document";
@@ -27,6 +27,20 @@ Property jstr As %Stream.GlobalCharacter [ Internal, Private ];
27
27
 
28
28
  Property type As %String(MAXLEN = 6) [ ReadOnly ];
29
29
 
30
+ /// Gets the next index in an array
31
+ Method GetNextIndex(
32
+ pPath As %String,
33
+ pIndex As %String,
34
+ ByRef pStatus As %Status = {$$$OK}) As %String
35
+ {
36
+ Set f=$F(pPath,"()") If 'f Set pStatus=$$$ERROR($$$EnsErrGeneral,"Can't iterate on no-array type '"_pPath_"'") Quit ""
37
+ if pIndex="" Set pIndex=0
38
+ Set tValue = ..GetValueAt($EXTRACT(pPath, 1, $LENGTH(pPath)-2))
39
+ Set builtins = ##class(%SYS.Python).Builtins()
40
+ if pIndex>=builtins.len(tValue) Quit ""
41
+ Quit pIndex+1
42
+ }
43
+
30
44
  Method GetValueAt(
31
45
  pPropertyPath As %String = "",
32
46
  pFormat As %String,
@@ -152,6 +166,12 @@ Method SetValueAt(
152
166
  Set tSC = $$$OK
153
167
  // if pAction is set, use jsonpath to set the value
154
168
  Try {
169
+ if pAction = "append" {
170
+ // trinm () from the end of the path
171
+ if $EXTRACT(pPropertyPath, *) = ")" {
172
+ Set pPropertyPath = $EXTRACT(pPropertyPath, 1, $LENGTH(pPropertyPath)-2)
173
+ }
174
+ }
155
175
  // Convert pPropertyPath to a a jsonpath
156
176
  Set tPath = ..ConvertPath(pPropertyPath)
157
177
 
@@ -159,6 +179,7 @@ Method SetValueAt(
159
179
  Set jp = ##class(%SYS.Python).Import("jsonpath_ng")
160
180
  Set builtins = ##class(%SYS.Python).Builtins()
161
181
 
182
+ // By default, if json is empty, set it to an empty object
162
183
  if ..json = "" {
163
184
  Set ..json = "{}"
164
185
  }
@@ -168,6 +189,18 @@ Method SetValueAt(
168
189
  if pAction = "set" {
169
190
  Set tJSON = parser."update_or_create"(tJSON, pValue)
170
191
  }
192
+ ElseIf pAction = "append" {
193
+ Set tFindValue = parser."find"(tJSON)
194
+ if tFindValue."__len__"() = 0 {
195
+ Set tList = builtins.list()
196
+ Do tList.append(pValue)
197
+ Set tJSON = parser."update_or_create"(tJSON,tList)
198
+ }
199
+ Else {
200
+ Do tFindValue."__getitem__"(0)."value".append(pValue)
201
+ Set tJSON = parser."update"(tJSON, tFindValue."__getitem__"(0)."value")
202
+ }
203
+ }
171
204
 
172
205
  Set tResult = pyjson.dumps(tJSON)
173
206
  Set ..json = tResult
@@ -327,7 +360,7 @@ ClassMethod GetContentArray(
327
360
  If $$$ISERR(tSC) Return tSC
328
361
  set schema = {}.%FromJSON(json)
329
362
 
330
- $$$ThrowOnError(##class(IOP.Message.Document).SchemaToContents(schema, .tContents))
363
+ $$$ThrowOnError(##class(IOP.Message).SchemaToContents(schema, .tContents))
331
364
 
332
365
  Merge @pContents = tContents
333
366
  }
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: iris_pex_embedded_python
3
- Version: 3.2.0b2
3
+ Version: 3.2.0b4
4
4
  Summary: Iris Interoperability based on Embedded Python
5
5
  Author-email: grongier <guillaume.rongier@intersystems.com>
6
6
  License: MIT License
@@ -112,7 +112,7 @@ iop/cls/IOP/BusinessService.cls,sha256=7ebn32J9PiZXUgXuh5Xxm_7X6zHBiqkJr9c_dWxbP
112
112
  iop/cls/IOP/Common.cls,sha256=4f4ZpLj8fsj8IKJDNb9pKoCokzo522JHWX0OqpAaC5g,11192
113
113
  iop/cls/IOP/Director.cls,sha256=M43LoTb6lwSr0J81RFxi1YLW1mwda09wQ7Xqr3nBtxo,2008
114
114
  iop/cls/IOP/InboundAdapter.cls,sha256=GeoCm6q5HcLJ5e4VxgqXiErJXqolBbpKwpunaNzpvjU,610
115
- iop/cls/IOP/Message.cls,sha256=er1TcG1UDKIpiStyXT0-zKHWxIrikmV6yzUTvFGYSB0,21932
115
+ iop/cls/IOP/Message.cls,sha256=uSNWzxAjwl-KgYhzWLCtdTTeN-FlE5r-TZz1JctVM3o,23200
116
116
  iop/cls/IOP/OutboundAdapter.cls,sha256=9eOwy5ojwcTzwrHs6LNrFQvUD8aqcoNCZrILN1ycdDM,958
117
117
  iop/cls/IOP/PickleMessage.cls,sha256=S3y7AClQ8mAILjxPuHdCjGosBZYzGbUQ5WTv4mYPNMQ,1673
118
118
  iop/cls/IOP/Test.cls,sha256=gAC9PEfMZsvAEWIa241-ug2FWAhITbN1SOispZzJPnI,2094
@@ -130,9 +130,9 @@ iop/cls/IOP/Service/WSGI.cls,sha256=VLNCXEwmHW9dBnE51uGE1nvGX6T4HjhqePT3LVhsjAE,
130
130
  iop/wsgi/handlers.py,sha256=NrFLo_YbAh-x_PlWhAiWkQnUUN2Ss9HoEm63dDWCBpQ,2947
131
131
  irisnative/_IRISNative.py,sha256=HQ4nBhc8t8_5OtxdMG-kx1aa-T1znf2I8obZOPLOPzg,665
132
132
  irisnative/__init__.py,sha256=6YmvBLQSURsCPKaNg7LK-xpo4ipDjrlhKuwdfdNb3Kg,341
133
- iris_pex_embedded_python-3.2.0b2.dist-info/LICENSE,sha256=rZSiBFId_sfbJ6RL0GjjPX-InNLkNS9ou7eQsikciI8,1089
134
- iris_pex_embedded_python-3.2.0b2.dist-info/METADATA,sha256=AVYTj5fGvVHmVL0KF4BZjCSGfBoDYRuiV8UK4uop59s,4427
135
- iris_pex_embedded_python-3.2.0b2.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
136
- iris_pex_embedded_python-3.2.0b2.dist-info/entry_points.txt,sha256=pj-i4LSDyiSP6xpHlVjMCbg1Pik7dC3_sdGY3Yp9Vhk,38
137
- iris_pex_embedded_python-3.2.0b2.dist-info/top_level.txt,sha256=VWDlX4YF4qFVRGrG3-Gs0kgREol02i8gIpsHNbhfFPw,42
138
- iris_pex_embedded_python-3.2.0b2.dist-info/RECORD,,
133
+ iris_pex_embedded_python-3.2.0b4.dist-info/LICENSE,sha256=rZSiBFId_sfbJ6RL0GjjPX-InNLkNS9ou7eQsikciI8,1089
134
+ iris_pex_embedded_python-3.2.0b4.dist-info/METADATA,sha256=_FV2LkVB_ZYRgzeca6ZMudZ3VNl2xQNC8Zt0Y1Tuvyk,4427
135
+ iris_pex_embedded_python-3.2.0b4.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
136
+ iris_pex_embedded_python-3.2.0b4.dist-info/entry_points.txt,sha256=pj-i4LSDyiSP6xpHlVjMCbg1Pik7dC3_sdGY3Yp9Vhk,38
137
+ iris_pex_embedded_python-3.2.0b4.dist-info/top_level.txt,sha256=VWDlX4YF4qFVRGrG3-Gs0kgREol02i8gIpsHNbhfFPw,42
138
+ iris_pex_embedded_python-3.2.0b4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.7.0)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5