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

# Database

> Resend local sync: searchable entities, `.search()` filters, and operators.

The Resend plugin syncs data locally. Use `corsair.resend.db.<entity>.search({ data, limit?, offset? })` with the filters listed per entity.

<Info>
  **New to Corsair?** See [database operations](/concepts/database), [data synchronization](/concepts/integrations), and [multi-tenancy](/concepts/multi-tenancy).
</Info>

## Domains

Path: `resend.db.domains.search`

```ts theme={null}
const rows = await corsair.resend.db.domains.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field        | Type     | Operators                                  |
| ------------ | -------- | ------------------------------------------ |
| `entity_id`  | `string` | equals, contains, startsWith, endsWith, in |
| `id`         | `string` | equals, contains, startsWith, endsWith, in |
| `name`       | `string` | equals, contains, startsWith, endsWith, in |
| `created_at` | `date`   | equals, before, after, between             |
| `region`     | `string` | equals, contains, startsWith, endsWith, in |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Emails

Path: `resend.db.emails.search`

```ts theme={null}
const rows = await corsair.resend.db.emails.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field        | Type     | Operators                                  |
| ------------ | -------- | ------------------------------------------ |
| `entity_id`  | `string` | equals, contains, startsWith, endsWith, in |
| `id`         | `string` | equals, contains, startsWith, endsWith, in |
| `from`       | `string` | equals, contains, startsWith, endsWith, in |
| `subject`    | `string` | equals, contains, startsWith, endsWith, in |
| `created_at` | `date`   | equals, before, after, between             |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***
