Constructor
# new Sequence(seqopt)
Represents a sequence in CouchDB used for generating sequential IDs
Model for CouchDB sequence records
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
seq |
ModelArg.<Sequence>
|
<optional> |
Optional initialization data for the sequence |
Example
// Example of creating and using a Sequence
const sequence = new Sequence({ id: 'user-seq', current: 1 });
// Increment the sequence
sequence.current = Number(sequence.current) + 1;
Members
string
|
number
# current
Current sequence value that can be incremented
The current value of the sequence