Sha256: b57a54f0b3ed390748300b6d47681fc5c6515a45885943979145465bd5cd7442

Contents?: true

Size: 674 Bytes

Versions: 40

Compression:

Stored size: 674 Bytes

Contents

require 'neo4j/core/cypher_session/transactions'

module Neo4j
  module Core
    class CypherSession
      module Transactions
        class Embedded < Base
          def initialize(*args)
            super
            @java_tx = adaptor.graph_db.begin_tx
          end

          def commit
            return if !@java_tx

            @java_tx.success
            @java_tx.close
          rescue Java::OrgNeo4jGraphdb::TransactionFailureException => e
            raise CypherError, e.message
          end

          def delete
            return if !@java_tx

            @java_tx.failure
            @java_tx.close
          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/embedded.rb
neo4j-core-9.0.0.alpha.1 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-8.1.4 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-8.1.3 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-8.1.2 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-8.1.1 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-8.1.0 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-8.0.4 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-8.0.3 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-8.0.2 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-8.0.1 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.2.4 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-8.0.0 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.2.3 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.2.2 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.2.1 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.2.0 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.1.2 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.0.9 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.1.1 lib/neo4j/core/cypher_session/transactions/embedded.rb