Sha256: c7d545d994e2d2be2c8437a077c6873337b9dc879ad4d24ba5b6e729b87cd82c

Contents?: true

Size: 708 Bytes

Versions: 40

Compression:

Stored size: 708 Bytes

Contents

require 'neo4j/core/cypher_session/transactions'

module Neo4j
  module Core
    class CypherSession
      module Transactions
        class Bolt < Base
          def initialize(*args)
            super

            tx_query('BEGIN') if root?
          end

          def commit
            tx_query('COMMIT') if root?
          end

          def delete
            tx_query('ROLLBACK')
          end

          def started?
            true
          end

          private

          def tx_query(cypher)
            query = Adaptors::Base::Query.new(cypher, {}, cypher)
            adaptor.send(:query_set, self, [query], skip_instrumentation: true)
          end
        end
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
neo4j-core-9.0.0 lib/neo4j/core/cypher_session/transactions/bolt.rb
neo4j-core-9.0.0.alpha.1 lib/neo4j/core/cypher_session/transactions/bolt.rb
neo4j-core-8.1.4 lib/neo4j/core/cypher_session/transactions/bolt.rb
neo4j-core-8.1.3 lib/neo4j/core/cypher_session/transactions/bolt.rb
neo4j-core-8.1.2 lib/neo4j/core/cypher_session/transactions/bolt.rb
neo4j-core-8.1.1 lib/neo4j/core/cypher_session/transactions/bolt.rb
neo4j-core-8.1.0 lib/neo4j/core/cypher_session/transactions/bolt.rb
neo4j-core-8.0.4 lib/neo4j/core/cypher_session/transactions/bolt.rb
neo4j-core-8.0.3 lib/neo4j/core/cypher_session/transactions/bolt.rb
neo4j-core-8.0.2 lib/neo4j/core/cypher_session/transactions/bolt.rb
neo4j-core-8.0.1 lib/neo4j/core/cypher_session/transactions/bolt.rb
neo4j-core-7.2.4 lib/neo4j/core/cypher_session/transactions/bolt.rb
neo4j-core-8.0.0 lib/neo4j/core/cypher_session/transactions/bolt.rb
neo4j-core-7.2.3 lib/neo4j/core/cypher_session/transactions/bolt.rb
neo4j-core-7.2.2 lib/neo4j/core/cypher_session/transactions/bolt.rb
neo4j-core-7.2.1 lib/neo4j/core/cypher_session/transactions/bolt.rb
neo4j-core-7.2.0 lib/neo4j/core/cypher_session/transactions/bolt.rb
neo4j-core-7.1.2 lib/neo4j/core/cypher_session/transactions/bolt.rb
neo4j-core-7.0.9 lib/neo4j/core/cypher_session/transactions/bolt.rb
neo4j-core-7.1.1 lib/neo4j/core/cypher_session/transactions/bolt.rb