go to post Iryna Mykhailova · Dec 4, 2023 Congratulations to all the winners and participants, particularly to @Anna Diak and @Andrii Mishchenko - I am so very proud of you!
go to post Iryna Mykhailova · Nov 30, 2023 It's a shame, I feel like there is often something going on with Cloud SQL. Especially during contests 😄 That's why I don't feel confident to incorporate it in my course 😢 - I ask my students to use it and then they can't even set it up without a fuss.
go to post Iryna Mykhailova · Nov 17, 2023 The command doesn't know. That's why you need to check the SQLCODE variable. If SQLCODE = 0 then the row exists and it was updated. If SQLCODE = 100 then the row doesn't exist. If it not equal to either then you have a problem. Example for Embedded SQL: &SQL(update WH.Size set Height = 1000 where %ID = 10) write SQLCODE Example for Dynamic SQL: SET myquery = "update WH.Size set Height = 1000 where %ID = 10" SET tStatement = ##class(%SQL.Statement).%New() SET tStatus = tStatement.%Prepare(myquery) SET rset = tStatement.%Execute() write rset.%SQLCODE Not sure what you mean by "if the row exists" in regards with insert. The row does not exist, because you're creating it.
go to post Iryna Mykhailova · Nov 14, 2023 I'd say in general, having a structured data with the actual names of fields is much better than "parsing" the text with delimiters. So I would vote for FHIR. Maybe at some point there will be a better way to represent data - and it is OK - and people will switch to it. The main idea - not to make it painful on the developers to rewrite everything!
go to post Iryna Mykhailova · Aug 25, 2023 I know, but it's not a question of examples, it's more a question of appreciation. There was another one interesting quiz question that actually prompted me to write this idea, I just don't remember what it was about. So, I think it would bring pleasure to authors of quiz questions to see that others like their work.
go to post Iryna Mykhailova · Aug 24, 2023 Yep, that was my first thought - can you change Property Organizations As list Of Organization; to parent/children Relationship? In this case you will get automatic cascade delete. You'll have Relationship Responce As GetOrgUpdatesResponse [ Cardinality = parent, Inverse = Organizations ]; Relationship Organizations As Organization [ Cardinality = children, Inverse = Responce ]; And it suggests that each responce has its own organizations objects that don't repeat. Otherwise, you will have to delete them manually 1 by 1 in callback method %OnDelete for example /// This callback method is invoked by the <METHOD>%Delete</METHOD> method to /// provide notification that the object specified by <VAR>oid</VAR> is being deleted. /// /// If this method returns an error then the object will not be deleted. ClassMethod %OnDelete(oid As %ObjectIdentity) As %Status [ Private, ServerOnly = 1 ] { Quit $$$OK }
go to post Iryna Mykhailova · Aug 16, 2023 Can you open in your browser the address that you have in parameter LOCATION of your class that extends %SOAP.WebClient? You should at least get an error "Invalid action" if your SOAP server is created in IRIS.
go to post Iryna Mykhailova · Aug 10, 2023 Where is the code for PersonSets2()? And how do you connect to external database?
go to post Iryna Mykhailova · Jun 27, 2023 In IRIS there are no built-in constructors. Classes that don't inherit from a system class are usually used as storage for class methods. Therefore, if you want to create an object you need to inherit your own class from one of the system classes, like %RegisteredObject (won't save your objects to the database), %SerialObject (won't save your objects to the database on its own), %Persistent (will save your objects to the database) etc. For example: Class Sample.Header extends %Persistent { Property Key As %String; Property Show As %Boolean; }
go to post Iryna Mykhailova · Jun 14, 2023 You're not executing it: vism1.Execute(cmd); To make it shorter, can be vism1.Execute('$$Check^logininput()'); sResult:=vism1.Value; You can also find an example in this GitHub repository.
go to post Iryna Mykhailova · May 17, 2023 For me it's a horrible news 😭 I really prefer to use Studio when explaining how to create properties (particularly relationships) and queries (particularly Class Queries based on COS) to students who see IRIS for the first and the last time during my classes. And when something goes wrong (and it does a lot of the time) it's usually easier to ask them to delete the code that produces error and rewrite it while I'm looking than to figure out what's wrong with it. And if it something more complicated than simple properties it can take a lot of time. Besides, not all students know (and want/need to learn) how to use VS Code and look for proper plug-ins, extensions etc. It will really make my life that much harder.
go to post Iryna Mykhailova · May 10, 2023 This is a great opportunity to take and exam for free in a nice friendly setting. Therefore, I would definitely recommend using this opportunity.