go to post Eduard Lebedyuk · Apr 10, 2019 Can you share the code please?Changed .. to z and compilation fails for me.
go to post Eduard Lebedyuk · Apr 9, 2019 Use methods from Ens.DataType.UTC class to convert UTC time to local timezone.
go to post Eduard Lebedyuk · Apr 9, 2019 Okay, how do I make this work with methods?On property get/set I need to call instance method.I've tried this: Class Test.String Extends %String { Method Get() As %String [ CodeMode = objectgenerator ] { do %code.WriteLine($c(9) _ "Quit ..Test()") quit $$$OK } } And class: /// set obj = ##class(Test.Obj).%New() /// w obj.prop Class Test.Obj Extends %RegisteredObject { Property prop As Test.String; Method Test() { quit $random(100) } } But it fails to compile.
go to post Eduard Lebedyuk · Apr 9, 2019 Yeah, apparently only DeepSee and Ens packages/globals can be mapped successfully.Tried random package and it didn't show up even after mapping to %ALL.
go to post Eduard Lebedyuk · Apr 9, 2019 I created these mappings (no restarts):Ens* global mapping for ENSLIB -> USERDeepSee* global mapping for ENSLIB -> %ALLEns* package mapping for ENSLIB -> USERHere's the result:
go to post Eduard Lebedyuk · Apr 9, 2019 Turns out it's much easier than I thought: Class Test.String Extends %String { ClassMethod Get() As %String [ CodeMode = objectgenerator ] { do %code.WriteLine($c(9) _ "Quit $g(^Test.String, 0)") quit $$$OK } ClassMethod Set(%val As %String) As %String [ CodeMode = objectgenerator ] { do %code.WriteLine($c(9) _ "Set ^Test.String = %val") quit $$$OK } } Example: set obj = ##class(Test.Obj).%New() write obj.prop >0 set obj.prop=1 write obj.prop >1
go to post Eduard Lebedyuk · Apr 9, 2019 I downloaded IRIS Community edition (store/intersystems/iris:2019.1.0.510.0-community) and was able to create package and global mappings without any issues.
go to post Eduard Lebedyuk · Apr 9, 2019 Do you want it for debugging or logging purposes?If for debugging, here's a series of articles Debugging Web (part 1, part 2) dealing with REST Debugging.Atelier can be used to debug REST.
go to post Eduard Lebedyuk · Apr 9, 2019 Is it one node or known nodes which can contain characters for escaping?If so custom datatype may be a better solution.
go to post Eduard Lebedyuk · Apr 9, 2019 Can you please provide an example?I'm aware only of %XML.PropertyParameters but there's nothing but parameters.
go to post Eduard Lebedyuk · Apr 9, 2019 Here's what I've coded.Property: Class Test.String Extends %String { ClassMethod StorageToLogical(%val As %String) As %String [ CodeMode = objectgenerator ] { set property = $g(%member) do %code.WriteLine($c(9) _ "Quit """ _ property _ """") quit $$$OK } ClassMethod LogicalToStorage(%val As %String) As %String [ CodeMode = objectgenerator ] { set property = $g(%member) do %code.WriteLine($c(9) _ "Quit """ _ property _ """") quit $$$OK } } Class: Class Test.Obj Extends %RegisteredObject { Property prop As Test.String; } However reference to property does not return anything (expected to return property name): w obj.prop zw obj.prop >"" Any ideas?
go to post Eduard Lebedyuk · Apr 8, 2019 Comment out OnGetConnections method and restart the service.Do you still get errors?
go to post Eduard Lebedyuk · Apr 6, 2019 You can use DATEDIFF: set tx = $ZDT($H,3,1,3) hang 5 write $SYSTEM.SQL.DATEDIFF("hour", $ZDT($H,3,1,3), tx) >0 write $SYSTEM.SQL.DATEDIFF("second", $ZDT($H,3,1,3), tx) >-6
go to post Eduard Lebedyuk · Apr 6, 2019 Good article!Please post docker-compose definition as a text.There's a code formatting style too
go to post Eduard Lebedyuk · Apr 5, 2019 I would like to advise against this course of action, there are several reasons:Ensemble messages should be as small as possible. If you can pass id only, pass id only, etc. Minimizing message size keeps production efficient.ResultSet does not contain the data itself, it's more like a compiled instructions on how to get the data. Only when you're calling Next method the data is actually loaded into memoryResults of SQL query should be immediately acted upon, because the older the SQL results, the more they differ with reality. it is best to pass parameters and execute query in-place.If you want it for debugging purposes you can add a trace event which would store ids only for example, but if you actually need to pass a set of results between different business hosts it may be beneficial to you to rethink the production architecture.Here's some questions:What business hosts do you have?What data do you pass between different hosts?Can you pass parameters between hosts and execute a query on a target host?Can you pass not a set between hosts, but rather elements individually?