====== Sequence Generator ====== ===== About ===== A ''sequence generator'' is a [[column|column data generator]] that [[generator|generates]] a sequence * ''1,2,3, ...'' * ''a, b, c, ...'' * ''2011-11-10, 2011-11-09, ...'' * ''blue, red, ...'' ===== Howto ===== ===== Glossary ===== ==== Tick ==== When a ''tick'' happens the ''sequence'' is going to the next element (ie a new element is generated or given). By default, a ''tick'' happens for each new record but with the [[#properties|property tickedFor]], you can choose to ''tick'' a column when another column has reached the end of its sequence. This is used mostly to create [[howto:generator:sequence_odometer|odometer data]] when you have multiple columns in a unique constraint. ===== Properties ===== ^ Key ^ Default Value ^ Description ^ Related HowTo ^ | ''step'' | See [[#data type|data type]] | The value of the next step in the sequence | [[howto:generator:sequence_number|number sequence]] | | ''start'' | See [[#data type|data type]] | The start value in the sequence | [[howto:generator:sequence_number|number sequence]] | | ''offset'' | See [[#data type|data type]] | An ''offset'' value added to the ''start'' value (Used generally with the time data type to have an offset from now) | [[howto:generator:sequence_time|time sequence]] | | ''maxTick'' | 0 | The maximum number of times a new value is generated. When the max is reached, the sequence starts over | [[howto:generator:sequence_number|number sequence]] | | ''tickerFor'' | None | Used to tick another sequence generator when the value is the last in the sequence | [[howto:generator:sequence_odometer|odometer]] | | ''values'' | None | A serie of values that define the sequence | [[howto:generator:sequence_color|color]] | | ''reset'' | False \\ except when ''tickerFor'' is set | Restart from the first element when the sequence reaches the last element | [[howto:generator:sequence_color|color]] | ===== Data Type ===== The below data type are supported: ^ Data Type ^ Default Step Value ^ Step Unit ^ Default Start Value ^ Offset ^ Related How to ^ | Integer | 1 | Integer | 1 | 0 | [[howto:generator:sequence_number|Number Howto]] | | Float | 1.0 | Float | 1.0 | 0 | [[howto:generator:sequence_number|Number Howto]] | | Double | 1.0 | Double | 1.0 | 0 | [[howto:generator:sequence_number|Number Howto]] | | Numeric | 1.0 | Numeric (Rounding Half Down) | 1.0 | 0 | [[howto:generator:sequence_number|Number Howto]] | | Decimal | 1.0 | Decimal (Rounding Half Down) | 1.0 | 0 | [[howto:generator:sequence_number|Number Howto]] | | Date | -1 | Day | Today | -1 for negative step \\ 0 for positive step | [[howto:generator:sequence_time|Time Howto]] | | Timestamp | -10000 | Milli-second | Now | -1 for negative step \\ 0 for positive step | [[howto:generator:sequence_time|Time Howto]] | | Varchar | 1 | Letter | ''a'' | 0 | [[howto:generator:sequence_text|Text Howto]] |