webCOMAND

UUID()

Return a Universally Unique Identifier (UUID) in binary format.  If a valid UUID is passed in as a string, it will be converted and returned in binary format.  If no UUID is specified, a new Version 1 UUID will be generated and returned in binary format.

UUIDs are stored in binary format in the repository for best performance, so this function must be used to compare the UUID of a repository object to a UUID in string format.

Prototype

binary(32) UUID(string $uuid = NULL)

Parameters

  • uuid - Optional UUID string like '4c5c850a-da1b-11e5-bb17-fba753ab61e3' (with dashes) or '4c5c850ada1b11e5bb17fba753ab61e3' (without dashes).

Return

A 32-bit binary value.

Example

FROM Contact WHERE UUID=UUID('4c5c850a-da1b-11e5-bb17-fba753ab61e3')

Related

PHP API UUID Class