Skip to content

Commit

Permalink
allow for Neography::Node.create_unique
Browse files Browse the repository at this point in the history
  • Loading branch information
karabijavad committed Nov 28, 2013
1 parent ae0725b commit 8e33ad7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/neography/node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ def create(props = nil, db = Neography::Rest.new)
node
end

def create_unique(index, key, value, props = nil, db = Neography::Rest.new)
raise ArgumentError.new("syntax deprecated") if props.is_a?(Neography::Rest)

node = self.new(db.create_unique_node(index, key, value, props))
node.neo_server = db
node
end

def load(node, db = Neography::Rest.new)
raise ArgumentError.new("syntax deprecated") if node.is_a?(Neography::Rest)
node = node.first if node.kind_of?(Array)
Expand Down

0 comments on commit 8e33ad7

Please sign in to comment.