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

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

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

## Deliveries

Path: `xquik.db.deliveries.search`

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

### Searchable filters

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

***

## Events

Path: `xquik.db.events.search`

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

### Searchable filters

| Field           | Type     | Operators                                  |
| --------------- | -------- | ------------------------------------------ |
| `entity_id`     | `string` | equals, contains, startsWith, endsWith, in |
| `deliveryId`    | `string` | equals, contains, startsWith, endsWith, in |
| `occurredAt`    | `string` | equals, contains, startsWith, endsWith, in |
| `query`         | `string` | equals, contains, startsWith, endsWith, in |
| `schemaVersion` | `string` | equals, contains, startsWith, endsWith, in |
| `streamEventId` | `string` | equals, contains, startsWith, endsWith, in |
| `timestamp`     | `string` | equals, contains, startsWith, endsWith, in |
| `username`      | `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).*

***

## Tweets

Path: `xquik.db.tweets.search`

```ts theme={null}
const rows = await corsair.xquik.db.tweets.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).*

***

## Users

Path: `xquik.db.users.search`

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

### Searchable filters

| Field            | Type      | Operators                                  |
| ---------------- | --------- | ------------------------------------------ |
| `entity_id`      | `string`  | equals, contains, startsWith, endsWith, in |
| `coverPicture`   | `string`  | equals, contains, startsWith, endsWith, in |
| `createdAt`      | `string`  | equals, contains, startsWith, endsWith, in |
| `description`    | `string`  | equals, contains, startsWith, endsWith, in |
| `followers`      | `number`  | equals, gt, gte, lt, lte, in               |
| `following`      | `number`  | equals, gt, gte, lt, lte, in               |
| `id`             | `string`  | equals, contains, startsWith, endsWith, in |
| `location`       | `string`  | equals, contains, startsWith, endsWith, in |
| `name`           | `string`  | equals, contains, startsWith, endsWith, in |
| `profilePicture` | `string`  | equals, contains, startsWith, endsWith, in |
| `statusesCount`  | `number`  | equals, gt, gte, lt, lte, in               |
| `username`       | `string`  | equals, contains, startsWith, endsWith, in |
| `verified`       | `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).*

***

## Webhooks

Path: `xquik.db.webhooks.search`

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

### Searchable filters

| Field       | Type      | Operators                                  |
| ----------- | --------- | ------------------------------------------ |
| `entity_id` | `string`  | equals, contains, startsWith, endsWith, in |
| `createdAt` | `string`  | equals, contains, startsWith, endsWith, in |
| `id`        | `string`  | equals, contains, startsWith, endsWith, in |
| `isActive`  | `boolean` | equals                                     |
| `url`       | `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).*

***
