Sha256: 565a0a33f81a7403ab821c5d4032bba9a5e6a8c23ebcf2d9e0f832640a27fe9b

Contents?: true

Size: 637 Bytes

Versions: 4

Compression:

Stored size: 637 Bytes

Contents

module Neo4j::Shared
  # 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.
  module SerializedProperties
    extend ActiveSupport::Concern

    def serialized_properties
      self.class.serialized_properties
    end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
neo4j-5.0.0 lib/neo4j/shared/serialized_properties.rb
neo4j-5.0.0.rc.3 lib/neo4j/shared/serialized_properties.rb
neo4j-5.0.0.rc.2 lib/neo4j/shared/serialized_properties.rb
neo4j-5.0.0.rc.1 lib/neo4j/shared/serialized_properties.rb