^math:uuid[]
The method outputs random string of format
22C0983C-E26E-4169-BD07-77ECE9405BA5
Note: in some OSes outputs pseudorandom string.
This method is useful in cases when it is hard or insensible to use through-numbering of objects, e.g. while performing distributed computing.
UUID is also known as GUID. Example A company's branches accumulate orders and periodically send them to headquarters. To ensure identifier's uniqueness, we use UUID.
# different branches accumulate order's information in tables 'orders' and 'order_details'
# add record about order ^void:sql{
insert into orders
(order_uuid, date_ordered, total)
values
('$order_uuid', '$date_ordered', $total)
}
# cycle adding records on ordered goods should be here
^void:sql{
insert into order_details
(order_uuid, item_id, price)
values
('$order_uuid', $item_id, $price)
}
# parts of tables 'orders' and 'order_details' are periodically retrieved
# and sent (^mail:send[ ])to headquarters,
# where these parts of tables are added to common tables 'orders' and 'order_details'
# WITHOUT any problems with multiple instances of 'order_id' Note: Parser generates UUID based on random numbers, not on time. Parameters are:
variant = DCE;
version = DCE Security version, with embedded POSIX UIDs.
that means that not all of the UUID bits are picked up at random. It is to be so, indeed:
xxxxxxxx-xxxx-4xxx-{8,9,A,B}xxx-xxxxxxxxxxxx