# Interface: QuerySource

Defined in: [packages/core/src/query/engine.ts:31](https://github.com/leifriksheim/minca/blob/main/core/src/query/engine.ts#L31)

What the engine needs from a space: its current records, one by key, and what links where.

## Methods

### computed()?

```ts
computed?(collection): Promise<Readonly<Record<string, string>> | undefined>;
```

Defined in: [packages/core/src/query/engine.ts:37](https://github.com/leifriksheim/minca/blob/main/core/src/query/engine.ts#L37)

The collection's computed fields, from its definition; none when absent

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `collection` | `string` |

#### Returns

`Promise`\<`Readonly`\<`Record`\<`string`, `string`\>\> \| `undefined`\>

***

### get()

```ts
get(key): Promise<NodeRecord<unknown> | null>;
```

Defined in: [packages/core/src/query/engine.ts:34](https://github.com/leifriksheim/minca/blob/main/core/src/query/engine.ts#L34)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `key` | `string` |

#### Returns

`Promise`\<[`NodeRecord`](https://minca.dev/api/core/interfaces/NodeRecord.md)\<`unknown`\> \| `null`\>

***

### linked()

```ts
linked(key, options): Promise<readonly NodeRecord<unknown>[]>;
```

Defined in: [packages/core/src/query/engine.ts:35](https://github.com/leifriksheim/minca/blob/main/core/src/query/engine.ts#L35)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `key` | `string` |
| `options` | \{ `collection?`: `string`; `rel?`: `string`; \} |
| `options.collection?` | `string` |
| `options.rel?` | `string` |

#### Returns

`Promise`\<readonly [`NodeRecord`](https://minca.dev/api/core/interfaces/NodeRecord.md)\<`unknown`\>[]\>

***

### list()

```ts
list(collection): Promise<readonly NodeRecord<unknown>[]>;
```

Defined in: [packages/core/src/query/engine.ts:33](https://github.com/leifriksheim/minca/blob/main/core/src/query/engine.ts#L33)

Current, not deleted

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `collection` | `string` |

#### Returns

`Promise`\<readonly [`NodeRecord`](https://minca.dev/api/core/interfaces/NodeRecord.md)\<`unknown`\>[]\>
