AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Sintaxis WLanguage / 
  • Empty UUID
  • Possible conversions
  • Available operations
  • Comparison
  • Generating a UUID
  • HFSQL items
  • Management of UUID types in controls
  • COM interface
  • Serialization
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Otros
Procedimientos almacenados
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.
The UUID type is an nullable type . For more details, see Activating nullable types.
Ejemplo
v is UUID  // Déclaration d'un UUID sur 128 bits par défaut
v1 is 128-bit UUID
v2 is 256-bit UUID
Sintaxis

Declaring and assigning a UUID type Ocultar los detalles

<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:
Observaciones

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.

Possible conversions

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".
  • in "big-endian" buffer format (16 bytes).
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.

Available operations

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.

Comparison

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:
    v is UUID = GetGUID()
  • with the GetUUID function. Example:
    v is UUID = GetUUID()
A 256-bit UUID can be generated:
  • with the GetGUID function. Example:
    v is 256-bit UUID = GetGUID(guidRough256)
  • with the GetUUID256 function. Example:
    v is 256-bit UUID = 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.

COM interface

A 128-bit UUID can be used to store CLSIDs and IIDs from COM objects and interfaces. It can therefore be used in COMCreateInstance and COMQueryInterface.

Serialization

UUIDs can be serialized (Serialize):
  • 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.
Versión mínima requerida
  • Versión 24
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 06/03/2024

Señalar un error o enviar una sugerencia | Ayuda local