> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# orm-deep-offset

> A list query pages with a large or unbounded offset, so the database reads and discards every skipped row.

## What it flags

A Prisma `skip`, TypeORM, Sequelize, Mongoose, Drizzle or Knex offset, or a pg `OFFSET $n`, takes request input with no upper bound, or is a literal above 10000. The database reads and discards every skipped row; use keyset (cursor) pagination. One-hop service calls and schemas whose limit cannot be read are contextual.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "orm-deep-offset": "off" }
}
```

This rule checks JavaScript and TypeScript files only; other languages are not checked. An object with a `level` and `options` sets the literal-offset threshold. It takes a `maxOffset` option, a positive integer number of skipped rows. The rule then reports a numeric literal offset above `maxOffset`, wherever the list query is written. Without the option, the threshold is 10000.

```json theme={null}
{
  "rules": {
    "orm-deep-offset": { "level": "warn", "options": { "maxOffset": 5000 } }
  }
}
```

`maxOffset` applies only to numeric literal offsets. An offset that comes from request input with no upper bound is reported whatever `maxOffset` is set to. `level` is required: `"warn"` reports findings without changing the exit code. An `overrides` entry can set a different `maxOffset` for the files it matches, and its options win over the top-level ones.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.