module Neo4j::Shared::Identity
Public Instance Methods
==(other)
click to toggle source
# File lib/neo4j/shared/identity.rb 3 def ==(other) 4 other.class == self.class && other.id == id 5 end
Also aliased as: eql?
hash()
click to toggle source
# File lib/neo4j/shared/identity.rb 24 def hash 25 id.hash 26 end
id()
click to toggle source
# File lib/neo4j/shared/identity.rb 19 def id 20 id = neo_id 21 id.is_a?(Integer) ? id : nil 22 end
neo_id()
click to toggle source
@return [Integer, nil] the neo4j id of the node if persisted or nil
# File lib/neo4j/shared/identity.rb 15 def neo_id 16 _persisted_obj ? _persisted_obj.neo_id : nil 17 end
to_key()
click to toggle source
Returns an Enumerable of all (primary) key attributes or nil if model.persisted? is false
# File lib/neo4j/shared/identity.rb 10 def to_key 11 _persisted_obj ? [id] : nil 12 end