Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions modules/ROOT/content-nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
** xref::values-and-types/spatial.adoc[]
** xref::values-and-types/lists.adoc[]
** xref::values-and-types/maps.adoc[]
** xref::values-and-types/uuid.adoc[]
** xref::values-and-types/vector.adoc[]
** xref:values-and-types/graph-references.adoc[]
** xref::values-and-types/working-with-null.adoc[]
Expand Down Expand Up @@ -108,6 +109,7 @@
*** xref:functions/temporal/index.adoc[]
*** xref:functions/temporal/format.adoc[]
** xref:functions/user-defined.adoc[]
** xref:functions/uuid.adoc[]
** xref:functions/vector.adoc[]

* xref:indexes/index.adoc[]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[[cypher-deprecations-additions-removals-compatibility]]
= Additions, deprecations, removals, and compatibility
:description: all of the features that have been removed, deprecated, added, or extended in different Cypher versions.
Expand All @@ -23,6 +23,55 @@
Features removed in Cypher 25 are still available on Neo4j 2025.06+ databases either by prepending a query with `CYPHER 5` or by having Cypher 5 as the default language for the database.
For more information, see xref:queries/select-version.adoc[].

[[cypher-deprecations-additions-removals-2026.05]]
== Neo4j 2026.05

=== New in Cypher 25

[cols="2", options="header"]
|===
| Feature
| Details

a|
label:functionality[]
label:new[]
[source, cypher]
----
UUID("")
----

a| Introduced a `UUID` value type that can be stored on properties of nodes and relationships.
For more information, see xref:values-and-types/uuid.adoc[Values and types -> UUID].

a|
label:functionality[]
label:new[]
[source, cypher]
----
RETURN
uuid() AS randomUUID,
uuid(42, 42) AS uuidFromInts,
uuid("") AS uuidFromString
----

a| New xref:functions/uuid.adoc#functions-uuid[`uuid()`] functions for the construction of xref:values-and-types/uuid.adoc[`UUID`] values.

a|
label:functionality[]
label:new[]
[source, cypher]
----
WITH UUID() AS UUID
RETURN
uuid.mostSignificantBits(UUID) AS mostSigBits,
uuid.leastSignificantBits(UUID) AS leastSigBits
----

a| New xref:functions/uuid.adoc#functions-uuid_mostSignificantBits[`uuid.mostSignificantBits()`] function and xref:functions/uuid.adoc#functions-uuid_mostSignificantBits[`uuid.leastSignificantBits()`] function, which return the most/least significant bits of a of a xref:values-and-types/uuid.adoc[`UUID`] value.

|===

[[cypher-deprecations-additions-removals-2026.03]]
== Neo4j 2026.03

Expand Down
31 changes: 31 additions & 0 deletions modules/ROOT/pages/functions/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,37 @@ There are two main types of functions that can be developed and used:
|===


[[header-query-functions-uuid]]
== UUID functions

UUID functions allow you to create UUID values and return their most/least significant types.

[options="header"]
|===
| Function | Signature | Description

1.1+| xref::functions/uuid.adoc#functions-uuid[`uuid()`]
| `uuid() :: UUID`
| Returns a randomly generate `UUID`. label:cypher[Cypher 25 only] label:new[Introduced in Neo4j 2026.05]

1.1+| xref::functions/uuid.adoc#functions-uuid[`uuid()`]
| `uuid(name :: STRING) :: UUID`
| The `STRING` to convert to a `UUID`, this should be 32 hexadecimal digits displayed in 5 groups, separated by 4 hyphens. label:cypher[Cypher 25 only] label:new[Introduced in Neo4j 2026.05]

1.1+| xref::functions/uuid.adoc#functions-uuid[`uuid()`]
| `uuid(mostSigBits :: INTEGER, leastSigBits :: INTEGER) :: UUID`
| Converts the given `INTEGER` values to a `UUID`. label:cypher[Cypher 25 only] label:new[Introduced in Neo4j 2026.05]

1.1+| xref::functions/uuid.adoc#functions-leastSignificantBits[`uuid.leastSignificantBits()`]
| `leastSignificantBits(uuid :: UUID) :: INTEGER`
| The `UUID` to return the least significant bits from. label:cypher[Cypher 25 only] label:new[Introduced in Neo4j 2026.05]

1.1+| xref::functions/uuid.adoc#functions-leastSignificantBits[`uuid.leastSignificantBits()`]
| `mostSignificantBits(uuid :: UUID) :: INTEGER`
| The `UUID` to return the most significant bits from. label:cypher[Cypher 25 only] label:new[Introduced in Neo4j 2026.05]

|===

[[header-query-functions-vector]]
== Vector functions

