Module: Neo4j::Shared::SerializedProperties

Extended by:
ActiveSupport::Concern
Included in:
ActiveNode, ActiveRel
Defined in:
lib/neo4j/shared/serialized_properties.rb

Overview

This module adds the ‘serialize` class method. It lets you store hashes and arrays in Neo4j properties. Be aware that you won’t be able to search within serialized properties and stuff use indexes. If you do a regex search for portion of a string property, the search happens in Cypher and you may take a performance hit.

See type_converters.rb for the serialization process.

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#serializable_hash(*args) ⇒ Object



14
15
16
# File 'lib/neo4j/shared/serialized_properties.rb', line 14

def serializable_hash(*args)
  super.merge(id: id)
end

#serialized_propertiesObject



10
11
12
# File 'lib/neo4j/shared/serialized_properties.rb', line 10

def serialized_properties
  self.class.serialized_properties
end