lib/neo4j/active_base.rb in neo4j-10.0.0.pre.alpha.3 vs lib/neo4j/active_base.rb in neo4j-10.0.0.pre.alpha.4

- old
+ new

@@ -26,26 +26,26 @@ verbose_query_logs = Neo4j::Config.fetch(:verbose_query_logs, false) Neo4j::Core::Driver .new(url, options.merge(verbose_query_logs: verbose_query_logs)) end - def current_transaction_or_session + def transaction current_transaction || Transaction end def query(*args) - current_transaction_or_session.query(*args) + transaction.query(*args) end # Should support setting driver via config options def driver=(driver) @driver&.close @driver = driver end def run_transaction(run_in_tx = true) - Neo4j::Transaction.run(current_driver, run_in_tx) do |tx| + Transaction.run(current_driver, run_in_tx) do |tx| yield tx end end def new_transaction @@ -66,10 +66,10 @@ end end def current_transaction validate_model_schema! - Neo4j::Transaction.root + Transaction.root end def label_object(label_name) Neo4j::Core::Label.new(label_name) end