Click or drag to resize

ITransaction Interface

Represents a transaction in the Neo4j database. This interface may seem surprising in that it does not have explicit Commit or Rollback methods. It is designed to minimize the complexity of the code you need to write to use transactions in a safe way, ensuring that transactions are properly rolled back even if there is an exception while the transaction is running.

Namespace:  Neo4j.Driver
Assembly:  Neo4j.Driver.Simple (in Neo4j.Driver.Simple.dll) Version: 4.1.0
Syntax
public interface ITransaction : IQueryRunner, 
	IDisposable

The ITransaction type exposes the following members.

Properties
  NameDescription
Public propertyTransactionConfig
Gets the transaction configuration.
Top
Methods
  NameDescription
Public methodCommit
Mark this transaction as successful. You must call this method before calling Dispose to have your transaction committed.
Public methodDispose (Inherited from IDisposable.)
Public methodRollback
Mark this transaction as failed. Calling Dispose will roll back the transaction. Marking a transaction as failed is irreversible and guarantees that subsequent calls to Commit will not change it's status.
Public methodRun(String)
Run a query and return a result stream. This method accepts a String representing a Cypher query which will be compiled into a query object that can be used to efficiently execute this query multiple times.
(Inherited from IQueryRunner.)
Public methodRun(Query)
Execute a query and return a result stream.
(Inherited from IQueryRunner.)
Public methodRun(String, IDictionaryString, Object)
Run a query and return a result stream. This method accepts a String representing a Cypher query which will be compiled into a query object that can be used to efficiently execute this query multiple times. This method optionally accepts a set of parameters which will be injected into the query object query by Neo4j.
(Inherited from IQueryRunner.)
Public methodRun(String, Object)
Execute a query and return a result stream.
(Inherited from IQueryRunner.)
Top
See Also