Skip to content

Commit

Permalink
Merge pull request maxdemarzi#35 from kamranjon/relations
Browse files Browse the repository at this point in the history
adding method to query for between rel search
  • Loading branch information
kamranjon committed Aug 30, 2013
2 parents a6c2657 + 38deb0e commit e7e2087
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/deja/query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ def load_relationship_from_nodes(start_node, end_node, type)
normalize(result_hash)
end

def load_relationship_from_node_indexes(start_node, end_node, type)
cypher_query = Deja::Bridge.get_relationship_from_node_indexes(start_node, end_node, type)
result_hash = Deja.execute_cypher(cypher_query)
normalize(result_hash)
end

def create_relationship(start_node, end_node, label, attributes = {})
cypher_query = Deja::Bridge.create_relationship(start_node, end_node, label, attributes)
result_hash = Deja.execute_cypher(cypher_query)
Expand Down

0 comments on commit e7e2087

Please sign in to comment.