Expand Down
171 changes: 171 additions & 0 deletions modules/ROOT/pages/functions/uuid.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
:description: UUID functions allow you to create UUID values and check their most/least significant bits
:table-caption!:
= UUID functions

UUID functions allow you to construct xref:values-and-types/uuid.adoc[`UUID` values], and fetch the most/least significant bits of a UUID.

[role=label--new-Neo4j-2026.05 label--cypher-25-only]
[[functions-uuid]]
== uuid()

.Details
|===
| *Syntax* 3+| `uuid()`
| *Description* 3+| Returns a randomly generate `UUID`.
.1+| *Arguments* | *Name* | *Type* | *Description*
| *Returns* 3+| xref:values-and-types/uuid.adoc[`UUID`]
|===

.Details
|===
| *Syntax* 3+| `uuid(name :: STRING)`
| *Description* 3+| Converts the given `STRING` to a `UUID`.
.2+| *Arguments* | *Name* | *Type* | *Description*
| `name` | `STRING` | The `STRING` to convert to a `UUID`, this should be 32 hexadecimal digits displayed in 5 groups, separated by 4 hyphens.
| *Returns* 3+| xref:values-and-types/uuid.adoc[`UUID`]
|===

.Details
|===
| *Syntax* 3+| `uuid(mostSigBits :: INTEGER, leastSigBits :: INTEGER)`
| *Description* 3+| Converts the given `INTEGER` values to a `UUID`.
.3+| *Arguments* | *Name* | *Type* | *Description*
| `mostSigBits` | `INTEGER` | The most significant bits.
| `leastSigBits` | `INTEGER` | The least significant bits.
| *Returns* 3+| xref:values-and-types/uuid.adoc[`UUID`]
|===

.Considerations
|===

| The randomly generated `UUID` value not intended for cryptographic use.
| `UUID` values can be xref:values-and-types/uuid.adoc#store-uuid-properties[stored as properties].
| If a `STRING` is used in `name`, it must be 32 hexadecimal digits displayed in 5 groups, separated by 4 hyphens.
| A `null` `name`, `mostSigBits` or `leastSigBits` will return `null`.
|===

.Construct a `UUID` value
====

.Query
[source, cypher]
----
RETURN uuid() AS randomUUID
----

.Result
[role="queryresult",options="header,footer",cols="1*<m"]
|===
| randomUUID

| UUID("550e8400-e29b-41d4-a716-446655440000")

1+d|Rows: 1
|===

====

.Construct a `UUID` value with a `STRING` value
====

.Query
[source, cypher]
----
RETURN uuid("550e8400-e29b-41d4-a716-446655440000") AS uuid
----

.Result
[role="queryresult",options="header,footer",cols="1*<m"]
|===
| uuid

| uuid("550e8400-e29b-41d4-a716-446655440000")

1+d|Rows: 1
|===

====

.Construct a `UUID` value with two `INTEGER` values
====

.Query
[source, cypher]
----
RETURN uuid(42, 42) AS uuid
----

.Result
[role="queryresult",options="header,footer",cols="1*<m"]
|===
| uuid

| uuid("00000000-0000-002a-0000-00000000002a")

1+d|Rows: 1
|===

====

.`null` values
====

.Query
[source, cypher]
----
RETURN uuid(null) AS nullUUIDValue,
uuid(42, null) AS nullMostSigBits,
uuid(null, 42) AS nullLeastSigBits,
uuid(null, null) AS nullMostLeastSigBits
----

.Result
[role="queryresult",options="header,footer",cols="4*<m"]
|===
| nullUUIDValue | nullMostSigBits | nullLeastSigBits | nullMostLeastSigBits

| null | null | null | null

4+d|Rows: 1
|===

====


[[functions-mostSignificantBits]]
== uuid.mostSignificantBits()

.Details
|===
| *Syntax* 3+| `uuid.mostSignificantBits(uuid)`
| *Description* 3+| Returns the most significant bits from the given `UUID`.
.2+| *Arguments* | *Name* | *Type* | *Description*
| `uuid` | `UUID` | The `UUID` to return the most significant bits from.
| *Returns* 3+| `INTEGER`
|===

.Considerations
|===

| `uuid.mostSignificantBits(null)` returns `null`.

|===

[[functions-leastSignificantBits]]
== uuid.leastSignificantBits()

.Details
|===
| *Syntax* 3+| `uuid.leastSignificantBits(uuid)`
| *Description* 3+| Returns the least significant bits from the given `UUID`.
.2+| *Arguments* | *Name* | *Type* | *Description*
| `uuid` | `UUID` | The `UUID` to return the least significant bits from.
| *Returns* 3+| `INTEGER`
|===

.Considerations
|===

| `uuid.leastSignificantBits(null)` returns `null`.

|===
Loading
Loading