go to post Eduard Lebedyuk · Feb 21, 2022 Yes, I caught the same behavior. Looks like a bug. Reported. Please file a wrc if you want to be notified about any changes.
go to post Eduard Lebedyuk · Feb 15, 2022 Something like this? SELECT ID, name, processedDate, processedTime FROM MYprocesses m WHERE NOT EXISTS ( SELECT 1 FROM MYprocesses m1 WHERE 1=1 AND m1.name=m.name AND TO_POSIXTIME(m1.processedDate||' '||m1.processedTime, 'yyyy/mm/dd hh:mm:ss') > TO_POSIXTIME(m.processedDate||' '||m.processedTime, 'yyyy/mm/dd hh:mm:ss')) Replace TO_POSIXTIME with TO_TIMESTAMP on older versions. If record ids are aligned with time (meaning higher id has higher processed date/time) you can simplify and speed up the query: SELECT ID, name, processedDate, processedTime FROM MYprocesses m WHERE NOT EXISTS ( SELECT 1 FROM MYprocesses m1 WHERE 1=1 AND m1.name=m.name AND m1.id>m.id)
go to post Eduard Lebedyuk · Feb 14, 2022 Interoperability callbacks can now be written in Python. Class dc.DFOperation Extends Ens.BusinessOperation { Method OnMessage(ByRef request As Ens.StringContainer, Output response As Ens.Response) As %Status [ Language = python ] { import pandas import iris query = request.value.StringValue response.value = iris.cls('Ens.Response')._New() stmt = iris.sql.prepare(query) rs = stmt.execute() df = rs.dataframe() iris.cls('Ens.Util.Log').LogInfo("dc.DFOperation", "OnMessage", "Dataframe load success") return iris.cls('%SYSTEM.Status').OK() } }
go to post Eduard Lebedyuk · Feb 14, 2022 Do not use %Library.ClassDefinition, use %Dictionary.ClassDefinition instead.
go to post Eduard Lebedyuk · Feb 12, 2022 Just checked XML spec and there's nothing about escaping $c(10) or $c(13). The only symbols which must be escaped are: " " & & ‘ ' ' ' < < > > You can check $zcvt - it produces the same output: zw $zcvt("< > &" _$c(10)_$c(13)_ "TEST", "O", "XML") If you need byte for byte compatibility you'll need a custom datatype with a redefined LogicalToXSD method. Something like: Class test.XMLString Extends %String { ClassMethod LogicalToXSD(%val As %String) As %String [ CodeMode = objectgenerator, ServerOnly = 1 ] { quit:%mode'="propertymethod" $$$OK Do %code.WriteLine($c(9) _ "set %val = $zcvt(%val,""O"",""XML"")") For replace=$lb("$c(10)","""
"""),$lb("$c(13)","""
""") { Set from = $lg(replace, 1) Set to = $lg(replace, 2) Do %code.WriteLine($c(9) _ "set %val = $replace(%val," _ from _ ", " _ to _")") } Do %code.WriteLine($c(9) _ "quit %val") Quit $$$OK } }
go to post Eduard Lebedyuk · Feb 12, 2022 219 characters: s r=##class(%Net.HttpRequest).%New(),r.Server="pm.community.intersystems.com",r.SSLConfiguration="ISC.FeatureTracker.SSL.Config" d r.Get("/packages/zpm/latest/installer"),$system.OBJ.LoadStream(r.HttpResponse.Data,"c")
go to post Eduard Lebedyuk · Feb 12, 2022 Is it just a SELECT * FROM table query or is it something else? Run the query in a Management Portal and compare the timings.
go to post Eduard Lebedyuk · Feb 11, 2022 Open https://login.intersystems.com in Web browser, login and you'll get a new login command for docker.
go to post Eduard Lebedyuk · Feb 11, 2022 I think this would be enough: Set P("Globals")="%DEFAULTDB" Set tSC=##class(Config.Namespaces).Create("%All",.P)
go to post Eduard Lebedyuk · Feb 11, 2022 No. %Save never throws an exception, just returns a %Status variable. In your scenario it would return an error indicating validation failure on LastName. Class User.Person Extends %Persistent { Property LastName As %String(MAXLEN = 30); /// do ##class(User.Person).Test() ClassMethod Test() { set obj = ..%New() set obj.LastName = $j("", 50) set sc = obj.%Save() w $System.Status.GetErrorText(sc) } } Results in: ERROR #7201: Datatype value ' ' length longer than MAXLEN allowed of 30 > ERROR #5802: Datatype validation failed on property 'User.Person:LastName', with value equal to " "
go to post Eduard Lebedyuk · Feb 11, 2022 SELECT Name FROM %Dictionary.CompiledIndex WHERE PrimaryKey = 0 AND parent = 'your.class'
go to post Eduard Lebedyuk · Feb 11, 2022 Fascinating. Maybe we can pack a separate container with a telnet client and a web page connected to it to debug business hosts in a browser.
go to post Eduard Lebedyuk · Feb 11, 2022 Does foreground mode work only for windows with cterm/iristerm client or can any telnet client connect?
go to post Eduard Lebedyuk · Feb 10, 2022 From the docs: <STRINGSTACK> An expression is too long, there are too many expressions in an argument for a single command, or an expression contains many very long strings. Simplify the expression. <MAXSTRING> There has been an attempt to specify or create a data string longer than the implementation allows. The maximum string size is 3,641,144 characters. Attempting to concatenate strings that would result in a string exceeding this maximum string size results in a <MAXSTRING> error. MAXSTRING is always related to maximum length of 3,641,144 characters for one string (assuming long strings are enabled). STRINGSTACK can be raised in several different circumstances, including a lot of small strings, recursion and so on. Increasing bbsiz may help avoid STRINGSTACK error, but not MAXSTRING. In your case use streams by replacing: set file=object.%Get(i).file with: set file=object.%Get(i).%Get("file",,"stream")
go to post Eduard Lebedyuk · Feb 10, 2022 Here's how to debug interoperability hosts anywhere: on Windows, Linux, and Mac, in Containers.
go to post Eduard Lebedyuk · Feb 9, 2022 ret is a valid shorthand for return, so it's only +2 characters totaling 45.
go to post Eduard Lebedyuk · Feb 8, 2022 Renata is Paula's boss. Jessica is Rose's boss, right? Or am I missing something here? Anyway, check this series of articles.
go to post Eduard Lebedyuk · Feb 7, 2022 The issue is it would actually hang the process for 10 seconds. MakeTimerCall implementation would not - BP could process other messages in the meantime.