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

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

The Google BigQuery plugin syncs data locally. Use `corsair.googlebigquery.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>

## Datasets

Path: `googlebigquery.db.datasets.search`

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

### Searchable filters

| Field              | Type     | Operators                                  |
| ------------------ | -------- | ------------------------------------------ |
| `entity_id`        | `string` | equals, contains, startsWith, endsWith, in |
| `id`               | `string` | equals, contains, startsWith, endsWith, in |
| `friendlyName`     | `string` | equals, contains, startsWith, endsWith, in |
| `description`      | `string` | equals, contains, startsWith, endsWith, in |
| `location`         | `string` | equals, contains, startsWith, endsWith, in |
| `creationTime`     | `string` | equals, contains, startsWith, endsWith, in |
| `lastModifiedTime` | `string` | equals, contains, startsWith, endsWith, in |
| `selfLink`         | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt`        | `date`   | equals, before, after, between             |

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

***

## Jobs

Path: `googlebigquery.db.jobs.search`

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

### Searchable filters

| Field        | Type     | Operators                                  |
| ------------ | -------- | ------------------------------------------ |
| `entity_id`  | `string` | equals, contains, startsWith, endsWith, in |
| `id`         | `string` | equals, contains, startsWith, endsWith, in |
| `kind`       | `string` | equals, contains, startsWith, endsWith, in |
| `selfLink`   | `string` | equals, contains, startsWith, endsWith, in |
| `user_email` | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt`  | `date`   | equals, before, after, between             |

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

***

## Models

Path: `googlebigquery.db.models.search`

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

### Searchable filters

| Field              | Type     | Operators                                  |
| ------------------ | -------- | ------------------------------------------ |
| `entity_id`        | `string` | equals, contains, startsWith, endsWith, in |
| `id`               | `string` | equals, contains, startsWith, endsWith, in |
| `modelType`        | `string` | equals, contains, startsWith, endsWith, in |
| `friendlyName`     | `string` | equals, contains, startsWith, endsWith, in |
| `description`      | `string` | equals, contains, startsWith, endsWith, in |
| `creationTime`     | `string` | equals, contains, startsWith, endsWith, in |
| `lastModifiedTime` | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt`        | `date`   | equals, before, after, between             |

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

***

## Routines

Path: `googlebigquery.db.routines.search`

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

### Searchable filters

| Field              | Type     | Operators                                  |
| ------------------ | -------- | ------------------------------------------ |
| `entity_id`        | `string` | equals, contains, startsWith, endsWith, in |
| `id`               | `string` | equals, contains, startsWith, endsWith, in |
| `routineType`      | `string` | equals, contains, startsWith, endsWith, in |
| `language`         | `string` | equals, contains, startsWith, endsWith, in |
| `description`      | `string` | equals, contains, startsWith, endsWith, in |
| `definitionBody`   | `string` | equals, contains, startsWith, endsWith, in |
| `creationTime`     | `string` | equals, contains, startsWith, endsWith, in |
| `lastModifiedTime` | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt`        | `date`   | equals, before, after, between             |

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

***

## Tables

Path: `googlebigquery.db.tables.search`

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

### Searchable filters

| Field              | Type     | Operators                                  |
| ------------------ | -------- | ------------------------------------------ |
| `entity_id`        | `string` | equals, contains, startsWith, endsWith, in |
| `id`               | `string` | equals, contains, startsWith, endsWith, in |
| `friendlyName`     | `string` | equals, contains, startsWith, endsWith, in |
| `description`      | `string` | equals, contains, startsWith, endsWith, in |
| `type`             | `string` | equals, contains, startsWith, endsWith, in |
| `location`         | `string` | equals, contains, startsWith, endsWith, in |
| `numRows`          | `string` | equals, contains, startsWith, endsWith, in |
| `numBytes`         | `string` | equals, contains, startsWith, endsWith, in |
| `creationTime`     | `string` | equals, contains, startsWith, endsWith, in |
| `lastModifiedTime` | `string` | equals, contains, startsWith, endsWith, in |
| `expirationTime`   | `string` | equals, contains, startsWith, endsWith, in |
| `selfLink`         | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt`        | `date`   | equals, before, after, between             |

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

***
