[« Documentation Home](Documentation.md)

# Transaction Class

Represents a transaction which can encapsulate multiple Cypher queries. _Requires Neo4j 2.0.0-M03 or greater_

**[Properties](#properties)**

* [expires](#expires)
* [errorHandler](#errorhandler)

**[Methods](#methods)**

* [commit](#commit)
* [execute](#execute)
* [query](#query)
* [reset](#reset)
* [rollback](#rollback)

## Constructor

//

## Properties

### errorHandler

```scala
(Function) Transaction.errorHandler
```

_Default: null_

Allows all errors to flow through a centralized handler function, instead of being sent to all of the individual query callbacks. Note that any error indicates that the transaction has been automatically rolled back.

### expires

```scala
(Date) Transaction.expires
```

Represents the time when the transaction will be automatically rolled back. This time is extended every time a query is executed or [reset](#reset) is called. Currently, the default timeout is 60 seconds, but this can be configured on the server by setting `org.neo4j.server.transaction.timeout`.

### stream

```scala
(Boolean) Transaction.stream
```

_Default: false_

//

## Methods

### commit

```scala
Transaction.commit ( )
Transaction.commit ( Function callback )
```

Commits the transaction.


`callback`
* Signature: `Function (error)`

### execute

//

### query

//

### reset

//

### rollback

//