Can also be used as #include inside a method (applies only to that method)
- Log in to post comments
Can also be used as #include inside a method (applies only to that method)
Clarification: you can't use * alone as a global mapping. If you want NS1 to get all of its globals from DB1, then the "Default database for globals" field should be DB1. You can then add mappings for certain globals (using * at the end if you want) to additional databases.
(changing your question a little) If you add a mapping B* to DB1, and a mapping of BA* to DB2, BA* mapping takes precedence.
Are you asking this out of curiosity? Or is there another reason for the question? How would you like to use $this?
I'd use LIKE and OR directly in the query. If there are more than 2-3 comparisons (which would make something like InLike() useful), I'd write a class method that uses Dynamic SQL to add an OR for each comparison to the final WHERE clause.
Suggestion: Since IRIS is the flagship product for 5+ years, calling the programming language "Caché ObjectScript" doesn't make much sense anymore. "ObjectScript" is enough.
@Harry Tong Would %vid help with this (https://docs.intersystems.com/irisforhealth20251/csp/docbook/DocBook.UI…)?
One quick answer is a helper ObjectScript class with a wrapper classmethod for each macro. If the helper class can inherit from the class that provides the macros (for example: CustomPackage.TestCase extends %UnitTest.TestCase) then you can replace $$$Macro(args) with self.Macro(args). Otherwise, your helper class must include the INC file that defines the macros, and other classes can call the class methods directly: iris.CustomPackage.HelperClass.Macro(args).
I don't use docker compose. I just use a shell script and the docker command. I pass
--hostname ABC123
which shows up at the top left of the Portal (server ABC123).
I think that would be hostname: ABC123 in a docker compose file.
@David Hockenbroch What about setting that variable (say tlevel) equal to the $TLEVEL at the start of the Try, and then in the Catch, only if $TLEVEL = (tlevel +1) (meaning only your TSTART happened), do a TROLLBACK 1? Because if $TLEVEL is >= 2 more than tlevel, it means that your Try called a method that started its own transaction and didn't correctly commit it or roll it back, and perhaps that method called another method that did the same thing, etc. I think coping with that in your Catch is not really your code's job. Do you concur?
COS? Creative ObjectScript? Comforting ObjectScript? Conventional ObjectScript? Contemplative ObjectScript? 😁🤣