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-7.1.0 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.0.8 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.0.7 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.0.6 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.0.5 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.0.4 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.0.3 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.0.2 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.0.1 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.0.0 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.0.0.rc.2 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.0.0.rc.1 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.0.0.alpha.8 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.0.0.alpha.7 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.0.0.alpha.6 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.0.0.alpha.5 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.0.0.alpha.4 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.0.0.alpha.3 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.0.0.alpha.2 lib/neo4j/core/cypher_session/transactions/embedded.rb
neo4j-core-7.0.0.alpha.1 lib/neo4j/core/cypher_session/transactions/embedded.rb