@@ -5,7 +5,7 @@ title: LiveQueryCollectionConfig
55
66# Interface: LiveQueryCollectionConfig\< TContext, TResult\>
77
8- Defined in: [ packages/db/src/query/live/types.ts:49 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L49 )
8+ Defined in: [ packages/db/src/query/live/types.ts:53 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L53 )
99
1010Configuration interface for live query collection options
1111
@@ -43,13 +43,26 @@ const config: LiveQueryCollectionConfig<any, any> = {
4343
4444## Properties
4545
46+ ### defaultStringCollation?
47+
48+ ``` ts
49+ optional defaultStringCollation : StringCollationConfig ;
50+ ```
51+
52+ Defined in: [ packages/db/src/query/live/types.ts:107] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L107 )
53+
54+ Optional compare options for string sorting.
55+ If provided, these will be used instead of inheriting from the FROM collection.
56+
57+ ***
58+
4659### gcTime?
4760
4861``` ts
4962optional gcTime : number ;
5063```
5164
52- Defined in: [ packages/db/src/query/live/types.ts:92 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L92 )
65+ Defined in: [ packages/db/src/query/live/types.ts:96 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L96 )
5366
5467GC time for the collection
5568
@@ -61,7 +74,7 @@ GC time for the collection
6174optional getKey : (item ) => string | number ;
6275```
6376
64- Defined in: [ packages/db/src/query/live/types.ts:70 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L70 )
77+ Defined in: [ packages/db/src/query/live/types.ts:74 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L74 )
6578
6679Function to extract the key from result items
6780If not provided, defaults to using the key from the D2 stream
@@ -84,7 +97,7 @@ If not provided, defaults to using the key from the D2 stream
8497optional id : string ;
8598```
8699
87- Defined in: [ packages/db/src/query/live/types.ts:57 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L57 )
100+ Defined in: [ packages/db/src/query/live/types.ts:61 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L61 )
88101
89102Unique identifier for the collection
90103If not provided, defaults to ` live-query-${number} ` with auto-incrementing number
@@ -97,7 +110,7 @@ If not provided, defaults to `live-query-${number}` with auto-incrementing numbe
97110optional onDelete : DeleteMutationFn < TResult , string | number , UtilsRecord , any > ;
98111```
99112
100- Defined in: [ packages/db/src/query/live/types.ts:82 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L82 )
113+ Defined in: [ packages/db/src/query/live/types.ts:86 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L86 )
101114
102115***
103116
@@ -107,7 +120,7 @@ Defined in: [packages/db/src/query/live/types.ts:82](https://github.com/TanStack
107120optional onInsert : InsertMutationFn < TResult , string | number , UtilsRecord , any > ;
108121```
109122
110- Defined in: [ packages/db/src/query/live/types.ts:80 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L80 )
123+ Defined in: [ packages/db/src/query/live/types.ts:84 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L84 )
111124
112125Optional mutation handlers
113126
@@ -119,7 +132,7 @@ Optional mutation handlers
119132optional onUpdate : UpdateMutationFn < TResult , string | number , UtilsRecord , any > ;
120133```
121134
122- Defined in: [ packages/db/src/query/live/types.ts:81 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L81 )
135+ Defined in: [ packages/db/src/query/live/types.ts:85 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L85 )
123136
124137***
125138
@@ -131,7 +144,7 @@ query:
131144| (q ) => QueryBuilder < TContext > ;
132145```
133146
134- Defined in: [ packages/db/src/query/live/types.ts:62 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L62 )
147+ Defined in: [ packages/db/src/query/live/types.ts:66 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L66 )
135148
136149Query builder function that defines the live query
137150
@@ -143,7 +156,7 @@ Query builder function that defines the live query
143156optional schema : undefined ;
144157```
145158
146- Defined in: [ packages/db/src/query/live/types.ts:75 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L75 )
159+ Defined in: [ packages/db/src/query/live/types.ts:79 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L79 )
147160
148161Optional schema for validation
149162
@@ -155,7 +168,7 @@ Optional schema for validation
155168optional singleResult : true ;
156169```
157170
158- Defined in: [ packages/db/src/query/live/types.ts:97 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L97 )
171+ Defined in: [ packages/db/src/query/live/types.ts:101 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L101 )
159172
160173If enabled the collection will return a single object instead of an array
161174
@@ -167,6 +180,6 @@ If enabled the collection will return a single object instead of an array
167180optional startSync : boolean ;
168181```
169182
170- Defined in: [ packages/db/src/query/live/types.ts:87 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L87 )
183+ Defined in: [ packages/db/src/query/live/types.ts:91 ] ( https://github.com/TanStack/db/blob/main/packages/db/src/query/live/types.ts#L91 )
171184
172185Start sync / the query immediately
0 commit comments