|
|
|
|
|
- Empty UUID
- Possible conversions
- Available operations
- Comparison
- Generating a UUID
- HFSQL items
- Management of UUID types in controls
- COM interface
- Serialization
UUID (Variable type) In french: UUID
The UUID type is used to easily manage: - UUIDs or GUIDs,
- automatic UUID HFSQL identifiers,
- identifiers for COM/Automation objects and interfaces
- etc.
UUID variables are available: - on 128 bits. 128-bit UUIDs comply with RFC 4122.
- on 256 bits.
v is UUID
v1 is UUID on 128
v2 is UUID on 256
Syntax
Declaring and assigning a UUID type Hide the details
<Variable name> is UUID = <Value> OR
<Variable name> is UUID <Variable name> = <Value>
<Variable name>: Name of the variable to declare. <Value>: Value that will be assigned to the variable. A UUID variable can be assigned with: Remarks Empty UUID By default, a UUID variable is empty when it is created. Its value corresponds: - to the constant Nil_UUID for 128-bit UUID variables.
- to the constant Nil_UUID256 for 256-bit UUID variables.
The main purpose of conversions is to allow easy debugging while detecting operations that make no sense. Conversions into string or buffer are possible, but it is not possible to make a conversion into a numeric variable. A 128-bit UUID can be converted into: - standard hexadecimal string "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".
- "big-endian" buffer (16 bits).
A 256-bit UUID can be converted into: - hexadecimal string "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".
- "big-endian" buffer (32 bits).
Other conversions are not allowed. Especially, a 128-bit UUID cannot be converted into 256-bit UUID and vice versa. The main purpose of operations is to allow easy debugging while detecting operations that make no sense. Concatenation with a string is allowed, but arithmetic operations are not. A UUID (128-bit or 256-bit) can be concatenated with a string or a buffer. UUIDs can be compared to allow for sorting and binary search in an array. - 128-bit UUIDs can be compared to 128-bit UUIDs, strings and buffers.
- 256-bit UUIDs can be compared to 256-bit UUIDs, strings and buffers.
Generating a UUID A 128-bit UUID can be generated: - with the GetGUID function. Example:
- with the GetUUID function. Example:
A 256-bit UUID can be generated: - with the GetGUID function. Example:
v is UUID on 256 = GetGUID(guidRough256)
- with the GetUUID256 function. Example:
v is UUID on 256 = GetUUID256()
HFSQL items - 128-bit and 256-bit UUID items are available in the analysis.
- 128-bit and 256-bit UUID items can be automatic. In this case, they are automatic UUIDs. A UUID will be automatically generated when HAdd is called.
Management of UUID types in controls "UUID" and "UUID 256" input and display masks are available for the controls that allow handling these types. Binding to HFSQL items and UUID variables is possible. Serialization - UUID 128:
- Serializable in XML and JSON: standard string: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
- Serializable in binary: "big-endian" binary format.
- UUID 256:
- Serializable in XML and JSON: string: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
- Serializable in binary: "big-endian" binary format.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|