lib/neo4j/migration.rb in neo4j-7.0.2 vs lib/neo4j/migration.rb in neo4j-7.0.3

- old
+ new

@@ -73,11 +73,11 @@ end end end def idless_count(label, id_property) - Neo4j::Session.query.match(n: label).where("NOT has(n.#{id_property})").pluck('COUNT(n) AS ids').first + Neo4j::Session.query.match(n: label).where("NOT EXISTS(n.#{id_property})").pluck('COUNT(n) AS ids').first end def print_status(last_time_taken, max_per_batch, nodes_left) time_per_node = last_time_taken / max_per_batch if last_time_taken message = if time_per_node @@ -92,10 +92,10 @@ def id_batch_set(label, id_property, new_ids, count) tx = Neo4j::Transaction.new - Neo4j::Session.query("MATCH (n:`#{label}`) WHERE NOT has(n.#{id_property}) + Neo4j::Session.query("MATCH (n:`#{label}`) WHERE NOT EXISTS(n.#{id_property}) with COLLECT(n) as nodes, #{new_ids} as ids FOREACH(i in range(0,#{count - 1})| FOREACH(node in [nodes[i]]| SET node.#{id_property} = ids[i])) RETURN distinct(true)