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

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

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

## Attr

Path: `boxhero.db.attr.search`

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

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `number` | equals, gt, gte, lt, lte, in |
| `attr_name` | `string` | equals, contains, startsWith, endsWith, in |
| `rank` | `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).*

***

## Item

Path: `boxhero.db.item.search`

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

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `number` | equals, gt, gte, lt, lte, in |
| `name` | `string` | equals, contains, startsWith, endsWith, in |
| `sku` | `string` | equals, contains, startsWith, endsWith, in |
| `barcode` | `string` | equals, contains, startsWith, endsWith, in |
| `photo_url` | `string` | equals, contains, startsWith, endsWith, in |
| `cost` | `string` | equals, contains, startsWith, endsWith, in |
| `price` | `string` | equals, contains, startsWith, endsWith, in |
| `quantity` | `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).*

***

## Location

Path: `boxhero.db.location.search`

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

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `number` | equals, gt, gte, lt, lte, in |
| `name` | `string` | equals, contains, startsWith, endsWith, in |
| `quantity` | `number` | equals, gt, gte, lt, lte, in |
| `memo` | `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).*

***

## Member

Path: `boxhero.db.member.search`

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

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `number` | equals, gt, gte, lt, lte, 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).*

***

## Partner

Path: `boxhero.db.partner.search`

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

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `number` | equals, gt, gte, lt, lte, in |
| `name` | `string` | equals, contains, startsWith, endsWith, in |
| `phone` | `string` | equals, contains, startsWith, endsWith, in |
| `email` | `string` | equals, contains, startsWith, endsWith, in |
| `address` | `string` | equals, contains, startsWith, endsWith, in |
| `memo` | `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).*

***

## Team

Path: `boxhero.db.team.search`

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

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `number` | equals, gt, gte, lt, lte, in |
| `name` | `string` | equals, contains, startsWith, endsWith, in |
| `currency_symbol` | `string` | equals, contains, startsWith, endsWith, in |
| `currency_code` | `string` | equals, contains, startsWith, endsWith, in |
| `price_decimal_places` | `number` | equals, gt, gte, lt, lte, in |
| `memo` | `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).*

***

## Transaction

Path: `boxhero.db.transaction.search`

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

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `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).*

***


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