UUID functionsCypher 25 onlyIntroduced in Neo4j 2026.08
UUID functions allow you to construct UUID values, and fetch their most/least significant bits.
uuid()
Syntax |
|
||
Description |
Returns a randomly generated |
||
Arguments |
Name |
Type |
Description |
Returns |
|||
Syntax |
|
||
Description |
Converts a |
||
Arguments |
Name |
Type |
Description |
|
|
The |
|
Returns |
|||
Syntax |
|
||
Description |
Converts two |
||
Arguments |
Name |
Type |
Description |
|
|
The most significant bits. |
|
|
|
The least significant bits. |
|
Returns |
|||
The randomly generated |
|
A |
UUID valueRETURN uuid() AS randomUUID
| randomUUID |
|---|
|
Rows: 1 |
STRING value to a UUIDRETURN uuid("550e8400-e29b-41d4-a716-446655440000") AS uuid
| uuid |
|---|
|
Rows: 1 |
INTEGER values to a UUIDRETURN uuid(42, 42) AS uuid
| uuid |
|---|
|
Rows: 1 |
null valuesRETURN uuid(null) AS nullUUIDValue,
uuid(42, null) AS nullMostSigBits,
uuid(null, 42) AS nullLeastSigBits,
uuid(null, null) AS nullMostLeastSigBits
| nullUUIDValue | nullMostSigBits | nullLeastSigBits | nullMostLeastSigBits |
|---|---|---|---|
|
|
|
|
Rows: 1 |
|||
uuid.leastSignificantBits()
Syntax |
|
||
Description |
Returns the least significant bits from the given |
||
Arguments |
Name |
Type |
Description |
|
|
The |
|
Returns |
|
||
|
The least significant bits represents the lower 64 bits of a |
WITH uuid("550e8400-e29b-41d4-a716-446655440000") AS uuid
RETURN uuid.leastSignificantBits(uuid) AS leastSignificantBits
| leastSignificantBits |
|---|
|
Rows: 1 |
uuid.mostSignificantBits()
Syntax |
|
||
Description |
Returns the most significant bits from the given |
||
Arguments |
Name |
Type |
Description |
|
|
The |
|
Returns |
|
||
|
The most significant bits represents the upper 64 bits of a |
WITH uuid("550e8400-e29b-41d4-a716-446655440000") AS uuid
RETURN uuid.mostSignificantBits(uuid) AS mostSignificantBits
| mostSignificantBits |
|---|
|
Rows: 1 |