# noDrizzleDbObjectInsideTransaction

Rule `biome/noDrizzleDbObjectInsideTransaction`. Disallow using a Drizzle ORM instance inside its own transaction callback.

- Source: biome
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1906 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `nursery/noDrizzleDbObjectInsideTransaction` | no | no | group nursery, since 2.6.8 | [docs](https://biomejs.dev/linter/rules/no-drizzle-db-object-inside-transaction/) |

## Code examples

### Incorrect: the rule reports this

```js
await db.transaction(async (tx) => {
    await db.insert(users).values({ name: "John" });
});
```

### Correct: the rule accepts this

```js
await db.transaction(async (tx) => {
    await tx.insert(users).values({ name: "John" });
});
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "noDrizzleDbObjectInsideTransaction": "error"
      }
    }
  }
}
```

## Related rules

- [biome/noDisabledAttribute](https://lintradar.dev/rules/biome/noDisabledAttribute.md): Discourages the `disabled` attribute on form controls and on elements that act as buttons.
- [biome/noExcessiveSelectorClasses](https://lintradar.dev/rules/biome/noExcessiveSelectorClasses.md): Limit the number of classes in a selector.
- [biome/noConvexWrongRuntimeImports](https://lintradar.dev/rules/biome/noConvexWrongRuntimeImports.md): Disallow importing Node.js runtime files from Convex runtime files.
- [biome/noExcessiveSelectorComplexity](https://lintradar.dev/rules/biome/noExcessiveSelectorComplexity.md): Limit how complex selectors can be, and disallow chosen parts of selectors.
- [biome/noConvexCollectInQuery](https://lintradar.dev/rules/biome/noConvexCollectInQuery.md): Disallow loading every result of a Convex database query with `.collect()`.
- [biome/noHexColors](https://lintradar.dev/rules/biome/noHexColors.md): Disallow hex colors.

---

Web page: https://lintradar.dev/rules/biome/noDrizzleDbObjectInsideTransaction. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
