Class: Neography::Rest
- Inherits:
-
Object
- Object
- Neography::Rest
- Extended by:
- Forwardable
- Includes:
- Auth, Batch, Clean, Constraints, Cypher, Extensions, Gremlin, Helpers, NodeAutoIndexes, NodeIndexes, NodeLabels, NodePaths, NodeProperties, NodeRelationships, NodeTraversal, Nodes, OtherNodeRelationships, RelationshipAutoIndexes, RelationshipIndexes, RelationshipProperties, RelationshipTypes, Relationships, SchemaIndexes, Spatial, Transactions
- Defined in:
- lib/neography/rest.rb,
lib/neography/rest/auth.rb,
lib/neography/rest/batch.rb,
lib/neography/rest/clean.rb,
lib/neography/rest/nodes.rb,
lib/neography/rest/cypher.rb,
lib/neography/rest/gremlin.rb,
lib/neography/rest/helpers.rb,
lib/neography/rest/spatial.rb,
lib/neography/rest/extensions.rb,
lib/neography/rest/node_paths.rb,
lib/neography/rest/constraints.rb,
lib/neography/rest/node_labels.rb,
lib/neography/rest/node_indexes.rb,
lib/neography/rest/transactions.rb,
lib/neography/rest/relationships.rb,
lib/neography/rest/node_traversal.rb,
lib/neography/rest/schema_indexes.rb,
lib/neography/rest/node_properties.rb,
lib/neography/rest/node_auto_indexes.rb,
lib/neography/rest/node_relationships.rb,
lib/neography/rest/relationship_types.rb,
lib/neography/rest/relationship_indexes.rb,
lib/neography/rest/relationship_properties.rb,
lib/neography/rest/other_node_relationships.rb,
lib/neography/rest/relationship_auto_indexes.rb
Defined Under Namespace
Modules: Auth, Batch, Clean, Constraints, Cypher, Extensions, Gremlin, Helpers, NodeAutoIndexes, NodeIndexes, NodeLabels, NodePaths, NodeProperties, NodeRelationships, NodeTraversal, Nodes, OtherNodeRelationships, RelationshipAutoIndexes, RelationshipIndexes, RelationshipProperties, RelationshipTypes, Relationships, SchemaIndexes, Spatial, Transactions
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
Instance Method Summary collapse
- #delete_node!(id) ⇒ Object
- #get_relationship_end_node(rel) ⇒ Object
-
#get_relationship_start_node(rel) ⇒ Object
relationships.
-
#initialize(options = {}) ⇒ Rest
constructor
A new instance of Rest.
Methods included from Clean
Methods included from Helpers
#encode, #escape, #get_id, #json_content_type, #parse_depth, #parse_direction, #parse_order, #parse_type, #parse_uniqueness
Methods included from Spatial
#add_editable_layer, #add_geometry_to_layer, #add_node_to_layer, #add_node_to_spatial_index, #add_point_layer, #create_spatial_index, #edit_geometry_from_layer, #find_geometries_in_bbox, #find_geometries_within_distance, #get_layer, #get_spatial
Methods included from Extensions
#get_extension, #post_extension
Methods included from Batch
Methods included from Gremlin
Methods included from Cypher
Methods included from NodePaths
#get_path, #get_paths, #get_shortest_weighted_path
Methods included from NodeTraversal
Methods included from RelationshipAutoIndexes
#add_relationship_auto_index_property, #find_relationship_auto_index, #find_relationship_auto_index_by_value, #get_relationship_auto_index, #get_relationship_auto_index_properties, #get_relationship_auto_index_status, #query_relationship_auto_index, #remove_relationship_auto_index_property, #set_relationship_auto_index_status
Methods included from RelationshipIndexes
#add_relationship_to_index, #create_or_fail_unique_relationship, #create_relationship_auto_index, #create_relationship_index, #create_unique_relationship, #drop_relationship_index, #find_relationship_index, #find_relationship_index_by_key_value, #find_relationship_index_by_query, #get_or_create_unique_relationship, #get_relationship_index, #list_relationship_indexes, #remove_relationship_from_index, #remove_relationship_index_by_id, #remove_relationship_index_by_key, #remove_relationship_index_by_value
Methods included from NodeAutoIndexes
#add_node_auto_index_property, #find_node_auto_index, #find_node_auto_index_by_value, #get_node_auto_index, #get_node_auto_index_properties, #get_node_auto_index_status, #query_node_auto_index, #remove_node_auto_index_property, #set_node_auto_index_status
Methods included from NodeIndexes
#add_node_to_index, #create_node_auto_index, #create_node_index, #create_or_fail_unique_node, #create_unique_node, #drop_node_index, #find_node_index, #find_node_index_by_key_value, #find_node_index_by_query, #get_node_index, #get_or_create_unique_node, #list_node_indexes, #remove_node_from_index, #remove_node_index_by_id, #remove_node_index_by_key, #remove_node_index_by_value
Methods included from OtherNodeRelationships
Methods included from NodeRelationships
#create_relationship, #get_node_relationships
Methods included from RelationshipProperties
#get_each_relationship_properties, #get_relationship_properties, #remove_each_relationship_properties, #remove_relationship_properties, #reset_relationship_properties, #set_relationship_properties
Methods included from Relationships
#delete_relationship, #get_relationship
Methods included from NodeProperties
#get_each_node_properties, #get_node_properties, #remove_each_node_properties, #remove_node_properties, #reset_node_properties, #set_node_properties
Methods included from Nodes
#create_empty_node, #create_node, #create_node_with_attributes, #create_nodes, #create_nodes_threaded, #delete_node, #get_node, #get_nodes, #get_root
Methods included from Transactions
#begin_transaction, #commit_transaction, #in_transaction, #keep_transaction, #rollback_transaction
Methods included from Constraints
#create_unique_constraint, #drop_constraint, #get_constraints, #get_unique_constraint, #get_uniqueness
Methods included from SchemaIndexes
#create_schema_index, #delete_schema_index, #get_schema_index
Methods included from NodeLabels
#add_label, #delete_label, #find_nodes_labeled, #get_node_labels, #get_nodes_labeled, #list_labels, #set_label
Methods included from RelationshipTypes
Methods included from Auth
Constructor Details
#initialize(options = {}) ⇒ Rest
Returns a new instance of Rest.
65 66 67 |
# File 'lib/neography/rest.rb', line 65 def initialize( = {}) @connection = Connection.new() end |
Instance Attribute Details
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
61 62 63 |
# File 'lib/neography/rest.rb', line 61 def connection @connection end |
Instance Method Details
#delete_node!(id) ⇒ Object
74 75 76 77 78 79 80 81 |
# File 'lib/neography/rest.rb', line 74 def delete_node!(id) relationships = get_node_relationships(get_id(id)) relationships.each do |relationship| delete_relationship(relationship["self"].split('/').last) end unless relationships.nil? delete_node(id) end |
#get_relationship_end_node(rel) ⇒ Object
96 97 98 |
# File 'lib/neography/rest.rb', line 96 def get_relationship_end_node(rel) get_node(rel["end"]) end |
#get_relationship_start_node(rel) ⇒ Object
relationships
92 93 94 |
# File 'lib/neography/rest.rb', line 92 def get_relationship_start_node(rel) get_node(rel["start"]) end |