go to post Stefan Rieger · Jul 12, 2021 so mainly you have to work with Iris Class Documentation to find details of the Method Signatures. If it's a classMethod you can invoke the matching IRIS Method directly, if it's a InstanceMethod you have to invoke %OpenId or %New() to have a Object Handle and invoke Methods on them. Invoking the Methods on Iris is straight forward and not complicated - (used to be a pain with Cache); Be aware that RefrenceParameters and Results with .Net Interface MAY NOT correspond to IRIS Documentation - actually i can't give you a reliable advice on that. N.B. Some method just DO NOT WORK with .Net Interface - mainly this are all Methods which produce multiple lines of output if invoked by Iris Terminal (e.g. %ValidateIndices). If i have to invoke a method like that i just wrap them into a userdefined IRIS Helper-Class and invoke this helper class. (you even might declare your user method as SQL Method beeing able to invoke this method by sql)
go to post Stefan Rieger · Jul 12, 2021 this is taken from testlibrary - where "Appliance.User" is a custom defined Object. Using IRIS and invoking ClassMethod %Library.Pesistent.%OpenId to receive a ObjectReference to the stored object with ID 1. Using that ObjectReference i'm able to invoke %ClassName on that object to get the ClassName of that object. With tryBlock i'm using same extensions to invoke same helper methods wich encapsulate more classMethods from %Persistent - but that follows exactly same pattern... using (var conn = ConnectionFactory.CreateConnection() as IRISADOConnection) { var iris = IRIS.CreateIRIS(conn); var obj = iris.ClassMethodObject("Appliance.User", "%OpenId", 1 ); Assert.NotNull(obj); var iObj = obj as IRISObject; Assert.NotNull(iObj); Assert.True(iObj.Oref() == "3@Appliance.User"); var clsName = iObj.InvokeString("%ClassName", true ); try { var id = iObj.InvokeString("%Id"); iris.LockId(clsName, id); iris.UnLockId(clsName, id); //iris.ValidateIndex(clsName); iris.PurgeIndex(clsName); iris.BuildIndex(clsName); } catch (Exception e) { Console.WriteLine(e); throw; }
go to post Stefan Rieger · Jul 7, 2021 1. like it this way; if you want "net" property access you have to generate proxy classes which wrap the mentioned methods... 2. InterSystems.Data.IRISClient.AD.IRISObject is in Assembly InterSystems.Data.IRISClient, maybe dll not matching framework version? (umpf, sorry didn't read that you're on 2019... don't know about that)
go to post Stefan Rieger · Mar 6, 2020 found out about the second; That only affects raw Globals without ClassDefinition... Obviously a problem of how "Types" are constructed; partly they're embedded in the data; partly it's part of the ClassDefinition? So just guessing; The problem with storing decimal values is because at the level inserting data via IRISList you don't have info about the Scale-Factor - does this make it impossible to store data internally?
go to post Stefan Rieger · Mar 6, 2020 in addition retrieving values from IRISlist somehow ist strange as well. there are multiple values i could add to a list but will be retrieved as different types: long -> int/ or long, depending on the value short -> int bool -> int float -> double string -> byte[] will that stay like that or is there room for improvements?
go to post Stefan Rieger · Feb 28, 2020 good idea; i can see the point now: As %SYSTEM.OBJ.LoadStream() Method checks if Parameter <stream.IsCharacter> it fails as the parameter is passed as "No-Object". With 2019 libs i had the opportunity to pass in native CacheObjects - that's not possible with this architecture and IRISObjects?
go to post Stefan Rieger · Feb 28, 2020 unfortunately results with same error: zLoadStream+1^%SYSTEM.OBJ.1.... as far as i can see it's thrown at InterSystems.Data.IRISClient.InStream.readHeaderSYSIO(Int64 msgid, List`1 allowedErrors) Any Ideas?
go to post Stefan Rieger · Feb 24, 2020 thanks; that did the job... ... and i guess you're right with what you say - for my perspective this behaviour is somehow strange; Shouldn't then InterSystems add a "dummy device" on calling methods to avoid these kind of exceptions? Never before i had a problem like that calling e.g. LoadMethod and for my sight it's a bit irritating that InterSystems expect me to know if a method i'll call will write to a "not allowed device" and to investigate how to trick that away
go to post Stefan Rieger · Feb 23, 2020 I would expect %JSONAdapter. %JSONExportToString() should be the function to serialize arrays to string; extend or wrap your array into a object that inherits from %JSON.Adaptor and serialize it... btw. the Array Objects do have "Next or GetAt" function to iterate as well (look at the matching classdocumentation)
go to post Stefan Rieger · Feb 10, 2020 Hi Raj, on writing test code for you i noticed that this might be a "interpretation" problem. I assumed that - as son as the transaction is started - the property IsTransactionActive will be true. In Fact this property is True only after the first Transaction is executed. It would be very practical if i could detect from a connection if a Transaction was started - Additionally i'd like to have access to the IrisTransaktion on the Connection itself - would make programming very much easiere....
go to post Stefan Rieger · Oct 31, 2019 Hello Fabian, is exactly my problem - could you go a bit in detail; I've no idea how and where exactly to use the mentioned commands; btw. pls. keep in mind i'm using Windows ;-) Thanks in advance, Stefan
go to post Stefan Rieger · Sep 28, 2017 thanks for the inspiration - that sounds very interesting, must have a closer look at that
go to post Stefan Rieger · Sep 27, 2017 ... "keep and re-use your existing code, classes and SQL in Caché." just for ignorace: How am i supposed to use SQL via Node.js?