This is code extracted from this project (note: reformatted for clarity):
Class Util.Data.EmojiType Extends %Persistent
{
Property CodePoint As %Integer;
Property UnicodeChar As %String [
Calculated,
ReadOnly,
SqlComputeCode = { set {*} = $wchar({CodePoint})},
SqlComputed,
Transient
];
// snip
Method UnicodeCharGet() As %String
{
quit $wchar(..CodePoint)
}
Now, I really don't get it. Why is it that UnicodeChar
is both Calculated and has a custom getter (ouch), plus the custom getter does exactly the same thing as the SqlComputeCode
?
And if I try and get this property, what part of all this will be triggered?