---
lang: en
title: 'API docs: repository.transaction'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/repository
permalink: /doc/en/lb4/apidocs.repository.transaction.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [Transaction](./repository.transaction.md)

## Transaction interface

Local transaction

**Signature:**

```typescript
export interface Transaction 
```

## Properties

|  Property | Modifiers | Type | Description |
|  --- | --- | --- | --- |
|  [id](./repository.transaction.id.md) |  | string | The transaction Identifier |

## Methods

|  Method | Description |
|  --- | --- |
|  [commit()](./repository.transaction.commit.md) | Commit the transaction |
|  [isActive()](./repository.transaction.isactive.md) | Check if the transaction has an active connection |
|  [rollback()](./repository.transaction.rollback.md) | Rollback the transaction |


