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

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

The Agility CMS plugin syncs data locally. Use `corsair.agilitycms.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>

## Content Items

Path: `agilitycms.db.contentItems.search`

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

### Searchable filters

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

***

## Content Models

Path: `agilitycms.db.contentModels.search`

```ts theme={null}
const rows = await corsair.agilitycms.db.contentModels.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               |
| `referenceName` | `string` | equals, contains, startsWith, endsWith, in |
| `displayName`   | `string` | equals, contains, startsWith, endsWith, in |
| `description`   | `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).*

***

## Page Modules

Path: `agilitycms.db.pageModules.search`

```ts theme={null}
const rows = await corsair.agilitycms.db.pageModules.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               |
| `referenceName` | `string` | equals, contains, startsWith, endsWith, in |
| `displayName`   | `string` | equals, contains, startsWith, endsWith, in |
| `description`   | `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).*

***

## Pages

Path: `agilitycms.db.pages.search`

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

### Searchable filters

| Field          | Type      | Operators                                  |
| -------------- | --------- | ------------------------------------------ |
| `entity_id`    | `string`  | equals, contains, startsWith, endsWith, in |
| `pageID`       | `number`  | equals, gt, gte, lt, lte, in               |
| `name`         | `string`  | equals, contains, startsWith, endsWith, in |
| `path`         | `string`  | equals, contains, startsWith, endsWith, in |
| `title`        | `string`  | equals, contains, startsWith, endsWith, in |
| `menuText`     | `string`  | equals, contains, startsWith, endsWith, in |
| `pageType`     | `string`  | equals, contains, startsWith, endsWith, in |
| `templateName` | `string`  | equals, contains, startsWith, endsWith, in |
| `redirectUrl`  | `string`  | equals, contains, startsWith, endsWith, in |
| `securePage`   | `boolean` | equals                                     |

*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).*

***

## Sitemap Nodes

Path: `agilitycms.db.sitemapNodes.search`

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

### Searchable filters

| Field         | Type      | Operators                                  |
| ------------- | --------- | ------------------------------------------ |
| `entity_id`   | `string`  | equals, contains, startsWith, endsWith, in |
| `pageID`      | `number`  | equals, gt, gte, lt, lte, in               |
| `title`       | `string`  | equals, contains, startsWith, endsWith, in |
| `menuText`    | `string`  | equals, contains, startsWith, endsWith, in |
| `path`        | `string`  | equals, contains, startsWith, endsWith, in |
| `isFolder`    | `boolean` | equals                                     |
| `redirectUrl` | `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).*

***

## Sync Items

Path: `agilitycms.db.syncItems.search`

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

### Searchable filters

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

***

## Sync Pages

Path: `agilitycms.db.syncPages.search`

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

### Searchable filters

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

***
