Skip to content

Commit

Permalink
Merge pull request maxdemarzi#30 from kamranjon/relations
Browse files Browse the repository at this point in the history
making all relationship queries return outgoing direction
  • Loading branch information
kamranjon committed Aug 28, 2013
2 parents cbbc012 + 362aa55 commit f561283
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/deja/bridge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ def get_relationship(index_or_id)
end

def rels_from_index(index)
cypher { node.ret - lookup_rel(index[:index], index[:key], index[:value]).ret - node.ret.limit(1) }
cypher { node.ret > lookup_rel(index[:index], index[:key], index[:value]).ret > node.ret }
end

def rels_from_id(id, opts = {})
cypher { node.ret - rel(id).ret - node.ret.limit(1) }
cypher { node.ret > rel(id).ret > node.ret }
end

def update_relationship(index_or_id, opts = {})
Expand Down

0 comments on commit f561283

Please sign in to comment.