@IncId()
New in 2.0Generate incremental IDs (node-unique)
ID GenerationSince 2.0.0
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| init | Integer | — | 1 | Initial value, default 1 |
| step | Integer | — | 1 | Increment step, default 1 |
Usage
@IncId()Generate incremental ID (start=1, step=1)
Example:
@IncId()
Output:
1@IncId(init,step)Generate incremental ID with specified start and step
Example:
@IncId(5,2)
Output:
5