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

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

The Canvas LMS plugin syncs data locally. Use `corsair.canvas.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>

## Accounts

Path: `canvas.db.accounts.search`

```ts theme={null}
const rows = await corsair.canvas.db.accounts.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 |
| `uuid` | `string` | equals, contains, startsWith, endsWith, in |
| `sis_account_id` | `string` | equals, contains, startsWith, endsWith, in |
| `workflow_state` | `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).*

***

## Assignments

Path: `canvas.db.assignments.search`

```ts theme={null}
const rows = await corsair.canvas.db.assignments.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 |
| `due_at` | `string` | equals, contains, startsWith, endsWith, in |
| `points_possible` | `number` | equals, gt, gte, lt, lte, in |
| `published` | `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).*

***

## Courses

Path: `canvas.db.courses.search`

```ts theme={null}
const rows = await corsair.canvas.db.courses.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 |
| `course_code` | `string` | equals, contains, startsWith, endsWith, in |
| `uuid` | `string` | equals, contains, startsWith, endsWith, in |
| `sis_course_id` | `string` | equals, contains, startsWith, endsWith, in |
| `workflow_state` | `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).*

***

## Enrollments

Path: `canvas.db.enrollments.search`

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

### Searchable filters

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

***

## Users

Path: `canvas.db.users.search`

```ts theme={null}
const rows = await corsair.canvas.db.users.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 |
| `sortable_name` | `string` | equals, contains, startsWith, endsWith, in |
| `short_name` | `string` | equals, contains, startsWith, endsWith, in |
| `sis_user_id` | `string` | equals, contains, startsWith, endsWith, in |
| `login_id` | `string` | equals, contains, startsWith, endsWith, in |
| `email` | `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.