Does Caché support SQL CREATE SEQUENCE as in PostgreSQL?
If not, what would be the best alternative? Create my own sequence logic as the example bellow?
Class Util.MySequence Extends %Persistent [ ClassType = persistent, ProcedureBlock ]
{
Property dummy As %String;
Property myvalue As %Integer [ Calculated, SqlComputeCode = { Set
{myvalue}=##class(Util.MySequence).CurrentValue()}, SqlComputed ];
ClassMethod CurrentValue() As %Integer
{
s x=$I(^MySequence)
Quit x
}
Method myvalueGet() As %Integer [ CodeMode = expression ]
{
..CurrentValue()
}
}
Thanks.