Sha256: 79878782d95cf08b4e65166653b4453356099b96301ec629bdeecb1f3e96b667

Contents?: true

Size: 881 Bytes

Versions: 14

Compression:

Stored size: 881 Bytes

Contents

module Neo4j
  module Core
    class CypherSession
      module Transactions
        class Base < Neo4j::Transaction::Base
          def query(*args)
            options = if args[0].is_a?(::Neo4j::Core::Query)
                        args[1] ||= {}
                      else
                        args[1] ||= {}
                        args[2] ||= {}
                      end
            options[:transaction] ||= self

            adaptor.query(@session, *args)
          end

          def queries(options = {}, &block)
            adaptor.queries(@session, {transaction: self}.merge(options), &block)
          end

          private

          # Because we're inheriting from the old Transaction class
          # but the new adaptors work much like the old sessions
          def adaptor
            @session.adaptor
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
neo4j-core-7.0.3 lib/neo4j/core/cypher_session/transactions.rb
neo4j-core-7.0.2 lib/neo4j/core/cypher_session/transactions.rb
neo4j-core-7.0.1 lib/neo4j/core/cypher_session/transactions.rb
neo4j-core-7.0.0 lib/neo4j/core/cypher_session/transactions.rb
neo4j-core-7.0.0.rc.2 lib/neo4j/core/cypher_session/transactions.rb
neo4j-core-7.0.0.rc.1 lib/neo4j/core/cypher_session/transactions.rb
neo4j-core-7.0.0.alpha.8 lib/neo4j/core/cypher_session/transactions.rb
neo4j-core-7.0.0.alpha.7 lib/neo4j/core/cypher_session/transactions.rb
neo4j-core-7.0.0.alpha.6 lib/neo4j/core/cypher_session/transactions.rb
neo4j-core-7.0.0.alpha.5 lib/neo4j/core/cypher_session/transactions.rb
neo4j-core-7.0.0.alpha.4 lib/neo4j/core/cypher_session/transactions.rb
neo4j-core-7.0.0.alpha.3 lib/neo4j/core/cypher_session/transactions.rb
neo4j-core-7.0.0.alpha.2 lib/neo4j/core/cypher_session/transactions.rb
neo4j-core-7.0.0.alpha.1 lib/neo4j/core/cypher_session/transactions.rb