You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add optional compareOptions to the Collection Config which act as col… (#762)
* Add optional compareOptions to the Collection Config which act as collection-wide config and allow queries to override those.
* Fix import
* changeset
* Ran prettier
* update docs
* Live queries inherit compare options from collection in the FROM clause
* Explicit compare options for live queries
* Rename compareOptions to defaultStringCollation in the collection config and live query collection config
* Docs update
---------
Co-authored-by: Sam Willis <[email protected]>
function electricCollectionOptions<T>(config):CollectionConfig<InferSchemaOutput<T>, string|number, T, UtilsRecord> &object;
12
12
```
13
13
14
-
Defined in: [packages/electric-db-collection/src/electric.ts:254](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L254)
14
+
Defined in: [packages/electric-db-collection/src/electric.ts:277](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L277)
15
15
16
16
Creates Electric collection options for use with a standard Collection
17
17
@@ -43,7 +43,7 @@ Collection options with utilities
43
43
function electricCollectionOptions<T>(config):CollectionConfig<T, string|number, never, UtilsRecord> &object;
44
44
```
45
45
46
-
Defined in: [packages/electric-db-collection/src/electric.ts:265](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L265)
46
+
Defined in: [packages/electric-db-collection/src/electric.ts:288](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L288)
47
47
48
48
Creates Electric collection options for use with a standard Collection
Defined in: [packages/electric-db-collection/src/electric.ts:80](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L80)
8
+
Defined in: [packages/electric-db-collection/src/electric.ts:102](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L102)
9
9
10
10
Configuration interface for Electric collection options
Defined in: [packages/electric-db-collection/src/electric.ts:185](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L185)
38
+
Defined in: [packages/electric-db-collection/src/electric.ts:208](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L208)
39
39
40
40
Optional asynchronous handler function called before a delete operation
Defined in: [packages/electric-db-collection/src/electric.ts:128](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L128)
90
+
Defined in: [packages/electric-db-collection/src/electric.ts:151](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L151)
91
91
92
92
Optional asynchronous handler function called before an insert operation
Defined in: [packages/electric-db-collection/src/electric.ts:157](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L157)
153
+
Defined in: [packages/electric-db-collection/src/electric.ts:180](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L180)
154
154
155
155
Optional asynchronous handler function called before an update operation
Defined in: [packages/electric-db-collection/src/electric.ts:90](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L90)
206
+
Defined in: [packages/electric-db-collection/src/electric.ts:112](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L112)
207
207
208
208
Configuration options for the ElectricSQL ShapeStream
209
+
210
+
***
211
+
212
+
### syncMode?
213
+
214
+
```ts
215
+
optionalsyncMode: ElectricSyncMode;
216
+
```
217
+
218
+
Defined in: [packages/electric-db-collection/src/electric.ts:113](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L113)
Copy file name to clipboardExpand all lines: docs/reference/electric-db-collection/interfaces/ElectricCollectionUtils.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ title: ElectricCollectionUtils
5
5
6
6
# Interface: ElectricCollectionUtils\<T\>
7
7
8
-
Defined in: [packages/electric-db-collection/src/electric.ts:237](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L237)
8
+
Defined in: [packages/electric-db-collection/src/electric.ts:260](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L260)
9
9
10
10
Electric collection utilities type
11
11
@@ -33,7 +33,7 @@ Electric collection utilities type
33
33
awaitMatch: AwaitMatchFn<T>;
34
34
```
35
35
36
-
Defined in: [packages/electric-db-collection/src/electric.ts:240](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L240)
36
+
Defined in: [packages/electric-db-collection/src/electric.ts:263](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L263)
37
37
38
38
***
39
39
@@ -43,4 +43,4 @@ Defined in: [packages/electric-db-collection/src/electric.ts:240](https://github
43
43
awaitTxId: AwaitTxIdFn;
44
44
```
45
45
46
-
Defined in: [packages/electric-db-collection/src/electric.ts:239](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L239)
46
+
Defined in: [packages/electric-db-collection/src/electric.ts:262](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L262)
Defined in: [packages/electric-db-collection/src/electric.ts:224](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L224)
12
+
Defined in: [packages/electric-db-collection/src/electric.ts:247](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L247)
Copy file name to clipboardExpand all lines: docs/reference/electric-db-collection/type-aliases/Txid.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,6 @@ title: Txid
9
9
typeTxid=number;
10
10
```
11
11
12
-
Defined in: [packages/electric-db-collection/src/electric.ts:42](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L42)
12
+
Defined in: [packages/electric-db-collection/src/electric.ts:46](https://github.com/TanStack/db/blob/main/packages/electric-db-collection/src/electric.ts#L46)
0 commit comments