Article
· Nov 11, 2019 11m read
Transactions in Global InterSystems IRIS

InterSystems IRIS supports a unique data structure, called globals, for information storage. Essentially, globals are persistent arrays with multi-level indices, having several extra capabilities—transactions, quick traversal of tree structures, and a programming language known as ObjectScript.

I'd note that for the remainder of the article, or at least the code samples, we'll assume you have familiarised yourself with the basics of globals:

6 7
1 817

Hello community!

I have a question about the %OnSave method of a class. We have a class that has two properties that are classes.

Class A

Class B

Class C

Class A.PropertyB as Class B

ClassA.PropertyC as Class C

Classes B and C also need to point back to Class A - it's just the way it is. We need to be able to use any one of these classes and get to the others (it's actually even more complicated than this, as Classes B and C also have a PropertyC and PropertyB as well, respectively) :

0 3
0 745
Article
· Jul 1, 2019 2m read
Transaction suspencion

It’s often useful to make changes inside the current transaction, that would not be rolled-back if transaction is rolled-back. For example to do some logging.

This can be achieved by using global that is mapped to temporary database -- IRISTEMP. All globals that start with ^IRIS.Temp* are mapped to IRISTEMP by default. Problem with such approach is that IRISTEMP is cleaned on InterSystems IRIS restart, so this log is lost.

What else you can do is -- suspend transaction temporarily, do the logging, and then resume the same transaction.

2 8
1 460