Write flexible and performant code with NumberSequences

Enabled for Public preview General availability
Users by admins, makers, or analysts Apr 1, 2024 Apr 1, 2024

Business value

Improvements to NumberSequences date type streamline the development and execution of code that creates and manages number sequences in the database, resulting in increased efficiency and speed.

Feature details

This release offers the following improvements to the NumberSequences data type:

  • New Restart operation

    Prior to this release, a number sequence had to be deleted and recreated to restart it. Now, a new Restart operation simplifies and speeds up this process. The operation has the following syntax:

    Restart(name: text; seed: BigInteger; CompanySpecific: bool)
    
  • New RangeStart operation

    A new RangeStart operation allows developers to request multiple values from the number sequence at once, meaning no gaps, and fewer SQL round-trips. The operation has the following syntax:

      RangeStart : = Range(name: text; count: integer; CompanySpecific: bool);
    
  • Improved Next, Current, and Exists operations

    These operations are now 8 to 32 percent faster.