Skip to content

Commit

Permalink
allow for Neography::Relationship.create_unique
Browse files Browse the repository at this point in the history
  • Loading branch information
karabijavad committed Nov 29, 2013
1 parent 6674228 commit 80c863d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/neography/relationship.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ def create(type, from_node, to_node, props = nil)
rel
end

def create_unique(index, key, value, type, from_node, to_node, props = nil)
rel = Neography::Relationship.new(from_node.neo_server.create_unique_relationship(index, key, value, type, from_node, to_node, props))
rel.start_node = from_node
rel.end_node = to_node
rel.rel_type = type
rel
end

def load(rel, db = Neography::Rest.new)
raise ArgumentError.new("syntax deprecated") if rel.is_a?(Neography::Rest)

Expand Down

0 comments on commit 80c863d

Please sign in to comment.