tinybase 6.7.3 → 6.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/mergeable-store/with-schemas/index.d.ts +3 -2
- package/@types/persisters/persister-automerge/index.d.ts +4 -6
- package/@types/persisters/persister-automerge/with-schemas/index.d.ts +7 -8
- package/@types/persisters/persister-browser/index.d.ts +3 -6
- package/@types/persisters/persister-browser/with-schemas/index.d.ts +9 -6
- package/@types/persisters/persister-cr-sqlite-wasm/with-schemas/index.d.ts +3 -2
- package/@types/persisters/persister-durable-object-sql-storage/index.d.ts +1 -2
- package/@types/persisters/persister-durable-object-storage/index.d.ts +1 -2
- package/@types/persisters/persister-durable-object-storage/with-schemas/index.d.ts +3 -2
- package/@types/persisters/persister-electric-sql/with-schemas/index.d.ts +3 -2
- package/@types/persisters/persister-expo-sqlite/index.d.ts +1 -2
- package/@types/persisters/persister-expo-sqlite/with-schemas/index.d.ts +3 -2
- package/@types/persisters/persister-file/index.d.ts +1 -2
- package/@types/persisters/persister-file/with-schemas/index.d.ts +3 -2
- package/@types/persisters/persister-indexed-db/with-schemas/index.d.ts +3 -2
- package/@types/persisters/persister-libsql/with-schemas/index.d.ts +3 -2
- package/@types/persisters/persister-partykit-client/with-schemas/index.d.ts +3 -2
- package/@types/persisters/persister-pglite/index.d.ts +1 -2
- package/@types/persisters/persister-pglite/with-schemas/index.d.ts +3 -2
- package/@types/persisters/persister-postgres/index.d.ts +1 -2
- package/@types/persisters/persister-postgres/with-schemas/index.d.ts +3 -2
- package/@types/persisters/persister-powersync/with-schemas/index.d.ts +3 -2
- package/@types/persisters/persister-react-native-mmkv/index.d.ts +1 -2
- package/@types/persisters/persister-react-native-mmkv/with-schemas/index.d.ts +3 -2
- package/@types/persisters/persister-react-native-sqlite/index.d.ts +1 -2
- package/@types/persisters/persister-react-native-sqlite/with-schemas/index.d.ts +3 -2
- package/@types/persisters/persister-remote/with-schemas/index.d.ts +3 -2
- package/@types/persisters/persister-sqlite-bun/index.d.ts +1 -2
- package/@types/persisters/persister-sqlite-bun/with-schemas/index.d.ts +3 -2
- package/@types/persisters/persister-sqlite-wasm/index.d.ts +1 -2
- package/@types/persisters/persister-sqlite-wasm/with-schemas/index.d.ts +3 -2
- package/@types/persisters/persister-sqlite3/index.d.ts +1 -2
- package/@types/persisters/persister-sqlite3/with-schemas/index.d.ts +3 -2
- package/@types/persisters/persister-yjs/with-schemas/index.d.ts +3 -2
- package/@types/queries/with-schemas/index.d.ts +4 -8
- package/@types/synchronizers/synchronizer-broadcast-channel/with-schemas/index.d.ts +3 -2
- package/@types/synchronizers/synchronizer-local/with-schemas/index.d.ts +3 -2
- package/@types/synchronizers/synchronizer-ws-client/index.d.ts +3 -2
- package/@types/synchronizers/with-schemas/index.d.ts +3 -2
- package/agents.md +281 -0
- package/min/omni/index.js +1 -1
- package/min/omni/index.js.gz +0 -0
- package/min/omni/with-schemas/index.js +1 -1
- package/min/omni/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-automerge/index.js +1 -1
- package/min/persisters/persister-automerge/index.js.gz +0 -0
- package/min/persisters/persister-automerge/with-schemas/index.js +1 -1
- package/min/persisters/persister-automerge/with-schemas/index.js.gz +0 -0
- package/omni/index.js +1 -1
- package/omni/with-schemas/index.js +1 -1
- package/package.json +4 -4
- package/persisters/persister-automerge/index.js +1 -1
- package/persisters/persister-automerge/with-schemas/index.js +1 -1
- package/readme.md +1 -1
- package/releases.md +1 -1
|
@@ -436,8 +436,9 @@ export type MergeableChanges<
|
|
|
436
436
|
* @category Mergeable
|
|
437
437
|
* @since v5.0.0
|
|
438
438
|
*/
|
|
439
|
-
export interface MergeableStore<
|
|
440
|
-
extends
|
|
439
|
+
export interface MergeableStore<
|
|
440
|
+
Schemas extends OptionalSchemas,
|
|
441
|
+
> extends Store<Schemas> {
|
|
441
442
|
//
|
|
442
443
|
/**
|
|
443
444
|
* The getMergeableContent method returns the full content of a
|
|
@@ -89,7 +89,7 @@ export interface AutomergePersister extends Persister {
|
|
|
89
89
|
* await persister.save();
|
|
90
90
|
* // Store will be saved to the document.
|
|
91
91
|
*
|
|
92
|
-
* console.log(
|
|
92
|
+
* console.log(docHandler.doc());
|
|
93
93
|
* // -> {tinybase: {t: {pets: {fido: {species: 'dog'}}}, v: {}}}
|
|
94
94
|
*
|
|
95
95
|
* await persister.destroy();
|
|
@@ -110,7 +110,6 @@ export interface AutomergePersister extends Persister {
|
|
|
110
110
|
* network: [new BroadcastChannelNetworkAdapter()],
|
|
111
111
|
* });
|
|
112
112
|
* const docHandler1 = repo1.create();
|
|
113
|
-
* await docHandler1.doc();
|
|
114
113
|
* const store1 = createStore();
|
|
115
114
|
* const persister1 = createAutomergePersister(store1, docHandler1);
|
|
116
115
|
* await persister1.startAutoLoad();
|
|
@@ -120,8 +119,7 @@ export interface AutomergePersister extends Persister {
|
|
|
120
119
|
* const repo2 = new Repo({
|
|
121
120
|
* network: [new BroadcastChannelNetworkAdapter()],
|
|
122
121
|
* });
|
|
123
|
-
* const docHandler2 = repo2.find(docHandler1.documentId);
|
|
124
|
-
* await docHandler2.doc();
|
|
122
|
+
* const docHandler2 = await repo2.find(docHandler1.documentId);
|
|
125
123
|
* const store2 = createStore();
|
|
126
124
|
* const persister2 = createAutomergePersister(store2, docHandler2);
|
|
127
125
|
* await persister2.startAutoLoad();
|
|
@@ -131,8 +129,8 @@ export interface AutomergePersister extends Persister {
|
|
|
131
129
|
* // with each other, merely for the purposes of sequentiality in this example.
|
|
132
130
|
* const syncDocsWait = async () => {
|
|
133
131
|
* await new Promise((resolve) => setTimeout(() => resolve(0), 100));
|
|
134
|
-
*
|
|
135
|
-
*
|
|
132
|
+
* docHandler1.doc();
|
|
133
|
+
* docHandler2.doc();
|
|
136
134
|
* };
|
|
137
135
|
*
|
|
138
136
|
* // Wait for the documents to synchronize in their initial state.
|
|
@@ -30,8 +30,9 @@ import type {Persister} from '../../with-schemas/index.d.ts';
|
|
|
30
30
|
* @category Persister
|
|
31
31
|
* @since v4.3.14
|
|
32
32
|
*/
|
|
33
|
-
export interface AutomergePersister<
|
|
34
|
-
extends
|
|
33
|
+
export interface AutomergePersister<
|
|
34
|
+
Schemas extends OptionalSchemas,
|
|
35
|
+
> extends Persister<Schemas> {
|
|
35
36
|
/**
|
|
36
37
|
* The getDocHandle method returns the Automerge document handler the Store is
|
|
37
38
|
* being persisted to.
|
|
@@ -104,7 +105,7 @@ export interface AutomergePersister<Schemas extends OptionalSchemas>
|
|
|
104
105
|
* await persister.save();
|
|
105
106
|
* // Store will be saved to the document.
|
|
106
107
|
*
|
|
107
|
-
* console.log(
|
|
108
|
+
* console.log(docHandler.doc());
|
|
108
109
|
* // -> {tinybase: {t: {pets: {fido: {species: 'dog'}}}, v: {}}}
|
|
109
110
|
*
|
|
110
111
|
* await persister.destroy();
|
|
@@ -125,7 +126,6 @@ export interface AutomergePersister<Schemas extends OptionalSchemas>
|
|
|
125
126
|
* network: [new BroadcastChannelNetworkAdapter()],
|
|
126
127
|
* });
|
|
127
128
|
* const docHandler1 = repo1.create();
|
|
128
|
-
* await docHandler1.doc();
|
|
129
129
|
* const store1 = createStore();
|
|
130
130
|
* const persister1 = createAutomergePersister(store1, docHandler1);
|
|
131
131
|
* await persister1.startAutoLoad();
|
|
@@ -135,8 +135,7 @@ export interface AutomergePersister<Schemas extends OptionalSchemas>
|
|
|
135
135
|
* const repo2 = new Repo({
|
|
136
136
|
* network: [new BroadcastChannelNetworkAdapter()],
|
|
137
137
|
* });
|
|
138
|
-
* const docHandler2 = repo2.find(docHandler1.documentId);
|
|
139
|
-
* await docHandler2.doc();
|
|
138
|
+
* const docHandler2 = await repo2.find(docHandler1.documentId);
|
|
140
139
|
* const store2 = createStore();
|
|
141
140
|
* const persister2 = createAutomergePersister(store2, docHandler2);
|
|
142
141
|
* await persister2.startAutoLoad();
|
|
@@ -146,8 +145,8 @@ export interface AutomergePersister<Schemas extends OptionalSchemas>
|
|
|
146
145
|
* // with each other, merely for the purposes of sequentiality in this example.
|
|
147
146
|
* const syncDocsWait = async () => {
|
|
148
147
|
* await new Promise((resolve) => setTimeout(() => resolve(0), 100));
|
|
149
|
-
*
|
|
150
|
-
*
|
|
148
|
+
* docHandler1.doc();
|
|
149
|
+
* docHandler2.doc();
|
|
151
150
|
* };
|
|
152
151
|
*
|
|
153
152
|
* // Wait for the documents to synchronize in their initial state.
|
|
@@ -34,8 +34,7 @@ import type {Persister, Persists} from '../index.d.ts';
|
|
|
34
34
|
* @category Persister
|
|
35
35
|
* @since v4.3.14
|
|
36
36
|
*/
|
|
37
|
-
export interface SessionPersister
|
|
38
|
-
extends Persister<Persists.StoreOrMergeableStore> {
|
|
37
|
+
export interface SessionPersister extends Persister<Persists.StoreOrMergeableStore> {
|
|
39
38
|
/**
|
|
40
39
|
* The getStorageName method returns the unique key of the storage location
|
|
41
40
|
* the Store is being persisted to.
|
|
@@ -75,8 +74,7 @@ export interface SessionPersister
|
|
|
75
74
|
* @category Persister
|
|
76
75
|
* @since v4.3.14
|
|
77
76
|
*/
|
|
78
|
-
export interface LocalPersister
|
|
79
|
-
extends Persister<Persists.StoreOrMergeableStore> {
|
|
77
|
+
export interface LocalPersister extends Persister<Persists.StoreOrMergeableStore> {
|
|
80
78
|
/**
|
|
81
79
|
* The getStorageName method returns the unique key of the storage location
|
|
82
80
|
* the Store is being persisted to.
|
|
@@ -202,8 +200,7 @@ export function createLocalPersister(
|
|
|
202
200
|
* @category Persister
|
|
203
201
|
* @since v6.7.0
|
|
204
202
|
*/
|
|
205
|
-
export interface OpfsPersister
|
|
206
|
-
extends Persister<Persists.StoreOrMergeableStore> {
|
|
203
|
+
export interface OpfsPersister extends Persister<Persists.StoreOrMergeableStore> {
|
|
207
204
|
/**
|
|
208
205
|
* The getHandle method returns the handle of the file the Store is being
|
|
209
206
|
* persisted to.
|
|
@@ -37,8 +37,9 @@ import type {Persister, Persists} from '../../with-schemas/index.d.ts';
|
|
|
37
37
|
* @category Persister
|
|
38
38
|
* @since v4.3.14
|
|
39
39
|
*/
|
|
40
|
-
export interface SessionPersister<
|
|
41
|
-
extends
|
|
40
|
+
export interface SessionPersister<
|
|
41
|
+
Schemas extends OptionalSchemas,
|
|
42
|
+
> extends Persister<Schemas, Persists.StoreOrMergeableStore> {
|
|
42
43
|
/**
|
|
43
44
|
* The getStorageName method returns the unique key of the storage location
|
|
44
45
|
* the Store is being persisted to.
|
|
@@ -78,8 +79,9 @@ export interface SessionPersister<Schemas extends OptionalSchemas>
|
|
|
78
79
|
* @category Persister
|
|
79
80
|
* @since v4.3.14
|
|
80
81
|
*/
|
|
81
|
-
export interface LocalPersister<
|
|
82
|
-
extends
|
|
82
|
+
export interface LocalPersister<
|
|
83
|
+
Schemas extends OptionalSchemas,
|
|
84
|
+
> extends Persister<Schemas, Persists.StoreOrMergeableStore> {
|
|
83
85
|
/**
|
|
84
86
|
* The getStorageName method returns the unique key of the storage location
|
|
85
87
|
* the Store is being persisted to.
|
|
@@ -119,8 +121,9 @@ export interface LocalPersister<Schemas extends OptionalSchemas>
|
|
|
119
121
|
* @category Persister
|
|
120
122
|
* @since v6.7.0
|
|
121
123
|
*/
|
|
122
|
-
export interface OpfsPersister<
|
|
123
|
-
extends
|
|
124
|
+
export interface OpfsPersister<
|
|
125
|
+
Schemas extends OptionalSchemas,
|
|
126
|
+
> extends Persister<Schemas, Persists.StoreOrMergeableStore> {
|
|
124
127
|
/**
|
|
125
128
|
* The getHandle method returns the handle of the file the Store is being
|
|
126
129
|
* persisted to.
|
|
@@ -30,8 +30,9 @@ import type {
|
|
|
30
30
|
* @category Persister
|
|
31
31
|
* @since v4.3.14
|
|
32
32
|
*/
|
|
33
|
-
export interface CrSqliteWasmPersister<
|
|
34
|
-
extends
|
|
33
|
+
export interface CrSqliteWasmPersister<
|
|
34
|
+
Schemas extends OptionalSchemas,
|
|
35
|
+
> extends Persister<Schemas> {
|
|
35
36
|
/**
|
|
36
37
|
* The getDb method returns a reference to the database instance the Store is
|
|
37
38
|
* being persisted to.
|
|
@@ -139,8 +139,7 @@ export type DurableObjectSqlDatabasePersisterConfig = DpcJson | DpcFragmented;
|
|
|
139
139
|
* @category Persister
|
|
140
140
|
* @since v6.3.0
|
|
141
141
|
*/
|
|
142
|
-
export interface DurableObjectSqlStoragePersister
|
|
143
|
-
extends Persister<Persists.MergeableStoreOnly> {
|
|
142
|
+
export interface DurableObjectSqlStoragePersister extends Persister<Persists.MergeableStoreOnly> {
|
|
144
143
|
/**
|
|
145
144
|
* The getSqlStorage method returns a reference to the SQL storage that the
|
|
146
145
|
* Store is being persisted to.
|
|
@@ -25,8 +25,7 @@ import type {Persister, Persists} from '../index.d.ts';
|
|
|
25
25
|
* @category Persister
|
|
26
26
|
* @since v5.4.0
|
|
27
27
|
*/
|
|
28
|
-
export interface DurableObjectStoragePersister
|
|
29
|
-
extends Persister<Persists.MergeableStoreOnly> {
|
|
28
|
+
export interface DurableObjectStoragePersister extends Persister<Persists.MergeableStoreOnly> {
|
|
30
29
|
/**
|
|
31
30
|
* The getStorage method returns a reference to the storage that the Store is
|
|
32
31
|
* being persisted to.
|
|
@@ -26,8 +26,9 @@ import type {Persister, Persists} from '../../with-schemas/index.d.ts';
|
|
|
26
26
|
* @category Persister
|
|
27
27
|
* @since v5.4.0
|
|
28
28
|
*/
|
|
29
|
-
export interface DurableObjectStoragePersister<
|
|
30
|
-
extends
|
|
29
|
+
export interface DurableObjectStoragePersister<
|
|
30
|
+
Schemas extends OptionalSchemas,
|
|
31
|
+
> extends Persister<Schemas, Persists.MergeableStoreOnly> {
|
|
31
32
|
/**
|
|
32
33
|
* The getStorage method returns a reference to the storage that the Store is
|
|
33
34
|
* being persisted to.
|
|
@@ -30,8 +30,9 @@ import type {
|
|
|
30
30
|
* @category Persister
|
|
31
31
|
* @since v4.6.0
|
|
32
32
|
*/
|
|
33
|
-
export interface ElectricSqlPersister<
|
|
34
|
-
extends
|
|
33
|
+
export interface ElectricSqlPersister<
|
|
34
|
+
Schemas extends OptionalSchemas,
|
|
35
|
+
> extends Persister<Schemas> {
|
|
35
36
|
/**
|
|
36
37
|
* The getElectricClient method returns a reference to the Electric client the
|
|
37
38
|
* Store is being persisted to.
|
|
@@ -32,8 +32,7 @@ import type {DatabasePersisterConfig, Persister, Persists} from '../index.d.ts';
|
|
|
32
32
|
* @category Persister
|
|
33
33
|
* @since v4.5.0
|
|
34
34
|
*/
|
|
35
|
-
export interface ExpoSqlitePersister
|
|
36
|
-
extends Persister<Persists.StoreOrMergeableStore> {
|
|
35
|
+
export interface ExpoSqlitePersister extends Persister<Persists.StoreOrMergeableStore> {
|
|
37
36
|
/**
|
|
38
37
|
* The getDb method returns a reference to the database instance the Store is
|
|
39
38
|
* being persisted to.
|
|
@@ -39,8 +39,9 @@ import type {
|
|
|
39
39
|
* @category Persister
|
|
40
40
|
* @since v4.5.0
|
|
41
41
|
*/
|
|
42
|
-
export interface ExpoSqlitePersister<
|
|
43
|
-
extends
|
|
42
|
+
export interface ExpoSqlitePersister<
|
|
43
|
+
Schemas extends OptionalSchemas,
|
|
44
|
+
> extends Persister<Schemas, Persists.StoreOrMergeableStore> {
|
|
44
45
|
/**
|
|
45
46
|
* The getDb method returns a reference to the database instance the Store is
|
|
46
47
|
* being persisted to.
|
|
@@ -23,8 +23,7 @@ import type {Persister, Persists} from '../index.d.ts';
|
|
|
23
23
|
* @category Persister
|
|
24
24
|
* @since v4.3.14
|
|
25
25
|
*/
|
|
26
|
-
export interface FilePersister
|
|
27
|
-
extends Persister<Persists.StoreOrMergeableStore> {
|
|
26
|
+
export interface FilePersister extends Persister<Persists.StoreOrMergeableStore> {
|
|
28
27
|
/**
|
|
29
28
|
* The getFilePath method returns the location of the local file the Store is
|
|
30
29
|
* being persisted to.
|
|
@@ -26,8 +26,9 @@ import type {Persister, Persists} from '../../with-schemas/index.d.ts';
|
|
|
26
26
|
* @category Persister
|
|
27
27
|
* @since v4.3.14
|
|
28
28
|
*/
|
|
29
|
-
export interface FilePersister<
|
|
30
|
-
extends
|
|
29
|
+
export interface FilePersister<
|
|
30
|
+
Schemas extends OptionalSchemas,
|
|
31
|
+
> extends Persister<Schemas, Persists.StoreOrMergeableStore> {
|
|
31
32
|
/**
|
|
32
33
|
* The getFilePath method returns the location of the local file the Store is
|
|
33
34
|
* being persisted to.
|
|
@@ -25,8 +25,9 @@ import type {Persister} from '../../with-schemas/index.d.ts';
|
|
|
25
25
|
* @category Persister
|
|
26
26
|
* @since v4.3.14
|
|
27
27
|
*/
|
|
28
|
-
export interface IndexedDbPersister<
|
|
29
|
-
extends
|
|
28
|
+
export interface IndexedDbPersister<
|
|
29
|
+
Schemas extends OptionalSchemas,
|
|
30
|
+
> extends Persister<Schemas> {
|
|
30
31
|
/**
|
|
31
32
|
* The getDbName method returns the unique key of the IndexedDB the Store is
|
|
32
33
|
* being persisted to.
|
|
@@ -30,8 +30,9 @@ import type {
|
|
|
30
30
|
* @category Persister
|
|
31
31
|
* @since v4.7.0
|
|
32
32
|
*/
|
|
33
|
-
export interface LibSqlPersister<
|
|
34
|
-
extends
|
|
33
|
+
export interface LibSqlPersister<
|
|
34
|
+
Schemas extends OptionalSchemas,
|
|
35
|
+
> extends Persister<Schemas> {
|
|
35
36
|
/**
|
|
36
37
|
* The getClient method returns a reference to the database client the Store
|
|
37
38
|
* is being persisted to.
|
|
@@ -38,8 +38,9 @@ import type {Persister} from '../../with-schemas/index.d.ts';
|
|
|
38
38
|
* @category Persister
|
|
39
39
|
* @since v4.3.14
|
|
40
40
|
*/
|
|
41
|
-
export interface PartyKitPersister<
|
|
42
|
-
extends
|
|
41
|
+
export interface PartyKitPersister<
|
|
42
|
+
Schemas extends OptionalSchemas,
|
|
43
|
+
> extends Persister<Schemas> {
|
|
43
44
|
/**
|
|
44
45
|
* The getConnection method returns the PartySocket the Store is being
|
|
45
46
|
* persisted to.
|
|
@@ -24,8 +24,7 @@ import type {DatabasePersisterConfig, Persister, Persists} from '../index.d.ts';
|
|
|
24
24
|
* @category Persister
|
|
25
25
|
* @since 5.2.0
|
|
26
26
|
*/
|
|
27
|
-
export interface PglitePersister
|
|
28
|
-
extends Persister<Persists.StoreOrMergeableStore> {
|
|
27
|
+
export interface PglitePersister extends Persister<Persists.StoreOrMergeableStore> {
|
|
29
28
|
/**
|
|
30
29
|
* The getPglite method returns a reference to the database connection the
|
|
31
30
|
* Store is being persisted to.
|
|
@@ -31,8 +31,9 @@ import type {
|
|
|
31
31
|
* @category Persister
|
|
32
32
|
* @since 5.2.0
|
|
33
33
|
*/
|
|
34
|
-
export interface PglitePersister<
|
|
35
|
-
extends
|
|
34
|
+
export interface PglitePersister<
|
|
35
|
+
Schemas extends OptionalSchemas,
|
|
36
|
+
> extends Persister<Schemas, Persists.StoreOrMergeableStore> {
|
|
36
37
|
/**
|
|
37
38
|
* The getPglite method returns a reference to the database connection the
|
|
38
39
|
* Store is being persisted to.
|
|
@@ -24,8 +24,7 @@ import type {DatabasePersisterConfig, Persister, Persists} from '../index.d.ts';
|
|
|
24
24
|
* @category Persister
|
|
25
25
|
* @since 5.2.0
|
|
26
26
|
*/
|
|
27
|
-
export interface PostgresPersister
|
|
28
|
-
extends Persister<Persists.StoreOrMergeableStore> {
|
|
27
|
+
export interface PostgresPersister extends Persister<Persists.StoreOrMergeableStore> {
|
|
29
28
|
/**
|
|
30
29
|
* The getSql method returns a reference to the database connection the Store
|
|
31
30
|
* is being persisted to.
|
|
@@ -31,8 +31,9 @@ import type {
|
|
|
31
31
|
* @category Persister
|
|
32
32
|
* @since 5.2.0
|
|
33
33
|
*/
|
|
34
|
-
export interface PostgresPersister<
|
|
35
|
-
extends
|
|
34
|
+
export interface PostgresPersister<
|
|
35
|
+
Schemas extends OptionalSchemas,
|
|
36
|
+
> extends Persister<Schemas, Persists.StoreOrMergeableStore> {
|
|
36
37
|
/**
|
|
37
38
|
* The getSql method returns a reference to the database connection the Store
|
|
38
39
|
* is being persisted to.
|
|
@@ -31,8 +31,9 @@ import type {
|
|
|
31
31
|
* @category Persister
|
|
32
32
|
* @since v4.8.0
|
|
33
33
|
*/
|
|
34
|
-
export interface PowerSyncPersister<
|
|
35
|
-
extends
|
|
34
|
+
export interface PowerSyncPersister<
|
|
35
|
+
Schemas extends OptionalSchemas,
|
|
36
|
+
> extends Persister<Schemas> {
|
|
36
37
|
/**
|
|
37
38
|
* The getPowerSync method returns a reference to the PowerSync instance the
|
|
38
39
|
* Store is being persisted to.
|
|
@@ -26,8 +26,7 @@ import type {Persister, Persists} from '../index.d.ts';
|
|
|
26
26
|
* @category Persister
|
|
27
27
|
* @since v6.5.0
|
|
28
28
|
*/
|
|
29
|
-
export interface ReactNativeMmkvPersister
|
|
30
|
-
extends Persister<Persists.StoreOrMergeableStore> {
|
|
29
|
+
export interface ReactNativeMmkvPersister extends Persister<Persists.StoreOrMergeableStore> {
|
|
31
30
|
/**
|
|
32
31
|
* The getStorageName method returns the unique key of the storage location the
|
|
33
32
|
* Store is being persisted to.
|
|
@@ -29,8 +29,9 @@ import type {Persister, Persists} from '../../with-schemas/index.d.ts';
|
|
|
29
29
|
* @category Persister
|
|
30
30
|
* @since v6.5.0
|
|
31
31
|
*/
|
|
32
|
-
export interface ReactNativeMmkvPersister<
|
|
33
|
-
extends
|
|
32
|
+
export interface ReactNativeMmkvPersister<
|
|
33
|
+
Schemas extends OptionalSchemas,
|
|
34
|
+
> extends Persister<Schemas, Persists.StoreOrMergeableStore> {
|
|
34
35
|
/**
|
|
35
36
|
* The getStorageName method returns the unique key of the storage location the
|
|
36
37
|
* Store is being persisted to.
|
|
@@ -27,8 +27,7 @@ import type {DatabasePersisterConfig, Persister, Persists} from '../index.d.ts';
|
|
|
27
27
|
* @category Persister
|
|
28
28
|
* @since v6.4.0
|
|
29
29
|
*/
|
|
30
|
-
export interface ReactNativeSqlitePersister
|
|
31
|
-
extends Persister<Persists.StoreOrMergeableStore> {
|
|
30
|
+
export interface ReactNativeSqlitePersister extends Persister<Persists.StoreOrMergeableStore> {
|
|
32
31
|
/**
|
|
33
32
|
* The getDb method returns a reference to the database instance the Store is
|
|
34
33
|
* being persisted to.
|
|
@@ -34,8 +34,9 @@ import type {
|
|
|
34
34
|
* @category Persister
|
|
35
35
|
* @since v6.4.0
|
|
36
36
|
*/
|
|
37
|
-
export interface ReactNativeSqlitePersister<
|
|
38
|
-
extends
|
|
37
|
+
export interface ReactNativeSqlitePersister<
|
|
38
|
+
Schemas extends OptionalSchemas,
|
|
39
|
+
> extends Persister<Schemas, Persists.StoreOrMergeableStore> {
|
|
39
40
|
/**
|
|
40
41
|
* The getDb method returns a reference to the database instance the Store is
|
|
41
42
|
* being persisted to.
|
|
@@ -24,8 +24,9 @@ import type {Persister} from '../../with-schemas/index.d.ts';
|
|
|
24
24
|
* @category Persister
|
|
25
25
|
* @since v4.3.14
|
|
26
26
|
*/
|
|
27
|
-
export interface RemotePersister<
|
|
28
|
-
extends
|
|
27
|
+
export interface RemotePersister<
|
|
28
|
+
Schemas extends OptionalSchemas,
|
|
29
|
+
> extends Persister<Schemas> {
|
|
29
30
|
/**
|
|
30
31
|
* The getUrls method returns the URLs the Store is being persisted to.
|
|
31
32
|
* @returns The load and save URLs as a two-item array.
|
|
@@ -25,8 +25,7 @@ import type {DatabasePersisterConfig, Persister, Persists} from '../index.d.ts';
|
|
|
25
25
|
* @category Persister
|
|
26
26
|
* @since v6.1.0
|
|
27
27
|
*/
|
|
28
|
-
export interface SqliteBunPersister
|
|
29
|
-
extends Persister<Persists.StoreOrMergeableStore> {
|
|
28
|
+
export interface SqliteBunPersister extends Persister<Persists.StoreOrMergeableStore> {
|
|
30
29
|
/**
|
|
31
30
|
* The getDb method returns a reference to the database instance the Store is
|
|
32
31
|
* being persisted to.
|
|
@@ -32,8 +32,9 @@ import type {
|
|
|
32
32
|
* @category Persister
|
|
33
33
|
* @since v6.1.0
|
|
34
34
|
*/
|
|
35
|
-
export interface SqliteBunPersister<
|
|
36
|
-
extends
|
|
35
|
+
export interface SqliteBunPersister<
|
|
36
|
+
Schemas extends OptionalSchemas,
|
|
37
|
+
> extends Persister<Schemas, Persists.StoreOrMergeableStore> {
|
|
37
38
|
/**
|
|
38
39
|
* The getDb method returns a reference to the database instance the Store is
|
|
39
40
|
* being persisted to.
|
|
@@ -24,8 +24,7 @@ import type {DatabasePersisterConfig, Persister, Persists} from '../index.d.ts';
|
|
|
24
24
|
* @category Persister
|
|
25
25
|
* @since v4.3.14
|
|
26
26
|
*/
|
|
27
|
-
export interface SqliteWasmPersister
|
|
28
|
-
extends Persister<Persists.StoreOrMergeableStore> {
|
|
27
|
+
export interface SqliteWasmPersister extends Persister<Persists.StoreOrMergeableStore> {
|
|
29
28
|
/**
|
|
30
29
|
* The getDb method returns a reference to the database instance the Store is
|
|
31
30
|
* being persisted to.
|
|
@@ -31,8 +31,9 @@ import type {
|
|
|
31
31
|
* @category Persister
|
|
32
32
|
* @since v4.3.14
|
|
33
33
|
*/
|
|
34
|
-
export interface SqliteWasmPersister<
|
|
35
|
-
extends
|
|
34
|
+
export interface SqliteWasmPersister<
|
|
35
|
+
Schemas extends OptionalSchemas,
|
|
36
|
+
> extends Persister<Schemas, Persists.StoreOrMergeableStore> {
|
|
36
37
|
/**
|
|
37
38
|
* The getDb method returns a reference to the database instance the Store is
|
|
38
39
|
* being persisted to.
|
|
@@ -25,8 +25,7 @@ import type {DatabasePersisterConfig, Persister, Persists} from '../index.d.ts';
|
|
|
25
25
|
* @category Persister
|
|
26
26
|
* @since v4.3.14
|
|
27
27
|
*/
|
|
28
|
-
export interface Sqlite3Persister
|
|
29
|
-
extends Persister<Persists.StoreOrMergeableStore> {
|
|
28
|
+
export interface Sqlite3Persister extends Persister<Persists.StoreOrMergeableStore> {
|
|
30
29
|
/**
|
|
31
30
|
* The getDb method returns a reference to the database instance the Store is
|
|
32
31
|
* being persisted to.
|
|
@@ -32,8 +32,9 @@ import type {
|
|
|
32
32
|
* @category Persister
|
|
33
33
|
* @since v4.3.14
|
|
34
34
|
*/
|
|
35
|
-
export interface Sqlite3Persister<
|
|
36
|
-
extends
|
|
35
|
+
export interface Sqlite3Persister<
|
|
36
|
+
Schemas extends OptionalSchemas,
|
|
37
|
+
> extends Persister<Schemas, Persists.StoreOrMergeableStore> {
|
|
37
38
|
/**
|
|
38
39
|
* The getDb method returns a reference to the database instance the Store is
|
|
39
40
|
* being persisted to.
|
|
@@ -30,8 +30,9 @@ import type {Persister} from '../../with-schemas/index.d.ts';
|
|
|
30
30
|
* @category Persister
|
|
31
31
|
* @since v4.3.14
|
|
32
32
|
*/
|
|
33
|
-
export interface YjsPersister<
|
|
34
|
-
extends
|
|
33
|
+
export interface YjsPersister<
|
|
34
|
+
Schemas extends OptionalSchemas,
|
|
35
|
+
> extends Persister<Schemas> {
|
|
35
36
|
/**
|
|
36
37
|
* The getYDoc method returns the Yjs document the Store is being persisted
|
|
37
38
|
* to.
|
|
@@ -766,10 +766,8 @@ export type GetTableCell<
|
|
|
766
766
|
*/
|
|
767
767
|
<
|
|
768
768
|
JoinedTableId extends TableIdFromSchema<Schema> | Id,
|
|
769
|
-
JoinedCellId extends JoinedCellIdOrId<
|
|
770
|
-
Schema,
|
|
771
|
-
JoinedTableId
|
|
772
|
-
> = JoinedCellIdOrId<Schema, JoinedTableId>,
|
|
769
|
+
JoinedCellId extends JoinedCellIdOrId<Schema, JoinedTableId> =
|
|
770
|
+
JoinedCellIdOrId<Schema, JoinedTableId>,
|
|
773
771
|
>(
|
|
774
772
|
joinedTableId: JoinedTableId,
|
|
775
773
|
joinedCellId: JoinedCellId,
|
|
@@ -1476,10 +1474,8 @@ export type Where<
|
|
|
1476
1474
|
*/
|
|
1477
1475
|
<
|
|
1478
1476
|
JoinedTableId extends TableIdFromSchema<Schema> | Id,
|
|
1479
|
-
JoinedCellId extends JoinedCellIdOrId<
|
|
1480
|
-
Schema,
|
|
1481
|
-
JoinedTableId
|
|
1482
|
-
> = JoinedCellIdOrId<Schema, JoinedTableId>,
|
|
1477
|
+
JoinedCellId extends JoinedCellIdOrId<Schema, JoinedTableId> =
|
|
1478
|
+
JoinedCellIdOrId<Schema, JoinedTableId>,
|
|
1483
1479
|
JoinedCell extends Cell<Schema, JoinedTableId, JoinedCellId> = Cell<
|
|
1484
1480
|
Schema,
|
|
1485
1481
|
JoinedTableId,
|
|
@@ -24,8 +24,9 @@ import type {Receive, Send, Synchronizer} from '../../with-schemas/index.d.ts';
|
|
|
24
24
|
* @category Synchronizer
|
|
25
25
|
* @since v5.0.0
|
|
26
26
|
*/
|
|
27
|
-
export interface BroadcastChannelSynchronizer<
|
|
28
|
-
extends
|
|
27
|
+
export interface BroadcastChannelSynchronizer<
|
|
28
|
+
Schemas extends OptionalSchemas,
|
|
29
|
+
> extends Synchronizer<Schemas> {
|
|
29
30
|
/**
|
|
30
31
|
* The getChannelName method returns the name of the channel being used for
|
|
31
32
|
* synchronization.
|
|
@@ -35,8 +35,9 @@ import type {Receive, Send, Synchronizer} from '../../with-schemas/index.d.ts';
|
|
|
35
35
|
* @category Synchronizer
|
|
36
36
|
* @since v5.0.0
|
|
37
37
|
*/
|
|
38
|
-
export interface LocalSynchronizer<
|
|
39
|
-
extends
|
|
38
|
+
export interface LocalSynchronizer<
|
|
39
|
+
Schemas extends OptionalSchemas,
|
|
40
|
+
> extends Synchronizer<Schemas> {}
|
|
40
41
|
|
|
41
42
|
/**
|
|
42
43
|
* The createLocalSynchronizer function creates a LocalSynchronizer object that
|
|
@@ -38,8 +38,9 @@ export type WebSocketTypes = WebSocket | WsWebSocket;
|
|
|
38
38
|
* @category Synchronizer
|
|
39
39
|
* @since v5.0.0
|
|
40
40
|
*/
|
|
41
|
-
export interface WsSynchronizer<
|
|
42
|
-
extends
|
|
41
|
+
export interface WsSynchronizer<
|
|
42
|
+
WebSocketType extends WebSocketTypes,
|
|
43
|
+
> extends Synchronizer {
|
|
43
44
|
/**
|
|
44
45
|
* The getWebSocket method returns a reference to the WebSocket being used for
|
|
45
46
|
* synchronization.
|
|
@@ -197,8 +197,9 @@ export type SynchronizerStats = {
|
|
|
197
197
|
* @essential Synchronizing stores
|
|
198
198
|
* @since v5.0.0
|
|
199
199
|
*/
|
|
200
|
-
export interface Synchronizer<
|
|
201
|
-
extends
|
|
200
|
+
export interface Synchronizer<
|
|
201
|
+
Schemas extends OptionalSchemas,
|
|
202
|
+
> extends Persister<Schemas, Persists.MergeableStoreOnly> {
|
|
202
203
|
/**
|
|
203
204
|
* The startSync method is used to start the process of synchronization
|
|
204
205
|
* between this instance and another matching Synchronizer.
|