tinybase 5.0.0-beta.27 → 5.0.0-beta.28
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/_internal/ui-react/with-schemas/index.d.cts +274 -0
- package/@types/_internal/ui-react/with-schemas/index.d.ts +274 -0
- package/@types/checkpoints/index.d.cts +30 -1
- package/@types/checkpoints/index.d.ts +30 -1
- package/@types/checkpoints/with-schemas/index.d.cts +30 -1
- package/@types/checkpoints/with-schemas/index.d.ts +30 -1
- package/@types/common/index.d.cts +9 -0
- package/@types/common/index.d.ts +9 -0
- package/@types/common/with-schemas/index.d.cts +9 -0
- package/@types/common/with-schemas/index.d.ts +9 -0
- package/@types/index.d.cts +1 -0
- package/@types/index.d.ts +1 -0
- package/@types/indexes/index.d.cts +32 -1
- package/@types/indexes/index.d.ts +32 -1
- package/@types/indexes/with-schemas/index.d.cts +32 -1
- package/@types/indexes/with-schemas/index.d.ts +32 -1
- package/@types/mergeable-store/index.d.cts +0 -2
- package/@types/mergeable-store/index.d.ts +0 -2
- package/@types/mergeable-store/with-schemas/index.d.cts +2 -2
- package/@types/mergeable-store/with-schemas/index.d.ts +2 -2
- package/@types/metrics/index.d.cts +30 -4
- package/@types/metrics/index.d.ts +30 -4
- package/@types/metrics/with-schemas/index.d.cts +30 -4
- package/@types/metrics/with-schemas/index.d.ts +30 -4
- package/@types/persisters/index.d.cts +87 -25
- package/@types/persisters/index.d.ts +87 -25
- package/@types/persisters/persister-automerge/index.d.cts +4 -4
- package/@types/persisters/persister-automerge/index.d.ts +4 -4
- package/@types/persisters/persister-automerge/with-schemas/index.d.cts +4 -4
- package/@types/persisters/persister-automerge/with-schemas/index.d.ts +4 -4
- package/@types/persisters/persister-browser/index.d.cts +7 -4
- package/@types/persisters/persister-browser/index.d.ts +7 -4
- package/@types/persisters/persister-browser/with-schemas/index.d.cts +7 -4
- package/@types/persisters/persister-browser/with-schemas/index.d.ts +7 -4
- package/@types/persisters/persister-cr-sqlite-wasm/index.d.cts +4 -4
- package/@types/persisters/persister-cr-sqlite-wasm/index.d.ts +4 -4
- package/@types/persisters/persister-cr-sqlite-wasm/with-schemas/index.d.cts +4 -4
- package/@types/persisters/persister-cr-sqlite-wasm/with-schemas/index.d.ts +4 -4
- package/@types/persisters/persister-electric-sql/index.d.cts +4 -4
- package/@types/persisters/persister-electric-sql/index.d.ts +4 -4
- package/@types/persisters/persister-electric-sql/with-schemas/index.d.cts +4 -4
- package/@types/persisters/persister-electric-sql/with-schemas/index.d.ts +4 -4
- package/@types/persisters/persister-expo-sqlite/index.d.cts +4 -4
- package/@types/persisters/persister-expo-sqlite/index.d.ts +4 -4
- package/@types/persisters/persister-expo-sqlite/with-schemas/index.d.cts +4 -4
- package/@types/persisters/persister-expo-sqlite/with-schemas/index.d.ts +4 -4
- package/@types/persisters/persister-file/index.d.cts +6 -4
- package/@types/persisters/persister-file/index.d.ts +6 -4
- package/@types/persisters/persister-file/with-schemas/index.d.cts +6 -4
- package/@types/persisters/persister-file/with-schemas/index.d.ts +6 -4
- package/@types/persisters/persister-indexed-db/index.d.cts +5 -4
- package/@types/persisters/persister-indexed-db/index.d.ts +5 -4
- package/@types/persisters/persister-indexed-db/with-schemas/index.d.cts +5 -4
- package/@types/persisters/persister-indexed-db/with-schemas/index.d.ts +5 -4
- package/@types/persisters/persister-libsql/index.d.cts +5 -4
- package/@types/persisters/persister-libsql/index.d.ts +5 -4
- package/@types/persisters/persister-libsql/with-schemas/index.d.cts +5 -4
- package/@types/persisters/persister-libsql/with-schemas/index.d.ts +5 -4
- package/@types/persisters/persister-partykit-client/index.d.cts +12 -6
- package/@types/persisters/persister-partykit-client/index.d.ts +12 -6
- package/@types/persisters/persister-partykit-client/with-schemas/index.d.cts +12 -6
- package/@types/persisters/persister-partykit-client/with-schemas/index.d.ts +12 -6
- package/@types/persisters/persister-partykit-server/index.d.cts +11 -3
- package/@types/persisters/persister-partykit-server/index.d.ts +11 -3
- package/@types/persisters/persister-partykit-server/with-schemas/index.d.cts +11 -3
- package/@types/persisters/persister-partykit-server/with-schemas/index.d.ts +11 -3
- package/@types/persisters/persister-powersync/index.d.cts +5 -4
- package/@types/persisters/persister-powersync/index.d.ts +5 -4
- package/@types/persisters/persister-powersync/with-schemas/index.d.cts +5 -4
- package/@types/persisters/persister-powersync/with-schemas/index.d.ts +5 -4
- package/@types/persisters/persister-remote/index.d.cts +6 -4
- package/@types/persisters/persister-remote/index.d.ts +6 -4
- package/@types/persisters/persister-remote/with-schemas/index.d.cts +6 -4
- package/@types/persisters/persister-remote/with-schemas/index.d.ts +6 -4
- package/@types/persisters/persister-sqlite-wasm/index.d.cts +4 -4
- package/@types/persisters/persister-sqlite-wasm/index.d.ts +4 -4
- package/@types/persisters/persister-sqlite-wasm/with-schemas/index.d.cts +4 -4
- package/@types/persisters/persister-sqlite-wasm/with-schemas/index.d.ts +4 -4
- package/@types/persisters/persister-sqlite3/index.d.cts +4 -4
- package/@types/persisters/persister-sqlite3/index.d.ts +4 -4
- package/@types/persisters/persister-sqlite3/with-schemas/index.d.cts +4 -4
- package/@types/persisters/persister-sqlite3/with-schemas/index.d.ts +4 -4
- package/@types/persisters/persister-yjs/index.d.cts +4 -4
- package/@types/persisters/persister-yjs/index.d.ts +4 -4
- package/@types/persisters/persister-yjs/with-schemas/index.d.cts +4 -4
- package/@types/persisters/persister-yjs/with-schemas/index.d.ts +4 -4
- package/@types/persisters/with-schemas/index.d.cts +87 -25
- package/@types/persisters/with-schemas/index.d.ts +87 -25
- package/@types/queries/index.d.cts +64 -4
- package/@types/queries/index.d.ts +64 -4
- package/@types/queries/with-schemas/index.d.cts +64 -4
- package/@types/queries/with-schemas/index.d.ts +64 -4
- package/@types/relationships/index.d.cts +34 -1
- package/@types/relationships/index.d.ts +34 -1
- package/@types/relationships/with-schemas/index.d.cts +34 -1
- package/@types/relationships/with-schemas/index.d.ts +34 -1
- package/@types/store/index.d.cts +125 -0
- package/@types/store/index.d.ts +125 -0
- package/@types/store/with-schemas/index.d.cts +125 -0
- package/@types/store/with-schemas/index.d.ts +125 -0
- package/@types/synchronizers/index.d.cts +32 -10
- package/@types/synchronizers/index.d.ts +32 -10
- package/@types/synchronizers/synchronizer-broadcast-channel/index.d.cts +114 -0
- package/@types/synchronizers/synchronizer-broadcast-channel/index.d.ts +114 -0
- package/@types/synchronizers/synchronizer-broadcast-channel/with-schemas/index.d.cts +128 -0
- package/@types/synchronizers/synchronizer-broadcast-channel/with-schemas/index.d.ts +128 -0
- package/@types/synchronizers/synchronizer-local/index.d.cts +16 -17
- package/@types/synchronizers/synchronizer-local/index.d.ts +16 -17
- package/@types/synchronizers/synchronizer-local/with-schemas/index.d.cts +16 -17
- package/@types/synchronizers/synchronizer-local/with-schemas/index.d.ts +16 -17
- package/@types/synchronizers/synchronizer-ws-client/index.d.cts +66 -6
- package/@types/synchronizers/synchronizer-ws-client/index.d.ts +66 -6
- package/@types/synchronizers/synchronizer-ws-client/with-schemas/index.d.cts +77 -6
- package/@types/synchronizers/synchronizer-ws-client/with-schemas/index.d.ts +77 -6
- package/@types/synchronizers/synchronizer-ws-server/index.d.cts +486 -7
- package/@types/synchronizers/synchronizer-ws-server/index.d.ts +486 -7
- package/@types/synchronizers/synchronizer-ws-server/with-schemas/index.d.cts +486 -7
- package/@types/synchronizers/synchronizer-ws-server/with-schemas/index.d.ts +486 -7
- package/@types/synchronizers/with-schemas/index.d.cts +29 -11
- package/@types/synchronizers/with-schemas/index.d.ts +29 -11
- package/@types/tools/index.d.cts +22 -0
- package/@types/tools/index.d.ts +22 -0
- package/@types/tools/with-schemas/index.d.cts +22 -0
- package/@types/tools/with-schemas/index.d.ts +22 -0
- package/@types/ui-react/index.d.cts +375 -1
- package/@types/ui-react/index.d.ts +375 -1
- package/@types/ui-react/with-schemas/index.d.cts +100 -1
- package/@types/ui-react/with-schemas/index.d.ts +100 -1
- package/@types/ui-react-dom/index.d.cts +112 -0
- package/@types/ui-react-dom/index.d.ts +112 -0
- package/@types/ui-react-dom/with-schemas/index.d.cts +112 -0
- package/@types/ui-react-dom/with-schemas/index.d.ts +112 -0
- package/@types/ui-react-inspector/index.d.cts +6 -2
- package/@types/ui-react-inspector/index.d.ts +6 -2
- package/@types/ui-react-inspector/with-schemas/index.d.cts +118 -2
- package/@types/ui-react-inspector/with-schemas/index.d.ts +118 -2
- package/@types/with-schemas/index.d.cts +1 -0
- package/@types/with-schemas/index.d.ts +1 -0
- package/cjs/es6/index.cjs +2 -2
- package/cjs/es6/min/synchronizers/synchronizer-broadcast-channel/index.cjs +1 -0
- package/cjs/es6/min/synchronizers/synchronizer-broadcast-channel/index.cjs.gz +0 -0
- package/cjs/es6/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.cjs +1 -0
- package/cjs/es6/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.cjs.gz +0 -0
- package/cjs/es6/min/synchronizers/synchronizer-ws-client/index.cjs +1 -1
- package/cjs/es6/min/synchronizers/synchronizer-ws-client/index.cjs.gz +0 -0
- package/cjs/es6/min/synchronizers/synchronizer-ws-client/with-schemas/index.cjs +1 -1
- package/cjs/es6/min/synchronizers/synchronizer-ws-client/with-schemas/index.cjs.gz +0 -0
- package/cjs/es6/synchronizers/index.cjs +2 -2
- package/cjs/es6/synchronizers/synchronizer-broadcast-channel/index.cjs +628 -0
- package/cjs/es6/synchronizers/synchronizer-broadcast-channel/with-schemas/index.cjs +628 -0
- package/cjs/es6/synchronizers/synchronizer-local/index.cjs +4 -4
- package/cjs/es6/synchronizers/synchronizer-local/with-schemas/index.cjs +4 -4
- package/cjs/es6/synchronizers/synchronizer-ws-client/index.cjs +15 -21
- package/cjs/es6/synchronizers/synchronizer-ws-client/with-schemas/index.cjs +15 -21
- package/cjs/es6/synchronizers/with-schemas/index.cjs +2 -2
- package/cjs/es6/with-schemas/index.cjs +2 -2
- package/cjs/index.cjs +2 -2
- package/cjs/min/synchronizers/synchronizer-broadcast-channel/index.cjs +1 -0
- package/cjs/min/synchronizers/synchronizer-broadcast-channel/index.cjs.gz +0 -0
- package/cjs/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.cjs +1 -0
- package/cjs/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.cjs.gz +0 -0
- package/cjs/min/synchronizers/synchronizer-ws-client/index.cjs +1 -1
- package/cjs/min/synchronizers/synchronizer-ws-client/index.cjs.gz +0 -0
- package/cjs/min/synchronizers/synchronizer-ws-client/with-schemas/index.cjs +1 -1
- package/cjs/min/synchronizers/synchronizer-ws-client/with-schemas/index.cjs.gz +0 -0
- package/cjs/synchronizers/index.cjs +2 -2
- package/cjs/synchronizers/synchronizer-broadcast-channel/index.cjs +500 -0
- package/cjs/synchronizers/synchronizer-broadcast-channel/with-schemas/index.cjs +500 -0
- package/cjs/synchronizers/synchronizer-local/index.cjs +4 -4
- package/cjs/synchronizers/synchronizer-local/with-schemas/index.cjs +4 -4
- package/cjs/synchronizers/synchronizer-ws-client/index.cjs +15 -21
- package/cjs/synchronizers/synchronizer-ws-client/with-schemas/index.cjs +15 -21
- package/cjs/synchronizers/with-schemas/index.cjs +2 -2
- package/cjs/with-schemas/index.cjs +2 -2
- package/es6/index.js +2 -2
- package/es6/min/synchronizers/synchronizer-broadcast-channel/index.js +1 -0
- package/es6/min/synchronizers/synchronizer-broadcast-channel/index.js.gz +0 -0
- package/es6/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +1 -0
- package/es6/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js.gz +0 -0
- package/es6/min/synchronizers/synchronizer-ws-client/index.js +1 -1
- package/es6/min/synchronizers/synchronizer-ws-client/index.js.gz +0 -0
- package/es6/min/synchronizers/synchronizer-ws-client/with-schemas/index.js +1 -1
- package/es6/min/synchronizers/synchronizer-ws-client/with-schemas/index.js.gz +0 -0
- package/es6/synchronizers/index.js +2 -2
- package/es6/synchronizers/synchronizer-broadcast-channel/index.js +626 -0
- package/es6/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +626 -0
- package/es6/synchronizers/synchronizer-local/index.js +4 -4
- package/es6/synchronizers/synchronizer-local/with-schemas/index.js +4 -4
- package/es6/synchronizers/synchronizer-ws-client/index.js +15 -21
- package/es6/synchronizers/synchronizer-ws-client/with-schemas/index.js +15 -21
- package/es6/synchronizers/with-schemas/index.js +2 -2
- package/es6/with-schemas/index.js +2 -2
- package/index.js +2 -2
- package/min/synchronizers/synchronizer-broadcast-channel/index.js +1 -0
- package/min/synchronizers/synchronizer-broadcast-channel/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +1 -0
- package/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-client/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-client/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-client/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-client/with-schemas/index.js.gz +0 -0
- package/package.json +105 -1
- package/readme.md +9 -9
- package/releases.md +4 -4
- package/synchronizers/index.js +2 -2
- package/synchronizers/synchronizer-broadcast-channel/index.js +498 -0
- package/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +498 -0
- package/synchronizers/synchronizer-local/index.js +4 -4
- package/synchronizers/synchronizer-local/with-schemas/index.js +4 -4
- package/synchronizers/synchronizer-ws-client/index.js +15 -21
- package/synchronizers/synchronizer-ws-client/with-schemas/index.js +15 -21
- package/synchronizers/with-schemas/index.js +2 -2
- package/umd/es6/index.js +2 -2
- package/umd/es6/min/synchronizers/synchronizer-broadcast-channel/index.js +1 -0
- package/umd/es6/min/synchronizers/synchronizer-broadcast-channel/index.js.gz +0 -0
- package/umd/es6/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +1 -0
- package/umd/es6/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js.gz +0 -0
- package/umd/es6/min/synchronizers/synchronizer-ws-client/index.js +1 -1
- package/umd/es6/min/synchronizers/synchronizer-ws-client/index.js.gz +0 -0
- package/umd/es6/min/synchronizers/synchronizer-ws-client/with-schemas/index.js +1 -1
- package/umd/es6/min/synchronizers/synchronizer-ws-client/with-schemas/index.js.gz +0 -0
- package/umd/es6/synchronizers/index.js +2 -2
- package/umd/es6/synchronizers/synchronizer-broadcast-channel/index.js +654 -0
- package/umd/es6/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +654 -0
- package/umd/es6/synchronizers/synchronizer-local/index.js +4 -4
- package/umd/es6/synchronizers/synchronizer-local/with-schemas/index.js +4 -4
- package/umd/es6/synchronizers/synchronizer-ws-client/index.js +15 -21
- package/umd/es6/synchronizers/synchronizer-ws-client/with-schemas/index.js +15 -21
- package/umd/es6/synchronizers/with-schemas/index.js +2 -2
- package/umd/es6/with-schemas/index.js +2 -2
- package/umd/index.js +2 -2
- package/umd/min/synchronizers/synchronizer-broadcast-channel/index.js +1 -0
- package/umd/min/synchronizers/synchronizer-broadcast-channel/index.js.gz +0 -0
- package/umd/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +1 -0
- package/umd/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js.gz +0 -0
- package/umd/min/synchronizers/synchronizer-ws-client/index.js +1 -1
- package/umd/min/synchronizers/synchronizer-ws-client/index.js.gz +0 -0
- package/umd/min/synchronizers/synchronizer-ws-client/with-schemas/index.js +1 -1
- package/umd/min/synchronizers/synchronizer-ws-client/with-schemas/index.js.gz +0 -0
- package/umd/synchronizers/index.js +2 -2
- package/umd/synchronizers/synchronizer-broadcast-channel/index.js +516 -0
- package/umd/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +516 -0
- package/umd/synchronizers/synchronizer-local/index.js +4 -4
- package/umd/synchronizers/synchronizer-local/with-schemas/index.js +4 -4
- package/umd/synchronizers/synchronizer-ws-client/index.js +15 -21
- package/umd/synchronizers/synchronizer-ws-client/with-schemas/index.js +15 -21
- package/umd/synchronizers/with-schemas/index.js +2 -2
- package/umd/with-schemas/index.js +2 -2
- package/with-schemas/index.js +2 -2
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* listeners for when they change.
|
|
9
9
|
* @packageDocumentation
|
|
10
10
|
* @module indexes
|
|
11
|
+
* @since v1.0.0
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
14
|
import type {GetCell, RowCallback, Store} from '../store/index.d.cts';
|
|
@@ -24,6 +25,7 @@ import type {Id, IdOrNull, Ids, SortKey} from '../common/index.d.cts';
|
|
|
24
25
|
* enumerate and access its structure with the getSliceIds method and
|
|
25
26
|
* getSliceRowIds method.
|
|
26
27
|
* @category Concept
|
|
28
|
+
* @since v1.0.0
|
|
27
29
|
*/
|
|
28
30
|
export type Index = {[sliceId: Id]: Slice};
|
|
29
31
|
|
|
@@ -37,6 +39,7 @@ export type Index = {[sliceId: Id]: Slice};
|
|
|
37
39
|
* Note that the Slice type is not actually used in the API, and you instead get
|
|
38
40
|
* Row Ids directly with the getSliceRowIds method.
|
|
39
41
|
* @category Concept
|
|
42
|
+
* @since v1.0.0
|
|
40
43
|
*/
|
|
41
44
|
export type Slice = Ids;
|
|
42
45
|
|
|
@@ -51,6 +54,7 @@ export type Slice = Ids;
|
|
|
51
54
|
* @param forEachRow A function that will let you iterate over the Slice objects
|
|
52
55
|
* in this Index.
|
|
53
56
|
* @category Callback
|
|
57
|
+
* @since v1.0.0
|
|
54
58
|
*/
|
|
55
59
|
export type IndexCallback = (
|
|
56
60
|
indexId: Id,
|
|
@@ -68,6 +72,7 @@ export type IndexCallback = (
|
|
|
68
72
|
* @param forEachRow A function that will let you iterate over the Row objects
|
|
69
73
|
* in this Slice.
|
|
70
74
|
* @category Callback
|
|
75
|
+
* @since v1.0.0
|
|
71
76
|
*/
|
|
72
77
|
export type SliceCallback = (
|
|
73
78
|
sliceId: Id,
|
|
@@ -84,6 +89,7 @@ export type SliceCallback = (
|
|
|
84
89
|
* When called, an IndexIdsListener is given a reference to the Indexes object.
|
|
85
90
|
* @param indexes A reference to the Indexes object that changed.
|
|
86
91
|
* @category Listener
|
|
92
|
+
* @since v1.0.0
|
|
87
93
|
*/
|
|
88
94
|
export type IndexIdsListener = (indexes: Indexes) => void;
|
|
89
95
|
|
|
@@ -99,6 +105,7 @@ export type IndexIdsListener = (indexes: Indexes) => void;
|
|
|
99
105
|
* @param indexes A reference to the Indexes object that changed.
|
|
100
106
|
* @param indexId The Id of the Index that changed.
|
|
101
107
|
* @category Listener
|
|
108
|
+
* @since v1.0.0
|
|
102
109
|
*/
|
|
103
110
|
export type SliceIdsListener = (indexes: Indexes, indexId: Id) => void;
|
|
104
111
|
|
|
@@ -116,6 +123,7 @@ export type SliceIdsListener = (indexes: Indexes, indexId: Id) => void;
|
|
|
116
123
|
* @param indexId The Id of the Index that changed.
|
|
117
124
|
* @param sliceId The Id of the Slice that changed.
|
|
118
125
|
* @category Listener
|
|
126
|
+
* @since v1.0.0
|
|
119
127
|
*/
|
|
120
128
|
export type SliceRowIdsListener = (
|
|
121
129
|
indexes: Indexes,
|
|
@@ -129,16 +137,21 @@ export type SliceRowIdsListener = (
|
|
|
129
137
|
*
|
|
130
138
|
* A IndexesListenerStats object is returned from the getListenerStats method.
|
|
131
139
|
* @category Development
|
|
140
|
+
* @since v1.0.0
|
|
132
141
|
*/
|
|
133
142
|
export type IndexesListenerStats = {
|
|
134
143
|
/**
|
|
135
144
|
* The number of SlideIdsListener functions registered with the Indexes
|
|
136
145
|
* object.
|
|
146
|
+
* @category Stat
|
|
147
|
+
* @since v1.0.0
|
|
137
148
|
*/
|
|
138
149
|
sliceIds: number;
|
|
139
150
|
/**
|
|
140
151
|
* The number of SliceRowIdsListener functions registered with the Indexes
|
|
141
152
|
* object.
|
|
153
|
+
* @category Stat
|
|
154
|
+
* @since v1.0.0
|
|
142
155
|
*/
|
|
143
156
|
sliceRowIds: number;
|
|
144
157
|
};
|
|
@@ -193,12 +206,13 @@ export type IndexesListenerStats = {
|
|
|
193
206
|
* indexes.delListener(listenerId);
|
|
194
207
|
* indexes.destroy();
|
|
195
208
|
* ```
|
|
196
|
-
* @see
|
|
209
|
+
* @see Using Indexes guides
|
|
197
210
|
* @see Rolling Dice demos
|
|
198
211
|
* @see Country demo
|
|
199
212
|
* @see Todo App demos
|
|
200
213
|
* @see Word Frequencies demo
|
|
201
214
|
* @category Indexes
|
|
215
|
+
* @since v1.0.0
|
|
202
216
|
*/
|
|
203
217
|
export interface Indexes {
|
|
204
218
|
//
|
|
@@ -360,6 +374,7 @@ export interface Indexes {
|
|
|
360
374
|
* // -> ['felix', 'fido']
|
|
361
375
|
* ```
|
|
362
376
|
* @category Configuration
|
|
377
|
+
* @since v1.0.0
|
|
363
378
|
*/
|
|
364
379
|
setIndexDefinition(
|
|
365
380
|
indexId: Id,
|
|
@@ -397,6 +412,7 @@ export interface Indexes {
|
|
|
397
412
|
* // -> []
|
|
398
413
|
* ```
|
|
399
414
|
* @category Configuration
|
|
415
|
+
* @since v1.0.0
|
|
400
416
|
*/
|
|
401
417
|
delIndexDefinition(indexId: Id): Indexes;
|
|
402
418
|
|
|
@@ -418,6 +434,7 @@ export interface Indexes {
|
|
|
418
434
|
* // -> ['dog']
|
|
419
435
|
* ```
|
|
420
436
|
* @category Getter
|
|
437
|
+
* @since v1.0.0
|
|
421
438
|
*/
|
|
422
439
|
getStore(): Store;
|
|
423
440
|
|
|
@@ -440,6 +457,7 @@ export interface Indexes {
|
|
|
440
457
|
* // -> ['bySpecies', 'byColor']
|
|
441
458
|
* ```
|
|
442
459
|
* @category Getter
|
|
460
|
+
* @since v1.0.0
|
|
443
461
|
*/
|
|
444
462
|
getIndexIds(): Ids;
|
|
445
463
|
|
|
@@ -481,6 +499,7 @@ export interface Indexes {
|
|
|
481
499
|
* // -> '- black'
|
|
482
500
|
* ```
|
|
483
501
|
* @category Iterator
|
|
502
|
+
* @since v1.0.0
|
|
484
503
|
*/
|
|
485
504
|
forEachIndex(indexCallback: IndexCallback): void;
|
|
486
505
|
|
|
@@ -519,6 +538,7 @@ export interface Indexes {
|
|
|
519
538
|
* // -> '- felix'
|
|
520
539
|
* ```
|
|
521
540
|
* @category Iterator
|
|
541
|
+
* @since v1.0.0
|
|
522
542
|
*/
|
|
523
543
|
forEachSlice(indexId: Id, sliceCallback: SliceCallback): void;
|
|
524
544
|
|
|
@@ -541,6 +561,7 @@ export interface Indexes {
|
|
|
541
561
|
* // -> false
|
|
542
562
|
* ```
|
|
543
563
|
* @category Getter
|
|
564
|
+
* @since v1.0.0
|
|
544
565
|
*/
|
|
545
566
|
hasIndex(indexId: Id): boolean;
|
|
546
567
|
|
|
@@ -569,6 +590,7 @@ export interface Indexes {
|
|
|
569
590
|
* // -> false
|
|
570
591
|
* ```
|
|
571
592
|
* @category Getter
|
|
593
|
+
* @since v1.0.0
|
|
572
594
|
*/
|
|
573
595
|
hasSlice(indexId: Id, sliceId: Id): boolean;
|
|
574
596
|
|
|
@@ -595,6 +617,7 @@ export interface Indexes {
|
|
|
595
617
|
* // -> undefined
|
|
596
618
|
* ```
|
|
597
619
|
* @category Getter
|
|
620
|
+
* @since v1.0.0
|
|
598
621
|
*/
|
|
599
622
|
getTableId(indexId: Id): Id | undefined;
|
|
600
623
|
|
|
@@ -628,6 +651,7 @@ export interface Indexes {
|
|
|
628
651
|
* // -> []
|
|
629
652
|
* ```
|
|
630
653
|
* @category Getter
|
|
654
|
+
* @since v1.0.0
|
|
631
655
|
*/
|
|
632
656
|
getSliceIds(indexId: Id): Ids;
|
|
633
657
|
|
|
@@ -665,6 +689,7 @@ export interface Indexes {
|
|
|
665
689
|
* // -> []
|
|
666
690
|
* ```
|
|
667
691
|
* @category Getter
|
|
692
|
+
* @since v1.0.0
|
|
668
693
|
*/
|
|
669
694
|
getSliceRowIds(indexId: Id, sliceId: Id): Ids;
|
|
670
695
|
|
|
@@ -745,6 +770,7 @@ export interface Indexes {
|
|
|
745
770
|
* indexes.delListener(listenerId);
|
|
746
771
|
* ```
|
|
747
772
|
* @category Listener
|
|
773
|
+
* @since v1.0.0
|
|
748
774
|
*/
|
|
749
775
|
addSliceIdsListener(indexId: IdOrNull, listener: SliceIdsListener): Id;
|
|
750
776
|
|
|
@@ -877,6 +903,7 @@ export interface Indexes {
|
|
|
877
903
|
* indexes.delListener(listenerId);
|
|
878
904
|
* ```
|
|
879
905
|
* @category Listener
|
|
906
|
+
* @since v1.0.0
|
|
880
907
|
*/
|
|
881
908
|
addSliceRowIdsListener(
|
|
882
909
|
indexId: IdOrNull,
|
|
@@ -923,6 +950,7 @@ export interface Indexes {
|
|
|
923
950
|
* // The listener is not called.
|
|
924
951
|
* ```
|
|
925
952
|
* @category Listener
|
|
953
|
+
* @since v1.0.0
|
|
926
954
|
*/
|
|
927
955
|
delListener(listenerId: Id): Indexes;
|
|
928
956
|
|
|
@@ -957,6 +985,7 @@ export interface Indexes {
|
|
|
957
985
|
* // -> 0
|
|
958
986
|
* ```
|
|
959
987
|
* @category Lifecycle
|
|
988
|
+
* @since v1.0.0
|
|
960
989
|
*/
|
|
961
990
|
destroy(): void;
|
|
962
991
|
|
|
@@ -991,6 +1020,7 @@ export interface Indexes {
|
|
|
991
1020
|
* // -> {sliceIds: 1, sliceRowIds: 1}
|
|
992
1021
|
* ```
|
|
993
1022
|
* @category Development
|
|
1023
|
+
* @since v1.0.0
|
|
994
1024
|
*/
|
|
995
1025
|
getListenerStats(): IndexesListenerStats;
|
|
996
1026
|
//
|
|
@@ -1030,5 +1060,6 @@ export interface Indexes {
|
|
|
1030
1060
|
* // -> true
|
|
1031
1061
|
* ```
|
|
1032
1062
|
* @category Creation
|
|
1063
|
+
* @since v1.0.0
|
|
1033
1064
|
*/
|
|
1034
1065
|
export function createIndexes(store: Store): Indexes;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* listeners for when they change.
|
|
9
9
|
* @packageDocumentation
|
|
10
10
|
* @module indexes
|
|
11
|
+
* @since v1.0.0
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
14
|
import type {GetCell, RowCallback, Store} from '../store/index.d.ts';
|
|
@@ -24,6 +25,7 @@ import type {Id, IdOrNull, Ids, SortKey} from '../common/index.d.ts';
|
|
|
24
25
|
* enumerate and access its structure with the getSliceIds method and
|
|
25
26
|
* getSliceRowIds method.
|
|
26
27
|
* @category Concept
|
|
28
|
+
* @since v1.0.0
|
|
27
29
|
*/
|
|
28
30
|
export type Index = {[sliceId: Id]: Slice};
|
|
29
31
|
|
|
@@ -37,6 +39,7 @@ export type Index = {[sliceId: Id]: Slice};
|
|
|
37
39
|
* Note that the Slice type is not actually used in the API, and you instead get
|
|
38
40
|
* Row Ids directly with the getSliceRowIds method.
|
|
39
41
|
* @category Concept
|
|
42
|
+
* @since v1.0.0
|
|
40
43
|
*/
|
|
41
44
|
export type Slice = Ids;
|
|
42
45
|
|
|
@@ -51,6 +54,7 @@ export type Slice = Ids;
|
|
|
51
54
|
* @param forEachRow A function that will let you iterate over the Slice objects
|
|
52
55
|
* in this Index.
|
|
53
56
|
* @category Callback
|
|
57
|
+
* @since v1.0.0
|
|
54
58
|
*/
|
|
55
59
|
export type IndexCallback = (
|
|
56
60
|
indexId: Id,
|
|
@@ -68,6 +72,7 @@ export type IndexCallback = (
|
|
|
68
72
|
* @param forEachRow A function that will let you iterate over the Row objects
|
|
69
73
|
* in this Slice.
|
|
70
74
|
* @category Callback
|
|
75
|
+
* @since v1.0.0
|
|
71
76
|
*/
|
|
72
77
|
export type SliceCallback = (
|
|
73
78
|
sliceId: Id,
|
|
@@ -84,6 +89,7 @@ export type SliceCallback = (
|
|
|
84
89
|
* When called, an IndexIdsListener is given a reference to the Indexes object.
|
|
85
90
|
* @param indexes A reference to the Indexes object that changed.
|
|
86
91
|
* @category Listener
|
|
92
|
+
* @since v1.0.0
|
|
87
93
|
*/
|
|
88
94
|
export type IndexIdsListener = (indexes: Indexes) => void;
|
|
89
95
|
|
|
@@ -99,6 +105,7 @@ export type IndexIdsListener = (indexes: Indexes) => void;
|
|
|
99
105
|
* @param indexes A reference to the Indexes object that changed.
|
|
100
106
|
* @param indexId The Id of the Index that changed.
|
|
101
107
|
* @category Listener
|
|
108
|
+
* @since v1.0.0
|
|
102
109
|
*/
|
|
103
110
|
export type SliceIdsListener = (indexes: Indexes, indexId: Id) => void;
|
|
104
111
|
|
|
@@ -116,6 +123,7 @@ export type SliceIdsListener = (indexes: Indexes, indexId: Id) => void;
|
|
|
116
123
|
* @param indexId The Id of the Index that changed.
|
|
117
124
|
* @param sliceId The Id of the Slice that changed.
|
|
118
125
|
* @category Listener
|
|
126
|
+
* @since v1.0.0
|
|
119
127
|
*/
|
|
120
128
|
export type SliceRowIdsListener = (
|
|
121
129
|
indexes: Indexes,
|
|
@@ -129,16 +137,21 @@ export type SliceRowIdsListener = (
|
|
|
129
137
|
*
|
|
130
138
|
* A IndexesListenerStats object is returned from the getListenerStats method.
|
|
131
139
|
* @category Development
|
|
140
|
+
* @since v1.0.0
|
|
132
141
|
*/
|
|
133
142
|
export type IndexesListenerStats = {
|
|
134
143
|
/**
|
|
135
144
|
* The number of SlideIdsListener functions registered with the Indexes
|
|
136
145
|
* object.
|
|
146
|
+
* @category Stat
|
|
147
|
+
* @since v1.0.0
|
|
137
148
|
*/
|
|
138
149
|
sliceIds: number;
|
|
139
150
|
/**
|
|
140
151
|
* The number of SliceRowIdsListener functions registered with the Indexes
|
|
141
152
|
* object.
|
|
153
|
+
* @category Stat
|
|
154
|
+
* @since v1.0.0
|
|
142
155
|
*/
|
|
143
156
|
sliceRowIds: number;
|
|
144
157
|
};
|
|
@@ -193,12 +206,13 @@ export type IndexesListenerStats = {
|
|
|
193
206
|
* indexes.delListener(listenerId);
|
|
194
207
|
* indexes.destroy();
|
|
195
208
|
* ```
|
|
196
|
-
* @see
|
|
209
|
+
* @see Using Indexes guides
|
|
197
210
|
* @see Rolling Dice demos
|
|
198
211
|
* @see Country demo
|
|
199
212
|
* @see Todo App demos
|
|
200
213
|
* @see Word Frequencies demo
|
|
201
214
|
* @category Indexes
|
|
215
|
+
* @since v1.0.0
|
|
202
216
|
*/
|
|
203
217
|
export interface Indexes {
|
|
204
218
|
//
|
|
@@ -360,6 +374,7 @@ export interface Indexes {
|
|
|
360
374
|
* // -> ['felix', 'fido']
|
|
361
375
|
* ```
|
|
362
376
|
* @category Configuration
|
|
377
|
+
* @since v1.0.0
|
|
363
378
|
*/
|
|
364
379
|
setIndexDefinition(
|
|
365
380
|
indexId: Id,
|
|
@@ -397,6 +412,7 @@ export interface Indexes {
|
|
|
397
412
|
* // -> []
|
|
398
413
|
* ```
|
|
399
414
|
* @category Configuration
|
|
415
|
+
* @since v1.0.0
|
|
400
416
|
*/
|
|
401
417
|
delIndexDefinition(indexId: Id): Indexes;
|
|
402
418
|
|
|
@@ -418,6 +434,7 @@ export interface Indexes {
|
|
|
418
434
|
* // -> ['dog']
|
|
419
435
|
* ```
|
|
420
436
|
* @category Getter
|
|
437
|
+
* @since v1.0.0
|
|
421
438
|
*/
|
|
422
439
|
getStore(): Store;
|
|
423
440
|
|
|
@@ -440,6 +457,7 @@ export interface Indexes {
|
|
|
440
457
|
* // -> ['bySpecies', 'byColor']
|
|
441
458
|
* ```
|
|
442
459
|
* @category Getter
|
|
460
|
+
* @since v1.0.0
|
|
443
461
|
*/
|
|
444
462
|
getIndexIds(): Ids;
|
|
445
463
|
|
|
@@ -481,6 +499,7 @@ export interface Indexes {
|
|
|
481
499
|
* // -> '- black'
|
|
482
500
|
* ```
|
|
483
501
|
* @category Iterator
|
|
502
|
+
* @since v1.0.0
|
|
484
503
|
*/
|
|
485
504
|
forEachIndex(indexCallback: IndexCallback): void;
|
|
486
505
|
|
|
@@ -519,6 +538,7 @@ export interface Indexes {
|
|
|
519
538
|
* // -> '- felix'
|
|
520
539
|
* ```
|
|
521
540
|
* @category Iterator
|
|
541
|
+
* @since v1.0.0
|
|
522
542
|
*/
|
|
523
543
|
forEachSlice(indexId: Id, sliceCallback: SliceCallback): void;
|
|
524
544
|
|
|
@@ -541,6 +561,7 @@ export interface Indexes {
|
|
|
541
561
|
* // -> false
|
|
542
562
|
* ```
|
|
543
563
|
* @category Getter
|
|
564
|
+
* @since v1.0.0
|
|
544
565
|
*/
|
|
545
566
|
hasIndex(indexId: Id): boolean;
|
|
546
567
|
|
|
@@ -569,6 +590,7 @@ export interface Indexes {
|
|
|
569
590
|
* // -> false
|
|
570
591
|
* ```
|
|
571
592
|
* @category Getter
|
|
593
|
+
* @since v1.0.0
|
|
572
594
|
*/
|
|
573
595
|
hasSlice(indexId: Id, sliceId: Id): boolean;
|
|
574
596
|
|
|
@@ -595,6 +617,7 @@ export interface Indexes {
|
|
|
595
617
|
* // -> undefined
|
|
596
618
|
* ```
|
|
597
619
|
* @category Getter
|
|
620
|
+
* @since v1.0.0
|
|
598
621
|
*/
|
|
599
622
|
getTableId(indexId: Id): Id | undefined;
|
|
600
623
|
|
|
@@ -628,6 +651,7 @@ export interface Indexes {
|
|
|
628
651
|
* // -> []
|
|
629
652
|
* ```
|
|
630
653
|
* @category Getter
|
|
654
|
+
* @since v1.0.0
|
|
631
655
|
*/
|
|
632
656
|
getSliceIds(indexId: Id): Ids;
|
|
633
657
|
|
|
@@ -665,6 +689,7 @@ export interface Indexes {
|
|
|
665
689
|
* // -> []
|
|
666
690
|
* ```
|
|
667
691
|
* @category Getter
|
|
692
|
+
* @since v1.0.0
|
|
668
693
|
*/
|
|
669
694
|
getSliceRowIds(indexId: Id, sliceId: Id): Ids;
|
|
670
695
|
|
|
@@ -745,6 +770,7 @@ export interface Indexes {
|
|
|
745
770
|
* indexes.delListener(listenerId);
|
|
746
771
|
* ```
|
|
747
772
|
* @category Listener
|
|
773
|
+
* @since v1.0.0
|
|
748
774
|
*/
|
|
749
775
|
addSliceIdsListener(indexId: IdOrNull, listener: SliceIdsListener): Id;
|
|
750
776
|
|
|
@@ -877,6 +903,7 @@ export interface Indexes {
|
|
|
877
903
|
* indexes.delListener(listenerId);
|
|
878
904
|
* ```
|
|
879
905
|
* @category Listener
|
|
906
|
+
* @since v1.0.0
|
|
880
907
|
*/
|
|
881
908
|
addSliceRowIdsListener(
|
|
882
909
|
indexId: IdOrNull,
|
|
@@ -923,6 +950,7 @@ export interface Indexes {
|
|
|
923
950
|
* // The listener is not called.
|
|
924
951
|
* ```
|
|
925
952
|
* @category Listener
|
|
953
|
+
* @since v1.0.0
|
|
926
954
|
*/
|
|
927
955
|
delListener(listenerId: Id): Indexes;
|
|
928
956
|
|
|
@@ -957,6 +985,7 @@ export interface Indexes {
|
|
|
957
985
|
* // -> 0
|
|
958
986
|
* ```
|
|
959
987
|
* @category Lifecycle
|
|
988
|
+
* @since v1.0.0
|
|
960
989
|
*/
|
|
961
990
|
destroy(): void;
|
|
962
991
|
|
|
@@ -991,6 +1020,7 @@ export interface Indexes {
|
|
|
991
1020
|
* // -> {sliceIds: 1, sliceRowIds: 1}
|
|
992
1021
|
* ```
|
|
993
1022
|
* @category Development
|
|
1023
|
+
* @since v1.0.0
|
|
994
1024
|
*/
|
|
995
1025
|
getListenerStats(): IndexesListenerStats;
|
|
996
1026
|
//
|
|
@@ -1030,5 +1060,6 @@ export interface Indexes {
|
|
|
1030
1060
|
* // -> true
|
|
1031
1061
|
* ```
|
|
1032
1062
|
* @category Creation
|
|
1063
|
+
* @since v1.0.0
|
|
1033
1064
|
*/
|
|
1034
1065
|
export function createIndexes(store: Store): Indexes;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* listeners for when they change.
|
|
9
9
|
* @packageDocumentation
|
|
10
10
|
* @module indexes
|
|
11
|
+
* @since v1.0.0
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
14
|
import type {
|
|
@@ -39,6 +40,7 @@ import type {
|
|
|
39
40
|
* enumerate and access its structure with the getSliceIds method and
|
|
40
41
|
* getSliceRowIds method.
|
|
41
42
|
* @category Concept
|
|
43
|
+
* @since v1.0.0
|
|
42
44
|
*/
|
|
43
45
|
export type Index = {[sliceId: Id]: Slice};
|
|
44
46
|
|
|
@@ -52,6 +54,7 @@ export type Index = {[sliceId: Id]: Slice};
|
|
|
52
54
|
* Note that the Slice type is not actually used in the API, and you instead get
|
|
53
55
|
* Row Ids directly with the getSliceRowIds method.
|
|
54
56
|
* @category Concept
|
|
57
|
+
* @since v1.0.0
|
|
55
58
|
*/
|
|
56
59
|
export type Slice = Ids;
|
|
57
60
|
|
|
@@ -75,6 +78,7 @@ export type Slice = Ids;
|
|
|
75
78
|
* @param forEachRow A function that will let you iterate over the Slice objects
|
|
76
79
|
* in this Index.
|
|
77
80
|
* @category Callback
|
|
81
|
+
* @since v1.0.0
|
|
78
82
|
*/
|
|
79
83
|
export type IndexCallback<Schema extends OptionalTablesSchema> = (
|
|
80
84
|
indexId: Id,
|
|
@@ -101,6 +105,7 @@ export type IndexCallback<Schema extends OptionalTablesSchema> = (
|
|
|
101
105
|
* @param forEachRow A function that will let you iterate over the Row objects
|
|
102
106
|
* in this Slice.
|
|
103
107
|
* @category Callback
|
|
108
|
+
* @since v1.0.0
|
|
104
109
|
*/
|
|
105
110
|
export type SliceCallback<Schema extends OptionalTablesSchema> = (
|
|
106
111
|
sliceId: Id,
|
|
@@ -123,6 +128,7 @@ export type SliceCallback<Schema extends OptionalTablesSchema> = (
|
|
|
123
128
|
* When called, an IndexIdsListener is given a reference to the Indexes object.
|
|
124
129
|
* @param indexes A reference to the Indexes object that changed.
|
|
125
130
|
* @category Listener
|
|
131
|
+
* @since v1.0.0
|
|
126
132
|
*/
|
|
127
133
|
export type IndexIdsListener<Schemas extends OptionalSchemas> = (
|
|
128
134
|
indexes: Indexes<Schemas>,
|
|
@@ -146,6 +152,7 @@ export type IndexIdsListener<Schemas extends OptionalSchemas> = (
|
|
|
146
152
|
* @param indexes A reference to the Indexes object that changed.
|
|
147
153
|
* @param indexId The Id of the Index that changed.
|
|
148
154
|
* @category Listener
|
|
155
|
+
* @since v1.0.0
|
|
149
156
|
*/
|
|
150
157
|
export type SliceIdsListener<Schemas extends OptionalSchemas> = (
|
|
151
158
|
indexes: Indexes<Schemas>,
|
|
@@ -176,6 +183,7 @@ export type SliceIdsListener<Schemas extends OptionalSchemas> = (
|
|
|
176
183
|
* @param indexId The Id of the Index that changed.
|
|
177
184
|
* @param sliceId The Id of the Slice that changed.
|
|
178
185
|
* @category Listener
|
|
186
|
+
* @since v1.0.0
|
|
179
187
|
*/
|
|
180
188
|
export type SliceRowIdsListener<Schemas extends OptionalSchemas> = (
|
|
181
189
|
indexes: Indexes<Schemas>,
|
|
@@ -189,16 +197,21 @@ export type SliceRowIdsListener<Schemas extends OptionalSchemas> = (
|
|
|
189
197
|
*
|
|
190
198
|
* A IndexesListenerStats object is returned from the getListenerStats method.
|
|
191
199
|
* @category Development
|
|
200
|
+
* @since v1.0.0
|
|
192
201
|
*/
|
|
193
202
|
export type IndexesListenerStats = {
|
|
194
203
|
/**
|
|
195
204
|
* The number of SlideIdsListener functions registered with the Indexes
|
|
196
205
|
* object.
|
|
206
|
+
* @category Stat
|
|
207
|
+
* @since v1.0.0
|
|
197
208
|
*/
|
|
198
209
|
sliceIds: number;
|
|
199
210
|
/**
|
|
200
211
|
* The number of SliceRowIdsListener functions registered with the Indexes
|
|
201
212
|
* object.
|
|
213
|
+
* @category Stat
|
|
214
|
+
* @since v1.0.0
|
|
202
215
|
*/
|
|
203
216
|
sliceRowIds: number;
|
|
204
217
|
};
|
|
@@ -253,12 +266,13 @@ export type IndexesListenerStats = {
|
|
|
253
266
|
* indexes.delListener(listenerId);
|
|
254
267
|
* indexes.destroy();
|
|
255
268
|
* ```
|
|
256
|
-
* @see
|
|
269
|
+
* @see Using Indexes guides
|
|
257
270
|
* @see Rolling Dice demos
|
|
258
271
|
* @see Country demo
|
|
259
272
|
* @see Todo App demos
|
|
260
273
|
* @see Word Frequencies demo
|
|
261
274
|
* @category Indexes
|
|
275
|
+
* @since v1.0.0
|
|
262
276
|
*/
|
|
263
277
|
export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
264
278
|
/**
|
|
@@ -432,6 +446,7 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
432
446
|
* // -> ['felix', 'fido']
|
|
433
447
|
* ```
|
|
434
448
|
* @category Configuration
|
|
449
|
+
* @since v1.0.0
|
|
435
450
|
*/
|
|
436
451
|
setIndexDefinition<TableId extends TableIdFromSchema<Schemas[0]>>(
|
|
437
452
|
indexId: Id,
|
|
@@ -479,6 +494,7 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
479
494
|
* // -> []
|
|
480
495
|
* ```
|
|
481
496
|
* @category Configuration
|
|
497
|
+
* @since v1.0.0
|
|
482
498
|
*/
|
|
483
499
|
delIndexDefinition(indexId: Id): Indexes<Schemas>;
|
|
484
500
|
|
|
@@ -506,6 +522,7 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
506
522
|
* // -> ['dog']
|
|
507
523
|
* ```
|
|
508
524
|
* @category Getter
|
|
525
|
+
* @since v1.0.0
|
|
509
526
|
*/
|
|
510
527
|
getStore(): Store<Schemas>;
|
|
511
528
|
|
|
@@ -528,6 +545,7 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
528
545
|
* // -> ['bySpecies', 'byColor']
|
|
529
546
|
* ```
|
|
530
547
|
* @category Getter
|
|
548
|
+
* @since v1.0.0
|
|
531
549
|
*/
|
|
532
550
|
getIndexIds(): Ids;
|
|
533
551
|
|
|
@@ -575,6 +593,7 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
575
593
|
* // -> '- black'
|
|
576
594
|
* ```
|
|
577
595
|
* @category Iterator
|
|
596
|
+
* @since v1.0.0
|
|
578
597
|
*/
|
|
579
598
|
forEachIndex(indexCallback: IndexCallback<Schemas[0]>): void;
|
|
580
599
|
|
|
@@ -619,6 +638,7 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
619
638
|
* // -> '- felix'
|
|
620
639
|
* ```
|
|
621
640
|
* @category Iterator
|
|
641
|
+
* @since v1.0.0
|
|
622
642
|
*/
|
|
623
643
|
forEachSlice(indexId: Id, sliceCallback: SliceCallback<Schemas[0]>): void;
|
|
624
644
|
|
|
@@ -641,6 +661,7 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
641
661
|
* // -> false
|
|
642
662
|
* ```
|
|
643
663
|
* @category Getter
|
|
664
|
+
* @since v1.0.0
|
|
644
665
|
*/
|
|
645
666
|
hasIndex(indexId: Id): boolean;
|
|
646
667
|
|
|
@@ -669,6 +690,7 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
669
690
|
* // -> false
|
|
670
691
|
* ```
|
|
671
692
|
* @category Getter
|
|
693
|
+
* @since v1.0.0
|
|
672
694
|
*/
|
|
673
695
|
hasSlice(indexId: Id, sliceId: Id): boolean;
|
|
674
696
|
|
|
@@ -701,6 +723,7 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
701
723
|
* // -> undefined
|
|
702
724
|
* ```
|
|
703
725
|
* @category Getter
|
|
726
|
+
* @since v1.0.0
|
|
704
727
|
*/
|
|
705
728
|
getTableId<TableId extends TableIdFromSchema<Schemas[0]>>(
|
|
706
729
|
indexId: Id,
|
|
@@ -736,6 +759,7 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
736
759
|
* // -> []
|
|
737
760
|
* ```
|
|
738
761
|
* @category Getter
|
|
762
|
+
* @since v1.0.0
|
|
739
763
|
*/
|
|
740
764
|
getSliceIds(indexId: Id): Ids;
|
|
741
765
|
|
|
@@ -773,6 +797,7 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
773
797
|
* // -> []
|
|
774
798
|
* ```
|
|
775
799
|
* @category Getter
|
|
800
|
+
* @since v1.0.0
|
|
776
801
|
*/
|
|
777
802
|
getSliceRowIds(indexId: Id, sliceId: Id): Ids;
|
|
778
803
|
|
|
@@ -905,6 +930,7 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
905
930
|
* indexes.delListener(listenerId);
|
|
906
931
|
* ```
|
|
907
932
|
* @category Listener
|
|
933
|
+
* @since v1.0.0
|
|
908
934
|
*/
|
|
909
935
|
addSliceIdsListener(
|
|
910
936
|
indexId: IdOrNull,
|
|
@@ -1010,6 +1036,7 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
1010
1036
|
* indexes.delListener(listenerId);
|
|
1011
1037
|
* ```
|
|
1012
1038
|
* @category Listener
|
|
1039
|
+
* @since v1.0.0
|
|
1013
1040
|
*/
|
|
1014
1041
|
addSliceRowIdsListener(
|
|
1015
1042
|
indexId: IdOrNull,
|
|
@@ -1062,6 +1089,7 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
1062
1089
|
* // The listener is not called.
|
|
1063
1090
|
* ```
|
|
1064
1091
|
* @category Listener
|
|
1092
|
+
* @since v1.0.0
|
|
1065
1093
|
*/
|
|
1066
1094
|
delListener(listenerId: Id): Indexes<Schemas>;
|
|
1067
1095
|
|
|
@@ -1096,6 +1124,7 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
1096
1124
|
* // -> 0
|
|
1097
1125
|
* ```
|
|
1098
1126
|
* @category Lifecycle
|
|
1127
|
+
* @since v1.0.0
|
|
1099
1128
|
*/
|
|
1100
1129
|
destroy(): void;
|
|
1101
1130
|
|
|
@@ -1130,6 +1159,7 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
1130
1159
|
* // -> {sliceIds: 1, sliceRowIds: 1}
|
|
1131
1160
|
* ```
|
|
1132
1161
|
* @category Development
|
|
1162
|
+
* @since v1.0.0
|
|
1133
1163
|
*/
|
|
1134
1164
|
getListenerStats(): IndexesListenerStats;
|
|
1135
1165
|
}
|
|
@@ -1174,6 +1204,7 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
1174
1204
|
* // -> true
|
|
1175
1205
|
* ```
|
|
1176
1206
|
* @category Creation
|
|
1207
|
+
* @since v1.0.0
|
|
1177
1208
|
*/
|
|
1178
1209
|
export function createIndexes<Schemas extends OptionalSchemas>(
|
|
1179
1210
|
store: Store<Schemas>,
|