lib/neo4j/migration.rb in neo4j-9.6.2 vs lib/neo4j/migration.rb in neo4j-10.0.0.pre.alpha.1
- old
+ new
@@ -26,11 +26,11 @@
def setup
FileUtils.mkdir_p('db/neo4j-migrate')
end
def query(*args)
- Neo4j::ActiveBase.current_session.query(*args)
+ Neo4j::ActiveBase.current_driver.query(*args)
end
class AddIdProperty < Neo4j::Migration
include Neo4j::Migrations::Helpers::IdProperty
@@ -113,10 +113,10 @@
# def id_batch_set(label, id_property, new_ids, count)
# tx = Neo4j::ActiveBase.new_transaction
- # Neo4j::ActiveBase.current_session.query("MATCH (n:`#{label}`) WHERE NOT EXISTS(n.#{id_property})
+ # Neo4j::ActiveBase.current_driver.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)