Module: database/repositories/counterRepo

Atomic counter management for human-readable IDs (TC-1, RUN-2, etc.).

Source:

Methods

(static) current(name) → {number}

Get the current value of a counter without incrementing.

Parameters:
Name Type Description
name string
Source:
Returns:
Type
number

(static) next(name) → {number}

Atomically increment a counter and return the new value.

Parameters:
Name Type Description
name string

— Counter name ("test", "run", "project", "activity").

Source:
Returns:

The new counter value.

Type
number

(static) set(name, value)

Set a counter to a specific value (used during migration).

Parameters:
Name Type Description
name string
value number
Source: