uuid7. Universal Unique Identifier version 7   [3.5.0]

^math:uuid7[]
^math:uuid7[options]

The method generates a random string in the following format:
    0189FC1E-44E6-7000-A014-BF0A34996F90
    0189FC1E-44E6-7001-87F3-31344DA88C26

Unlike the completely random UUID version 4, this function generates values in accordance with the UUID version 7 standard
. In this standard, the first 16 characters are based on time and a sequence number, ensuring that each subsequent UUID is greater than the previous one. This reduces the load on B-trees when using UUIDs as keys in databases.

UUID (also known as GUID) is convenient to use when it is difficult to provide or completely impractical to use sequential numbering of objects. For example, in distributed computing.

Options hash can be specified:
·$.lower(false/true) - to output the result in lower case, upper case by default.  
·$.solid(false/true) - to exclude the '-' character from the result, do not exclude by default.  



Copyright © 1997–2025 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 01.01.2025