ActiveRel¶
Makes Neo4j Relationships more or less act like ActiveRecord objects. See documentation at https://github.com/neo4jrb/neo4j/wiki/Neo4j%3A%3AActiveRel
Constants¶
- WRAPPED_CLASSES
- N1_N2_STRING
- ACTIVEREL_NODE_MATCH_STRING
- USES_CLASSNAME
Files¶
- lib/neo4j/active_rel.rb:4
- lib/neo4j/active_rel/query.rb:1
- lib/neo4j/active_rel/types.rb:2
- lib/neo4j/active_rel/property.rb:1
- lib/neo4j/active_rel/callbacks.rb:2
- lib/neo4j/active_rel/initialize.rb:1
- lib/neo4j/active_rel/persistence.rb:1
- lib/neo4j/active_rel/validations.rb:2
- lib/neo4j/active_rel/related_node.rb:1
Methods¶
#==
- #[]
Returning nil when we get ActiveAttr::UnknownAttributeError from ActiveAttr
+ show/hide code
#_active_record_destroyed_behavior?
- #_destroyed_double_check?
These two methods should be removed in 6.0.0
+ show/hide code
- #_persisted_obj
Returns the value of attribute _persisted_obj
+ show/hide code
#apply_default_values
- #association_proxy_cache
Should probably find a way to not need this
+ show/hide code
#cache_key
#declared_property_manager
- #destroy
nodoc:
- #destroyed?
Returns +true+ if the object was destroyed.
+ show/hide code
#end_node
#eql?
#exist?
#freeze
#from_node_neo_id
#frozen?
#hash
#id
- #init_on_load
called when loading the rel from the database
+ show/hide code
#initialize
#inspect
#neo4j_obj
#neo_id
- #new?
Returns +true+ if the record hasn’t been saved to Neo4j yet.
+ show/hide code
- #new_record?
Returns +true+ if the record hasn’t been saved to Neo4j yet.
+ show/hide code
#node_cypher_representation
- #persisted?
Returns +true+ if the record is persisted, i.e. it’s not a new record and it was not destroyed
+ show/hide code
#props
- #read_attribute
Returning nil when we get ActiveAttr::UnknownAttributeError from ActiveAttr
+ show/hide code
- #read_attribute_for_validation
Implements the ActiveModel::Validation hook method.
+ show/hide code
#rel_type
#reload
#reload_from_database
#save
#save!
#send_props
#serializable_hash
#serialized_properties
#start_node
- #to_key
Returns an Enumerable of all (primary) key attributes or nil if model.persisted? is false
+ show/hide code
#to_node_neo_id
- #touch
nodoc:
#type
- #update
Updates this resource with all the attributes from the passed-in Hash and requests that the record be saved. If saving fails because the resource is invalid then false will be returned.
+ show/hide code
- #update!
Same as {#update_attributes}, but raises an exception if saving fails.
+ show/hide code
- #update_attribute
Convenience method to set attribute and #save at the same time
+ show/hide code
- #update_attribute!
Convenience method to set attribute and #save! at the same time
+ show/hide code
- #update_attributes
Updates this resource with all the attributes from the passed-in Hash and requests that the record be saved. If saving fails because the resource is invalid then false will be returned.
+ show/hide code
- #update_attributes!
Same as {#update_attributes}, but raises an exception if saving fails.
+ show/hide code
#valid?
- #wrapper
Implements the Neo4j::Node#wrapper and Neo4j::Relationship#wrapper method so that we don’t have to care if the node is wrapped or not.
+ show/hide code