Caché Class Definition Reference
SqlComputeCode
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Class Reference   
Search:    

Specifies code that sets the value of this property.
Usage
To specify how the property is computed, use the following syntax:
Property name As classname [ SqlComputeCode = { Set {FieldName} = Expression }, SqlComputed ];
Where:
Details
If this keyword is specified (and if SqlComputed is true), then this property is a computed property. See Defining a Computed Property in Using Caché Objects.
For the value of this keyword, specify (in curly braces) a line of ObjectScript code that sets the value of the property, according to the following rules:
For example:
Property TestProp As %String [ SqlComputeCode = {set {*} = {OtherField}}, SqlComputed ];
For another example:
Property FullName As %String [ SqlComputeCode = {set {*}={FirstName}_" "_{LastName}}, SqlComputed ];
The code is called with a Do command.
Important:
Default
The default is an empty string.
See Also