> ## 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

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

The Carbone plugin syncs data locally. Use `corsair.carbone.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>

## Categories

Path: `carbone.db.categories.search`

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

### Searchable filters

| Field       | Type     | Operators                                  |
| ----------- | -------- | ------------------------------------------ |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `name`      | `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).*

***

## Tags

Path: `carbone.db.tags.search`

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

### Searchable filters

| Field       | Type     | Operators                                  |
| ----------- | -------- | ------------------------------------------ |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `name`      | `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).*

***

## Templates

Path: `carbone.db.templates.search`

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

### Searchable filters

| Field        | Type     | Operators                                  |
| ------------ | -------- | ------------------------------------------ |
| `entity_id`  | `string` | equals, contains, startsWith, endsWith, in |
| `versionId`  | `string` | equals, contains, startsWith, endsWith, in |
| `id`         | `string` | equals, contains, startsWith, endsWith, in |
| `name`       | `string` | equals, contains, startsWith, endsWith, in |
| `category`   | `string` | equals, contains, startsWith, endsWith, in |
| `type`       | `string` | equals, contains, startsWith, endsWith, in |
| `size`       | `number` | equals, gt, gte, lt, lte, in               |
| `comment`    | `string` | equals, contains, startsWith, endsWith, in |
| `deployedAt` | `number` | equals, gt, gte, lt, lte, in               |
| `createdAt`  | `number` | equals, gt, gte, lt, lte, in               |
| `expireAt`   | `number` | equals, gt, gte, lt, lte, in               |
| `origin`     | `number` | equals, gt, gte, lt, lte, 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).*

***
