Skip to content
Source
Sign inSign up
TanStack/db
Open History to see the last commit

IndexDevModeConfig.md

54 lines1.2 KB

1---
2id: IndexDevModeConfig
3title: IndexDevModeConfig
4---
5​
6Defined in: [packages/db/src/indexes/index-registry.ts:15](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/index-registry.ts#L15)
7​
8## Properties
9​
10### collectionSizeThreshold
11​
12```ts
13collectionSizeThreshold: number;
14```
15​
16Defined in: [packages/db/src/indexes/index-registry.ts:19](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/index-registry.ts#L19)
17​
18Suggest indexes when collection has more than this many items
19​
20***
21​
22### enabled
23​
24```ts
25enabled: boolean;
26```
27​
28Defined in: [packages/db/src/indexes/index-registry.ts:17](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/index-registry.ts#L17)
29​
30Enable dev mode index suggestions
31​
32***
33​
34### onSuggestion
35​
36```ts
37onSuggestion: (suggestion) => void | null;
38```
39​
40Defined in: [packages/db/src/indexes/index-registry.ts:23](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/index-registry.ts#L23)
41​
42Custom handler for index suggestions
43​
44***
45​
46### slowQueryThresholdMs
47​
48```ts
49slowQueryThresholdMs: number;
50```
51​
52Defined in: [packages/db/src/indexes/index-registry.ts:21](https://github.com/TanStack/db/blob/main/packages/db/src/indexes/index-registry.ts#L21)
53​
54Suggest indexes when queries take longer than this (ms)