lib/grumlin/repository/instance_methods.rb in grumlin-0.20.1 vs lib/grumlin/repository/instance_methods.rb in grumlin-0.20.2
- old
+ new
@@ -54,11 +54,11 @@
def upsert_vertex(label, id, create_properties: {}, update_properties: {}, on_failure: :retry, **params)
with_upsert_error_handling(on_failure, params) do
create_properties, update_properties = cleanup_properties(create_properties, update_properties)
- g.upsertV(label, id, create_properties, update_properties).next
+ g.upsertV(label, id, create_properties, update_properties).id.next
end
end
# vertices:
# [["label", "id", {create: :properties}, {update: properties}]]
@@ -68,21 +68,21 @@
with_upsert_error_handling(on_failure, params) do
slice.reduce(g) do |t, (label, id, create_properties, update_properties)|
create_properties, update_properties = cleanup_properties(create_properties, update_properties)
t.upsertV(label, id, create_properties, update_properties)
- end.iterate
+ end.id.iterate
end
end
end
# Only from and to are used to find the existing edge, if one wants to assign an id to a created edge,
# it must be passed as T.id in create_properties.
def upsert_edge(label, from:, to:, create_properties: {}, update_properties: {}, on_failure: :retry, **params) # rubocop:disable Metrics/ParameterLists
with_upsert_error_handling(on_failure, params) do
create_properties, update_properties = cleanup_properties(create_properties, update_properties, T.label)
- g.upsertE(label, from, to, create_properties, update_properties).next
+ g.upsertE(label, from, to, create_properties, update_properties).id.next
end
end
# edges:
# [["label", "from", "to", {create: :properties}, {update: properties}]]
@@ -92,10 +92,10 @@
with_upsert_error_handling(on_failure, params) do
slice.reduce(g) do |t, (label, from, to, create_properties, update_properties)|
create_properties, update_properties = cleanup_properties(create_properties, update_properties, T.label)
t.upsertE(label, from, to, create_properties, update_properties)
- end.iterate
+ end.id.iterate
end
end
end
private