Class: Neo4j::Driver::Bolt::Protocol::V6
Overview
Bolt 6.0. HELLO / LOGON / TELEMETRY shapes are unchanged vs 5.8; the major bump exists to (a) gate the manifest as the only supported negotiation path and (b) introduce two new server-pushed struct types in result records:
- VECTOR 0x56 — packed numeric array; 2 fields
(element-type byte, raw bytes).
- UNSUPPORTED 0x3F — forward-compat marker; 4 fields
(name, min_major, min_minor, extra-map whose
optional `message` key carries a server note).
UNSUPPORTED hydrates to Types::UnsupportedType (Feature:API:Type. UnsupportedType). VECTOR stays a plain hash — Feature:API:Type.Vector is unimplemented, so the goal there is still just "don't crash at hydration" until there's a public API to wire it to.
Direct Known Subclasses
Constant Summary collapse
- VECTOR_SIGNATURE =
0x56- UNSUPPORTED_SIGNATURE =
0x3F
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from V54
Methods inherited from V53
Methods inherited from V52
#notification_config_extra, #supports_notification_filtering?
Methods inherited from V51
#build_logon_message, #hello_extra, #supports_re_auth?
Methods inherited from V5
#configure_packer, #patch_bolt_extra
Methods inherited from V44
#build_route, #supports_impersonation?
Methods inherited from V43
#hello_extra, #patch_bolt_extra
Methods inherited from V4
#build_route, #supports_multiple_databases?
Methods inherited from Base
#build_begin, #build_discard, #build_hello_message, #build_logon_message, #build_pull, #build_run, #build_telemetry, #configure_packer, #enforce_impersonation_support!, #hello_extra, #initialize, #notification_config_extra, #pack_uuid, #supports_impersonation?, #supports_multiple_databases?, #supports_notification_filtering?, #supports_re_auth?, #supports_telemetry?, #unpack_uuid
Constructor Details
This class inherits a constructor from Neo4j::Driver::Bolt::Protocol::Base
Instance Method Details
#customize_hydration(unpacker) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/neo4j/driver/bolt/protocol/v6.rb', line 25 def customize_hydration(unpacker) super unpacker.register_hydration_handler(VECTOR_SIGNATURE) do |fields| { element_type: fields[0], bytes: fields[1] } end unpacker.register_hydration_handler(UNSUPPORTED_SIGNATURE) do |fields| # fields[3] is an extra map (symbol keys) whose :message is the # optional server note. Guard the type so a malformed/absent # 4th field can't crash hydration — the whole point of a # forward-compat marker is to survive the unexpected. extra = fields[3].is_a?(Hash) ? fields[3] : {} Types::UnsupportedType.new(fields[0], fields[1], fields[2], extra[:message]) end end |