Bug #2178
Feature #1582: add conversion and runtime support for sequences
Feature #1911: add runtime support for sequences
Asymmetric sequence behavior
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:
0%
billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:
History
#1 Updated by Ovidiu Maxiniuc almost 13 years ago
Sequences in Progress are somewhat asymmetric relatively to their increment:
- An ascending sequence will allow any value to be assigned it (as long as the value is less than its MAX-VALUE, if any), including negative numbers.
- A sequence with negative increment will automatically have an MAX-VALUE equal to is INITIAL value which will not allow values less than that to be assigned.
Ex: The following two sequences have been defined in the OE Data Dictionary without any limits.
ADD SEQUENCE "s1" INITIAL 100000 INCREMENT -1000 CYCLE-ON-LIMIT no MAX-VAL 100000 ADD SEQUENCE "s2" INITIAL 100000 INCREMENT 1000 CYCLE-ON-LIMIT no
The
s1 gets automatically upper limitation. However, in the Data Dictionary the user can only set the lower bounds for a DESC sequence. As result, we have:current-value(s1) = -200000. /* valid */ current-value(s1) = 200000. /* invalid, will cause error 3132 to be displayed */ current-value(s2) = -200000. /* valid */ current-value(s2) = 200000. /* valid */