new Sequence(entity)
Controls a sequence of the given entity.
Take note that this is the real Sequence constructor.
Parameters:
Name | Type | Description |
---|---|---|
entity |
string | The entity name |
- Source:
Example
var userSeq = new Picasso.core.Sequence("User");
var secUserSeq = new Picasso.core.Sequence("User");
secUserSeq.currentVal(); // returns 0
userSeq.nextVal(); // returns 1
secUserSeq.currentVal(); // returns 1
Methods
-
currentVal() → {number}
-
View the sequence current value
- Source:
Returns:
The current sequence value or null to a invalid entity name- Type
- number
-
nextVal() → {number}
-
Get the next val of a sequence and increments it
- Source:
Returns:
The current sequence value- Type
- number