Class

Sequence

Sequence(seqopt)

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

View Source model/CouchDBSequence.ts, line 22

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

# current

Current sequence value that can be incremented

The current value of the sequence

View Source model/CouchDBSequence.ts, line 32

string | number

# current

Current sequence value that can be incremented

The current value of the sequence

View Source model/CouchDBSequence.ts, line 66

# id

Primary key for the sequence record

The unique identifier for the sequence

View Source model/CouchDBSequence.ts, line 27

string

# id

Primary key for the sequence record

The unique identifier for the sequence

View Source model/CouchDBSequence.ts, line 60