SqlComputed (Property Keyword)
To specify that this property is computed, use the following syntax:
Property name As classname [ SqlComputeCode = sqlcomputecode, SqlComputed ];
Where sqlcomputecode specifies the code used the compute the property, as described in SqlComputeCode. If the compute code is defined in a PropertyComputation method, omit SqlComputeCode. For more details, see Computed Values.
If the property is not computed, omit this keyword or place the word Not immediately before the keyword.
If this keyword is true (and if the property also specifies SqlComputeCode), then this property is a computed property. For options and other details, see “Defining a Computed Property” in Defining and Using Classes.
If a property has a value for the SqlComputed keyword, InterSystems IRIS uses that value to compute the property. Specifically, a new class method, <property>Compute, is generated from SqlComputeCode. This method is called from the property’s <property>Get method. If the property also has SqlComputeOnChange keyword specified, then the <property>Compute method is called at the specified times.
This functionality is implemented in the <property>Get and <property>Set methods. If you override either of those methods, then property computations do not work unless there are provisions in the overridden method implementations to trigger computations.
If you omit this keyword, this property is not computed.
“Property Definitions” in this book
“Defining and Using Literal Properties” in Defining and Using Classes
“Working with Collections” in Defining and Using Classes
“Working with Streams” in Defining and Using Classes
“Defining and Using Object-Valued Properties” in Defining and Using Classes
“Defining and Using Relationships” in Defining and Using Classes
“Introduction to Compiler Keywords” in Defining and Using Classes