Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
21 changes: 19 additions & 2 deletions modules/ROOT/pages/bolt-compatibility.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

= Bolt Protocol and Neo4j compatibility

:fn-version-plus: pass:c,q[footnote:calver[`+` includes all newer versions until further notice. \
At some point, the server might drop support for older Bolt versions, but there's no plan or guarantee for when or if that will happen. \
As soon as a decision is made, it will be documented here.]]

== Bolt 6.x

[cols="^,^",options="header"]
|===
| Neo4j version
| Bolt `6.0`

| `2025.08`+{fn-version-plus}
| `x`

|===

== Bolt 5.x

[cols="^,^,^,^,^,^,^,^,^,^",options="header"]
Expand Down Expand Up @@ -85,7 +101,7 @@
|
|

| `5.26`+
| `5.26`+{fn-version-plus}
| `x`
| `x`
| `x`
Expand All @@ -98,6 +114,7 @@

|===

[NOTE]
Bolt version 5.5 is not used, and no Neo4j server will ever negotiate it.

== Bolt 4.x
Expand Down Expand Up @@ -148,7 +165,7 @@ Bolt version 5.5 is not used, and no Neo4j server will ever negotiate it.
| `(x)`
| `x`

| `5.0`+
| `5.0`+{fn-version-plus}
| `(x)`
| `(x)`
| `(x)`
Expand Down
9 changes: 7 additions & 2 deletions modules/ROOT/pages/bolt/message.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2130,6 +2130,11 @@ RECORD [{"point": [1, 2]}, "example_data", 123]
The sections below list the changes of messages compared to the previous version.
Please also check for changes in xref:./structure-semantics.adoc#structure-summary[Structure Semantics].

[[messages-summary-6]]
=== Version 6.0

** No changes from version 5.8

[[messages-summary-58]]
=== Version 5.8

Expand All @@ -2153,7 +2158,7 @@ Please also check for changes in xref:./structure-semantics.adoc#structure-summa
[[messages-summary-55]]
=== Version 5.5
[WARNING]
.Unsupported (and undocumented 😏) protocol version
.Unsupported (and undocumented 😏) protocol version
====
Version 5.5 was only ever released in some drivers, but has a flawed design.
No Neo4j server will negotiate this protocol version.
Expand Down Expand Up @@ -2182,7 +2187,7 @@ No Neo4j server will negotiate this protocol version.
** `LOGOFF` message has been added.

[[messages-summary-5]]
=== Version 5
=== Version 5.0

** No changes from version 4.4

Expand Down
44 changes: 40 additions & 4 deletions modules/ROOT/pages/bolt/structure-semantics.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ The table below lists the PackStream specified structures and their code and tag
| `Y`
| `59`

| <<structure-vector, `Vector`>>
| `V`
| `56`

3+| *Legacy Structures*

| <<structure-legacy-datetime, `Legacy DateTime`>>
Expand All @@ -83,7 +87,7 @@ The table below lists the PackStream specified structures and their code and tag

A snapshot of a node within a graph database.

_The `element_id` field was added with version *5.0* and does not exist in earlier versions._
The `element_id` field was added with version *5.0* and does not exist in earlier versions. label:new[Introduced in bolt 5.0]

*tag byte:* `4E`

Expand Down Expand Up @@ -116,7 +120,7 @@ B4 4E

A snapshot of a relationship within a graph database.

_The fields `element_id`, `start_node_element_id`, and `end_node_element_id` were added with version *5.0* and do not exist in earlier versions._
The fields `element_id`, `start_node_element_id`, and `end_node_element_id` were added with version *5.0* and do not exist in earlier versions. label:new[Introduced in bolt 5.0]

*tag byte:* `52`

Expand Down Expand Up @@ -158,7 +162,7 @@ B8 52
A relationship without start or end node ID.
It is used internally for Path serialization.

_The `element_id` field was added with version *5.0* and does not exist in earlier versions._
The `element_id` field was added with version *5.0* and does not exist in earlier versions. label:new[Introduced in bolt 5.0]

*tag byte:* `72`

Expand Down Expand Up @@ -275,6 +279,7 @@ Where the `nanoseconds` are nanoseconds since midnight.

[[structure-datetime]]
=== `DateTime`
label:new[Introduced in bolt 5.0]

An instant capturing the date, the time, and the time zone.
The time zone information is specified with a zone offset.
Expand Down Expand Up @@ -321,6 +326,7 @@ The deserialization of such a `DateTime` structure expectedly happens in reverse

[[structure-datetimezoneid]]
=== `DateTimeZoneId`
label:new[Introduced in bolt 5.0]

An instant capturing the date, the time, and the time zone.
The time zone information is specified with a zone identifier.
Expand Down Expand Up @@ -458,10 +464,35 @@ Point3D::Structure(

Where the `srid` is a _Spatial Reference System Identifier_.

[[structure-vector]]
=== `Vector`
label:new[Introduced in bolt 6.0]

An ordered collection of homogeneous types.

*tag byte:* `56`

*Number of fields:* 2
----
Vector::Structure(
type_marker::Bytes,
data::Bytes,
)
----

* `type_marker` specifies the inner type of the vector:
** `C8` for `8-bit signed integer`
** `C9` for `16-bit signed integer` (in big-endian order)
** `CA` for `32-bit signed integer` (in big-endian order)
** `C6` for `32-bit floating point value` (IEEE-754 single precision representation)
** `C1` for `64-bit floating point value` (IEEE-754 double precision representation)
* `data` is a sequence of values encoded as specified in `type_marker`.

== Legacy Structures

[[structure-legacy-datetime]]
=== `Legacy DateTime`
label:deprecated[Removed after bolt 4.4]

An instant capturing the date, the time, and the time zone.
The time zone information is specified with a zone offset.
Expand Down Expand Up @@ -509,6 +540,7 @@ The deserialization of such a `DateTime` structure expectedly happens in reverse

[[structure-legacy-datetimezoneid]]
=== `Legacy DateTimeZoneId`
label:deprecated[Removed after bolt 4.4]

An instant capturing the date, the time, and the time zone.
The time zone information is specified with a zone identifier.
Expand Down Expand Up @@ -589,7 +621,11 @@ Since `DateTimeZoneId` does not include the timezone offset, the resolution of t
The sections below list the changes of structure semantics in versions where they changed.
Please also check for changes in xref:./message.adoc#messages-summary[Bolt Messages].

[[structure-summary-5]]
[[structure-summary-60]]
=== Version 6.0
** The <<structure-vector, `Vector`>> structure was added.

Comment on lines 591 to 668
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to hold to see if we will go with preview release of the protocol.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If team networking prefers to hold back the docs until the protocol has been released into the wild server-side (remember, drivers are already out - albeit in alpha phase), then I'm happy to wait with merging this PR until then.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The protocol is there, but it might not be enabled by default.

[[structure-summary-50]]
=== Version 5.0

** The `element_id` field was added to <<structure-node>>.
Expand Down