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
|
@@ -49,6 +49,7 @@ import type {GetIdChanges} from '../../store/index.d.cts';
|
|
|
49
49
|
* };
|
|
50
50
|
* ```
|
|
51
51
|
* @category Result
|
|
52
|
+
* @since v2.0.0
|
|
52
53
|
*/
|
|
53
54
|
export type ResultTable = {[rowId: Id]: ResultRow};
|
|
54
55
|
|
|
@@ -67,6 +68,7 @@ export type ResultTable = {[rowId: Id]: ResultRow};
|
|
|
67
68
|
* export const resultRow: ResultRow = {species: 'dog', color: 'brown'};
|
|
68
69
|
* ```
|
|
69
70
|
* @category Result
|
|
71
|
+
* @since v2.0.0
|
|
70
72
|
*/
|
|
71
73
|
export type ResultRow = {[cellId: Id]: ResultCell};
|
|
72
74
|
|
|
@@ -85,6 +87,7 @@ export type ResultRow = {[cellId: Id]: ResultCell};
|
|
|
85
87
|
* export const resultCell: ResultCell = 'dog';
|
|
86
88
|
* ```
|
|
87
89
|
* @category Result
|
|
90
|
+
* @since v2.0.0
|
|
88
91
|
*/
|
|
89
92
|
export type ResultCell = string | number | boolean;
|
|
90
93
|
|
|
@@ -92,6 +95,7 @@ export type ResultCell = string | number | boolean;
|
|
|
92
95
|
* The ResultCellOrUndefined type is the data structure representing a single
|
|
93
96
|
* cell in the results of a query, or the value `undefined`.
|
|
94
97
|
* @category Result
|
|
98
|
+
* @since v2.0.0
|
|
95
99
|
*/
|
|
96
100
|
export type ResultCellOrUndefined = ResultCell | undefined;
|
|
97
101
|
|
|
@@ -123,7 +127,7 @@ export type Aggregate = (cells: ResultCell[], length: number) => ResultCell;
|
|
|
123
127
|
* being added, return `undefined` and the aggregation will be completely
|
|
124
128
|
* recalculated.
|
|
125
129
|
*
|
|
126
|
-
*
|
|
130
|
+
* When possible, if you are providing a custom Aggregate, seek an
|
|
127
131
|
* implementation of an AggregateAdd function that can reduce the complexity
|
|
128
132
|
* cost of growing the input data set.
|
|
129
133
|
* @param current The current value of the aggregation.
|
|
@@ -155,7 +159,7 @@ export type AggregateAdd = (
|
|
|
155
159
|
* values, and the previous minimum is being removed. The whole of the rest of
|
|
156
160
|
* the list will need to be re-scanned to find a new minimum.
|
|
157
161
|
*
|
|
158
|
-
*
|
|
162
|
+
* When possible, if you are providing a custom Aggregate, seek an
|
|
159
163
|
* implementation of an AggregateRemove function that can reduce the complexity
|
|
160
164
|
* cost of shrinking the input data set.
|
|
161
165
|
* @param current The current value of the aggregation.
|
|
@@ -185,7 +189,7 @@ export type AggregateRemove = (
|
|
|
185
189
|
* changing, return `undefined` and the aggregation will be completely
|
|
186
190
|
* recalculated.
|
|
187
191
|
*
|
|
188
|
-
*
|
|
192
|
+
* When possible, if you are providing a custom Aggregate, seek an
|
|
189
193
|
* implementation of an AggregateReplace function that can reduce the complexity
|
|
190
194
|
* cost of changing the input data set in place.
|
|
191
195
|
* @param current The current value of the aggregation.
|
|
@@ -226,6 +230,7 @@ export type QueryCallback = (queryId: Id) => void;
|
|
|
226
230
|
* @param forEachRow A function that will let you iterate over the ResultRow
|
|
227
231
|
* objects in this ResultTable.
|
|
228
232
|
* @category Callback
|
|
233
|
+
* @since v2.0.0
|
|
229
234
|
*/
|
|
230
235
|
export type ResultTableCallback = (
|
|
231
236
|
tableId: Id,
|
|
@@ -243,6 +248,7 @@ export type ResultTableCallback = (
|
|
|
243
248
|
* @param forEachRow A function that will let you iterate over the ResultCell
|
|
244
249
|
* values in this ResultRow.
|
|
245
250
|
* @category Callback
|
|
251
|
+
* @since v2.0.0
|
|
246
252
|
*/
|
|
247
253
|
export type ResultRowCallback = (
|
|
248
254
|
rowId: Id,
|
|
@@ -259,6 +265,7 @@ export type ResultRowCallback = (
|
|
|
259
265
|
* @param cellId The Id of the ResultCell that the callback can operate on.
|
|
260
266
|
* @param cell The value of the ResultCell.
|
|
261
267
|
* @category Callback
|
|
268
|
+
* @since v2.0.0
|
|
262
269
|
*/
|
|
263
270
|
export type ResultCellCallback = (cellId: Id, cell: ResultCell) => void;
|
|
264
271
|
|
|
@@ -279,6 +286,7 @@ export type ResultCellCallback = (cellId: Id, cell: ResultCell) => void;
|
|
|
279
286
|
* Queries object.
|
|
280
287
|
* @param queries A reference to the Queries object that changed.
|
|
281
288
|
* @category Listener
|
|
289
|
+
* @since v2.0.0
|
|
282
290
|
*/
|
|
283
291
|
export type QueryIdsListener<Schemas extends OptionalSchemas> = (
|
|
284
292
|
queries: Queries<Schemas>,
|
|
@@ -627,6 +635,7 @@ export type ResultCellListener<Schemas extends OptionalSchemas> = (
|
|
|
627
635
|
* @returns A ResultCellChange array containing information about the
|
|
628
636
|
* ResultCell's changes.
|
|
629
637
|
* @category Listener
|
|
638
|
+
* @since v2.0.0
|
|
630
639
|
*/
|
|
631
640
|
export type GetResultCellChange = (
|
|
632
641
|
tableId: Id,
|
|
@@ -643,6 +652,7 @@ export type GetResultCellChange = (
|
|
|
643
652
|
* ResultCell before the current transaction, the new value after it, and a
|
|
644
653
|
* convenience flag that indicates that the value has changed.
|
|
645
654
|
* @category Listener
|
|
655
|
+
* @since v2.0.0
|
|
646
656
|
*/
|
|
647
657
|
export type ResultCellChange = [
|
|
648
658
|
changed: boolean,
|
|
@@ -662,41 +672,57 @@ export type QueriesListenerStats = {
|
|
|
662
672
|
/**
|
|
663
673
|
* The number of ResultTableListener functions registered with the Queries
|
|
664
674
|
* object.
|
|
675
|
+
* @category Stat
|
|
676
|
+
* @since v2.0.0
|
|
665
677
|
*/
|
|
666
678
|
table: number;
|
|
667
679
|
/**
|
|
668
680
|
* The number of ResultTableCellIdsListener functions registered with the
|
|
669
681
|
* Queries object, since v3.3.
|
|
682
|
+
* @category Stat
|
|
683
|
+
* @since v2.0.0
|
|
670
684
|
*/
|
|
671
685
|
tableCellIds: number;
|
|
672
686
|
/**
|
|
673
687
|
* The number of ResultRowCountListener functions registered with the Queries
|
|
674
688
|
* object, since v4.1.
|
|
689
|
+
* @category Stat
|
|
690
|
+
* @since v2.0.0
|
|
675
691
|
*/
|
|
676
692
|
rowCount: number;
|
|
677
693
|
/**
|
|
678
694
|
* The number of ResultRowIdsListener functions registered with the Queries
|
|
679
695
|
* object.
|
|
696
|
+
* @category Stat
|
|
697
|
+
* @since v2.0.0
|
|
680
698
|
*/
|
|
681
699
|
rowIds: number;
|
|
682
700
|
/**
|
|
683
701
|
* The number of SortedRowIdsListener functions registered with the Queries
|
|
684
702
|
* object.
|
|
703
|
+
* @category Stat
|
|
704
|
+
* @since v2.0.0
|
|
685
705
|
*/
|
|
686
706
|
sortedRowIds: number;
|
|
687
707
|
/**
|
|
688
708
|
* The number of ResultRowListener functions registered with the Queries
|
|
689
709
|
* object.
|
|
710
|
+
* @category Stat
|
|
711
|
+
* @since v2.0.0
|
|
690
712
|
*/
|
|
691
713
|
row: number;
|
|
692
714
|
/**
|
|
693
715
|
* The number of ResultCellIdsListener functions registered with the Queries
|
|
694
716
|
* object.
|
|
717
|
+
* @category Stat
|
|
718
|
+
* @since v2.0.0
|
|
695
719
|
*/
|
|
696
720
|
cellIds: number;
|
|
697
721
|
/**
|
|
698
722
|
* The number of ResultCellListener functions registered with the Queries
|
|
699
723
|
* object.
|
|
724
|
+
* @category Stat
|
|
725
|
+
* @since v2.0.0
|
|
700
726
|
*/
|
|
701
727
|
cell: number;
|
|
702
728
|
};
|
|
@@ -721,6 +747,8 @@ export type GetTableCell<
|
|
|
721
747
|
* or filtered.
|
|
722
748
|
* @param cellId The Id of the Cell to fetch the value for.
|
|
723
749
|
* @returns A Cell value or `undefined`.
|
|
750
|
+
* @category Callback
|
|
751
|
+
* @since v2.0.0
|
|
724
752
|
*/
|
|
725
753
|
<RootCellId extends CellIdFromSchema<Schema, RootTableId>>(
|
|
726
754
|
cellId: RootCellId,
|
|
@@ -734,6 +762,8 @@ export type GetTableCell<
|
|
|
734
762
|
* used.
|
|
735
763
|
* @param joinedCellId The Id of the Cell to fetch the value for.
|
|
736
764
|
* @returns A Cell value or `undefined`.
|
|
765
|
+
* @category Callback
|
|
766
|
+
* @since v2.0.0
|
|
737
767
|
*/
|
|
738
768
|
<
|
|
739
769
|
JoinedTableId extends TableIdFromSchema<Schema> | Id,
|
|
@@ -863,6 +893,8 @@ export type Select<
|
|
|
863
893
|
* @param cellId The Id of the Cell to fetch the value for.
|
|
864
894
|
* @returns A SelectedAs object so that the selected Cell Id can be optionally
|
|
865
895
|
* aliased.
|
|
896
|
+
* @category Definition
|
|
897
|
+
* @since v2.0.0
|
|
866
898
|
*/
|
|
867
899
|
<RootCellId extends CellIdFromSchema<Schema, RootTableId>>(
|
|
868
900
|
cellId: RootCellId,
|
|
@@ -877,6 +909,8 @@ export type Select<
|
|
|
877
909
|
* @param joinedCellId The Id of the Cell to fetch the value for.
|
|
878
910
|
* @returns A SelectedAs object so that the selected Cell Id can be optionally
|
|
879
911
|
* aliased.
|
|
912
|
+
* @category Definition
|
|
913
|
+
* @since v2.0.0
|
|
880
914
|
*/
|
|
881
915
|
<JoinedTableId extends TableIdFromSchema<Schema> | Id>(
|
|
882
916
|
joinedTableId: JoinedTableId,
|
|
@@ -891,6 +925,8 @@ export type Select<
|
|
|
891
925
|
* value from multiple Cell values and the Row Id.
|
|
892
926
|
* @returns A SelectedAs object so that the selected Cell Id can be optionally
|
|
893
927
|
* aliased.
|
|
928
|
+
* @category Definition
|
|
929
|
+
* @since v2.0.0
|
|
894
930
|
*/
|
|
895
931
|
(
|
|
896
932
|
getCell: (
|
|
@@ -951,6 +987,8 @@ export type Select<
|
|
|
951
987
|
export type SelectedAs = {
|
|
952
988
|
/**
|
|
953
989
|
* A function that lets you specify an alias for the Cell Id.
|
|
990
|
+
* @category Definition
|
|
991
|
+
* @since v2.0.0
|
|
954
992
|
*/
|
|
955
993
|
as: (selectedCellId: Id) => void;
|
|
956
994
|
};
|
|
@@ -1141,6 +1179,8 @@ export type Join<
|
|
|
1141
1179
|
* Table's Row Id.
|
|
1142
1180
|
* @returns A JoinedAs object so that the joined Table Id can be optionally
|
|
1143
1181
|
* aliased.
|
|
1182
|
+
* @category Definition
|
|
1183
|
+
* @since v2.0.0
|
|
1144
1184
|
*/
|
|
1145
1185
|
(
|
|
1146
1186
|
joinedTableId: TableIdFromSchema<Schema>,
|
|
@@ -1156,6 +1196,8 @@ export type Join<
|
|
|
1156
1196
|
* Id.
|
|
1157
1197
|
* @returns A JoinedAs object so that the joined Table Id can be optionally
|
|
1158
1198
|
* aliased.
|
|
1199
|
+
* @category Definition
|
|
1200
|
+
* @since v2.0.0
|
|
1159
1201
|
*/
|
|
1160
1202
|
(
|
|
1161
1203
|
joinedTableId: TableIdFromSchema<Schema>,
|
|
@@ -1173,6 +1215,8 @@ export type Join<
|
|
|
1173
1215
|
* joined Table's Row Id.
|
|
1174
1216
|
* @returns A JoinedAs object so that the joined Table Id can be optionally
|
|
1175
1217
|
* aliased.
|
|
1218
|
+
* @category Definition
|
|
1219
|
+
* @since v2.0.0
|
|
1176
1220
|
*/
|
|
1177
1221
|
<
|
|
1178
1222
|
IntermediateJoinedTableId extends TableIdFromSchema<Schema> | Id =
|
|
@@ -1201,6 +1245,8 @@ export type Join<
|
|
|
1201
1245
|
* Table's Row Id.
|
|
1202
1246
|
* @returns A JoinedAs object so that the joined Table Id can be optionally
|
|
1203
1247
|
* aliased.
|
|
1248
|
+
* @category Definition
|
|
1249
|
+
* @since v2.0.0
|
|
1204
1250
|
*/
|
|
1205
1251
|
<
|
|
1206
1252
|
IntermediateJoinedTableId extends TableIdFromSchema<Schema> | Id =
|
|
@@ -1272,6 +1318,8 @@ export type Join<
|
|
|
1272
1318
|
export type JoinedAs = {
|
|
1273
1319
|
/**
|
|
1274
1320
|
* A function that lets you specify an alias for the joined Table Id.
|
|
1321
|
+
* @category Definition
|
|
1322
|
+
* @since v2.0.0
|
|
1275
1323
|
*/
|
|
1276
1324
|
as: (joinedTableId: Id) => void;
|
|
1277
1325
|
};
|
|
@@ -1408,6 +1456,8 @@ export type Where<
|
|
|
1408
1456
|
* @param cellId The Id of the Cell in the query's root Table to test.
|
|
1409
1457
|
* @param equals The value that the Cell has to have for the Row to be
|
|
1410
1458
|
* included in the result.
|
|
1459
|
+
* @category Definition
|
|
1460
|
+
* @since v2.0.0
|
|
1411
1461
|
*/
|
|
1412
1462
|
<RootCellId extends CellIdFromSchema<Schema, RootTableId>>(
|
|
1413
1463
|
cellId: RootCellId,
|
|
@@ -1422,6 +1472,8 @@ export type Where<
|
|
|
1422
1472
|
* @param joinedCellId The Id of the Cell in the joined Table to test.
|
|
1423
1473
|
* @param equals The value that the Cell has to have for the Row to be
|
|
1424
1474
|
* included in the result.
|
|
1475
|
+
* @category Definition
|
|
1476
|
+
* @since v2.0.0
|
|
1425
1477
|
*/
|
|
1426
1478
|
<
|
|
1427
1479
|
JoinedTableId extends TableIdFromSchema<Schema> | Id,
|
|
@@ -1445,6 +1497,8 @@ export type Where<
|
|
|
1445
1497
|
* the main and (optionally) joined Tables.
|
|
1446
1498
|
* @param condition A callback that takes a GetTableCell function and that
|
|
1447
1499
|
* should return `true` for the Row to be included in the result.
|
|
1500
|
+
* @category Definition
|
|
1501
|
+
* @since v2.0.0
|
|
1448
1502
|
*/
|
|
1449
1503
|
(
|
|
1450
1504
|
condition: (getTableCell: GetTableCell<Schema, RootTableId>) => boolean,
|
|
@@ -1633,6 +1687,8 @@ export type Group = (
|
|
|
1633
1687
|
export type GroupedAs = {
|
|
1634
1688
|
/**
|
|
1635
1689
|
* A function that lets you specify an alias for the grouped Cell Id.
|
|
1690
|
+
* @category Definition
|
|
1691
|
+
* @since v2.0.0
|
|
1636
1692
|
*/
|
|
1637
1693
|
as: (groupedCellId: Id) => void;
|
|
1638
1694
|
};
|
|
@@ -1736,6 +1792,8 @@ export type Having = {
|
|
|
1736
1792
|
* @param selectedOrGroupedCellId The Id of the Cell in the query to test.
|
|
1737
1793
|
* @param equals The value that the Cell has to have for the Row to be
|
|
1738
1794
|
* included in the result.
|
|
1795
|
+
* @category Definition
|
|
1796
|
+
* @since v2.0.0
|
|
1739
1797
|
*/
|
|
1740
1798
|
(selectedOrGroupedCellId: Id, equals: ResultCell): void;
|
|
1741
1799
|
/**
|
|
@@ -1743,6 +1801,8 @@ export type Having = {
|
|
|
1743
1801
|
* those Rows which meet a calculated boolean condition.
|
|
1744
1802
|
* @param condition A callback that takes a GetCell function and that should
|
|
1745
1803
|
* return `true` for the Row to be included in the result.
|
|
1804
|
+
* @category Definition
|
|
1805
|
+
* @since v2.0.0
|
|
1746
1806
|
*/
|
|
1747
1807
|
(condition: (getSelectedOrGroupedCell: GetResultCell) => boolean): void;
|
|
1748
1808
|
};
|
|
@@ -1839,7 +1899,7 @@ export type Having = {
|
|
|
1839
1899
|
* queries.delListener(listenerId);
|
|
1840
1900
|
* queries.destroy();
|
|
1841
1901
|
* ```
|
|
1842
|
-
* @see
|
|
1902
|
+
* @see Using Queries guides
|
|
1843
1903
|
* @see Car Analysis demo
|
|
1844
1904
|
* @see Movie Database demo
|
|
1845
1905
|
* @category Queries
|
|
@@ -49,6 +49,7 @@ import type {GetIdChanges} from '../../store/index.d.ts';
|
|
|
49
49
|
* };
|
|
50
50
|
* ```
|
|
51
51
|
* @category Result
|
|
52
|
+
* @since v2.0.0
|
|
52
53
|
*/
|
|
53
54
|
export type ResultTable = {[rowId: Id]: ResultRow};
|
|
54
55
|
|
|
@@ -67,6 +68,7 @@ export type ResultTable = {[rowId: Id]: ResultRow};
|
|
|
67
68
|
* export const resultRow: ResultRow = {species: 'dog', color: 'brown'};
|
|
68
69
|
* ```
|
|
69
70
|
* @category Result
|
|
71
|
+
* @since v2.0.0
|
|
70
72
|
*/
|
|
71
73
|
export type ResultRow = {[cellId: Id]: ResultCell};
|
|
72
74
|
|
|
@@ -85,6 +87,7 @@ export type ResultRow = {[cellId: Id]: ResultCell};
|
|
|
85
87
|
* export const resultCell: ResultCell = 'dog';
|
|
86
88
|
* ```
|
|
87
89
|
* @category Result
|
|
90
|
+
* @since v2.0.0
|
|
88
91
|
*/
|
|
89
92
|
export type ResultCell = string | number | boolean;
|
|
90
93
|
|
|
@@ -92,6 +95,7 @@ export type ResultCell = string | number | boolean;
|
|
|
92
95
|
* The ResultCellOrUndefined type is the data structure representing a single
|
|
93
96
|
* cell in the results of a query, or the value `undefined`.
|
|
94
97
|
* @category Result
|
|
98
|
+
* @since v2.0.0
|
|
95
99
|
*/
|
|
96
100
|
export type ResultCellOrUndefined = ResultCell | undefined;
|
|
97
101
|
|
|
@@ -123,7 +127,7 @@ export type Aggregate = (cells: ResultCell[], length: number) => ResultCell;
|
|
|
123
127
|
* being added, return `undefined` and the aggregation will be completely
|
|
124
128
|
* recalculated.
|
|
125
129
|
*
|
|
126
|
-
*
|
|
130
|
+
* When possible, if you are providing a custom Aggregate, seek an
|
|
127
131
|
* implementation of an AggregateAdd function that can reduce the complexity
|
|
128
132
|
* cost of growing the input data set.
|
|
129
133
|
* @param current The current value of the aggregation.
|
|
@@ -155,7 +159,7 @@ export type AggregateAdd = (
|
|
|
155
159
|
* values, and the previous minimum is being removed. The whole of the rest of
|
|
156
160
|
* the list will need to be re-scanned to find a new minimum.
|
|
157
161
|
*
|
|
158
|
-
*
|
|
162
|
+
* When possible, if you are providing a custom Aggregate, seek an
|
|
159
163
|
* implementation of an AggregateRemove function that can reduce the complexity
|
|
160
164
|
* cost of shrinking the input data set.
|
|
161
165
|
* @param current The current value of the aggregation.
|
|
@@ -185,7 +189,7 @@ export type AggregateRemove = (
|
|
|
185
189
|
* changing, return `undefined` and the aggregation will be completely
|
|
186
190
|
* recalculated.
|
|
187
191
|
*
|
|
188
|
-
*
|
|
192
|
+
* When possible, if you are providing a custom Aggregate, seek an
|
|
189
193
|
* implementation of an AggregateReplace function that can reduce the complexity
|
|
190
194
|
* cost of changing the input data set in place.
|
|
191
195
|
* @param current The current value of the aggregation.
|
|
@@ -226,6 +230,7 @@ export type QueryCallback = (queryId: Id) => void;
|
|
|
226
230
|
* @param forEachRow A function that will let you iterate over the ResultRow
|
|
227
231
|
* objects in this ResultTable.
|
|
228
232
|
* @category Callback
|
|
233
|
+
* @since v2.0.0
|
|
229
234
|
*/
|
|
230
235
|
export type ResultTableCallback = (
|
|
231
236
|
tableId: Id,
|
|
@@ -243,6 +248,7 @@ export type ResultTableCallback = (
|
|
|
243
248
|
* @param forEachRow A function that will let you iterate over the ResultCell
|
|
244
249
|
* values in this ResultRow.
|
|
245
250
|
* @category Callback
|
|
251
|
+
* @since v2.0.0
|
|
246
252
|
*/
|
|
247
253
|
export type ResultRowCallback = (
|
|
248
254
|
rowId: Id,
|
|
@@ -259,6 +265,7 @@ export type ResultRowCallback = (
|
|
|
259
265
|
* @param cellId The Id of the ResultCell that the callback can operate on.
|
|
260
266
|
* @param cell The value of the ResultCell.
|
|
261
267
|
* @category Callback
|
|
268
|
+
* @since v2.0.0
|
|
262
269
|
*/
|
|
263
270
|
export type ResultCellCallback = (cellId: Id, cell: ResultCell) => void;
|
|
264
271
|
|
|
@@ -279,6 +286,7 @@ export type ResultCellCallback = (cellId: Id, cell: ResultCell) => void;
|
|
|
279
286
|
* Queries object.
|
|
280
287
|
* @param queries A reference to the Queries object that changed.
|
|
281
288
|
* @category Listener
|
|
289
|
+
* @since v2.0.0
|
|
282
290
|
*/
|
|
283
291
|
export type QueryIdsListener<Schemas extends OptionalSchemas> = (
|
|
284
292
|
queries: Queries<Schemas>,
|
|
@@ -627,6 +635,7 @@ export type ResultCellListener<Schemas extends OptionalSchemas> = (
|
|
|
627
635
|
* @returns A ResultCellChange array containing information about the
|
|
628
636
|
* ResultCell's changes.
|
|
629
637
|
* @category Listener
|
|
638
|
+
* @since v2.0.0
|
|
630
639
|
*/
|
|
631
640
|
export type GetResultCellChange = (
|
|
632
641
|
tableId: Id,
|
|
@@ -643,6 +652,7 @@ export type GetResultCellChange = (
|
|
|
643
652
|
* ResultCell before the current transaction, the new value after it, and a
|
|
644
653
|
* convenience flag that indicates that the value has changed.
|
|
645
654
|
* @category Listener
|
|
655
|
+
* @since v2.0.0
|
|
646
656
|
*/
|
|
647
657
|
export type ResultCellChange = [
|
|
648
658
|
changed: boolean,
|
|
@@ -662,41 +672,57 @@ export type QueriesListenerStats = {
|
|
|
662
672
|
/**
|
|
663
673
|
* The number of ResultTableListener functions registered with the Queries
|
|
664
674
|
* object.
|
|
675
|
+
* @category Stat
|
|
676
|
+
* @since v2.0.0
|
|
665
677
|
*/
|
|
666
678
|
table: number;
|
|
667
679
|
/**
|
|
668
680
|
* The number of ResultTableCellIdsListener functions registered with the
|
|
669
681
|
* Queries object, since v3.3.
|
|
682
|
+
* @category Stat
|
|
683
|
+
* @since v2.0.0
|
|
670
684
|
*/
|
|
671
685
|
tableCellIds: number;
|
|
672
686
|
/**
|
|
673
687
|
* The number of ResultRowCountListener functions registered with the Queries
|
|
674
688
|
* object, since v4.1.
|
|
689
|
+
* @category Stat
|
|
690
|
+
* @since v2.0.0
|
|
675
691
|
*/
|
|
676
692
|
rowCount: number;
|
|
677
693
|
/**
|
|
678
694
|
* The number of ResultRowIdsListener functions registered with the Queries
|
|
679
695
|
* object.
|
|
696
|
+
* @category Stat
|
|
697
|
+
* @since v2.0.0
|
|
680
698
|
*/
|
|
681
699
|
rowIds: number;
|
|
682
700
|
/**
|
|
683
701
|
* The number of SortedRowIdsListener functions registered with the Queries
|
|
684
702
|
* object.
|
|
703
|
+
* @category Stat
|
|
704
|
+
* @since v2.0.0
|
|
685
705
|
*/
|
|
686
706
|
sortedRowIds: number;
|
|
687
707
|
/**
|
|
688
708
|
* The number of ResultRowListener functions registered with the Queries
|
|
689
709
|
* object.
|
|
710
|
+
* @category Stat
|
|
711
|
+
* @since v2.0.0
|
|
690
712
|
*/
|
|
691
713
|
row: number;
|
|
692
714
|
/**
|
|
693
715
|
* The number of ResultCellIdsListener functions registered with the Queries
|
|
694
716
|
* object.
|
|
717
|
+
* @category Stat
|
|
718
|
+
* @since v2.0.0
|
|
695
719
|
*/
|
|
696
720
|
cellIds: number;
|
|
697
721
|
/**
|
|
698
722
|
* The number of ResultCellListener functions registered with the Queries
|
|
699
723
|
* object.
|
|
724
|
+
* @category Stat
|
|
725
|
+
* @since v2.0.0
|
|
700
726
|
*/
|
|
701
727
|
cell: number;
|
|
702
728
|
};
|
|
@@ -721,6 +747,8 @@ export type GetTableCell<
|
|
|
721
747
|
* or filtered.
|
|
722
748
|
* @param cellId The Id of the Cell to fetch the value for.
|
|
723
749
|
* @returns A Cell value or `undefined`.
|
|
750
|
+
* @category Callback
|
|
751
|
+
* @since v2.0.0
|
|
724
752
|
*/
|
|
725
753
|
<RootCellId extends CellIdFromSchema<Schema, RootTableId>>(
|
|
726
754
|
cellId: RootCellId,
|
|
@@ -734,6 +762,8 @@ export type GetTableCell<
|
|
|
734
762
|
* used.
|
|
735
763
|
* @param joinedCellId The Id of the Cell to fetch the value for.
|
|
736
764
|
* @returns A Cell value or `undefined`.
|
|
765
|
+
* @category Callback
|
|
766
|
+
* @since v2.0.0
|
|
737
767
|
*/
|
|
738
768
|
<
|
|
739
769
|
JoinedTableId extends TableIdFromSchema<Schema> | Id,
|
|
@@ -863,6 +893,8 @@ export type Select<
|
|
|
863
893
|
* @param cellId The Id of the Cell to fetch the value for.
|
|
864
894
|
* @returns A SelectedAs object so that the selected Cell Id can be optionally
|
|
865
895
|
* aliased.
|
|
896
|
+
* @category Definition
|
|
897
|
+
* @since v2.0.0
|
|
866
898
|
*/
|
|
867
899
|
<RootCellId extends CellIdFromSchema<Schema, RootTableId>>(
|
|
868
900
|
cellId: RootCellId,
|
|
@@ -877,6 +909,8 @@ export type Select<
|
|
|
877
909
|
* @param joinedCellId The Id of the Cell to fetch the value for.
|
|
878
910
|
* @returns A SelectedAs object so that the selected Cell Id can be optionally
|
|
879
911
|
* aliased.
|
|
912
|
+
* @category Definition
|
|
913
|
+
* @since v2.0.0
|
|
880
914
|
*/
|
|
881
915
|
<JoinedTableId extends TableIdFromSchema<Schema> | Id>(
|
|
882
916
|
joinedTableId: JoinedTableId,
|
|
@@ -891,6 +925,8 @@ export type Select<
|
|
|
891
925
|
* value from multiple Cell values and the Row Id.
|
|
892
926
|
* @returns A SelectedAs object so that the selected Cell Id can be optionally
|
|
893
927
|
* aliased.
|
|
928
|
+
* @category Definition
|
|
929
|
+
* @since v2.0.0
|
|
894
930
|
*/
|
|
895
931
|
(
|
|
896
932
|
getCell: (
|
|
@@ -951,6 +987,8 @@ export type Select<
|
|
|
951
987
|
export type SelectedAs = {
|
|
952
988
|
/**
|
|
953
989
|
* A function that lets you specify an alias for the Cell Id.
|
|
990
|
+
* @category Definition
|
|
991
|
+
* @since v2.0.0
|
|
954
992
|
*/
|
|
955
993
|
as: (selectedCellId: Id) => void;
|
|
956
994
|
};
|
|
@@ -1141,6 +1179,8 @@ export type Join<
|
|
|
1141
1179
|
* Table's Row Id.
|
|
1142
1180
|
* @returns A JoinedAs object so that the joined Table Id can be optionally
|
|
1143
1181
|
* aliased.
|
|
1182
|
+
* @category Definition
|
|
1183
|
+
* @since v2.0.0
|
|
1144
1184
|
*/
|
|
1145
1185
|
(
|
|
1146
1186
|
joinedTableId: TableIdFromSchema<Schema>,
|
|
@@ -1156,6 +1196,8 @@ export type Join<
|
|
|
1156
1196
|
* Id.
|
|
1157
1197
|
* @returns A JoinedAs object so that the joined Table Id can be optionally
|
|
1158
1198
|
* aliased.
|
|
1199
|
+
* @category Definition
|
|
1200
|
+
* @since v2.0.0
|
|
1159
1201
|
*/
|
|
1160
1202
|
(
|
|
1161
1203
|
joinedTableId: TableIdFromSchema<Schema>,
|
|
@@ -1173,6 +1215,8 @@ export type Join<
|
|
|
1173
1215
|
* joined Table's Row Id.
|
|
1174
1216
|
* @returns A JoinedAs object so that the joined Table Id can be optionally
|
|
1175
1217
|
* aliased.
|
|
1218
|
+
* @category Definition
|
|
1219
|
+
* @since v2.0.0
|
|
1176
1220
|
*/
|
|
1177
1221
|
<
|
|
1178
1222
|
IntermediateJoinedTableId extends TableIdFromSchema<Schema> | Id =
|
|
@@ -1201,6 +1245,8 @@ export type Join<
|
|
|
1201
1245
|
* Table's Row Id.
|
|
1202
1246
|
* @returns A JoinedAs object so that the joined Table Id can be optionally
|
|
1203
1247
|
* aliased.
|
|
1248
|
+
* @category Definition
|
|
1249
|
+
* @since v2.0.0
|
|
1204
1250
|
*/
|
|
1205
1251
|
<
|
|
1206
1252
|
IntermediateJoinedTableId extends TableIdFromSchema<Schema> | Id =
|
|
@@ -1272,6 +1318,8 @@ export type Join<
|
|
|
1272
1318
|
export type JoinedAs = {
|
|
1273
1319
|
/**
|
|
1274
1320
|
* A function that lets you specify an alias for the joined Table Id.
|
|
1321
|
+
* @category Definition
|
|
1322
|
+
* @since v2.0.0
|
|
1275
1323
|
*/
|
|
1276
1324
|
as: (joinedTableId: Id) => void;
|
|
1277
1325
|
};
|
|
@@ -1408,6 +1456,8 @@ export type Where<
|
|
|
1408
1456
|
* @param cellId The Id of the Cell in the query's root Table to test.
|
|
1409
1457
|
* @param equals The value that the Cell has to have for the Row to be
|
|
1410
1458
|
* included in the result.
|
|
1459
|
+
* @category Definition
|
|
1460
|
+
* @since v2.0.0
|
|
1411
1461
|
*/
|
|
1412
1462
|
<RootCellId extends CellIdFromSchema<Schema, RootTableId>>(
|
|
1413
1463
|
cellId: RootCellId,
|
|
@@ -1422,6 +1472,8 @@ export type Where<
|
|
|
1422
1472
|
* @param joinedCellId The Id of the Cell in the joined Table to test.
|
|
1423
1473
|
* @param equals The value that the Cell has to have for the Row to be
|
|
1424
1474
|
* included in the result.
|
|
1475
|
+
* @category Definition
|
|
1476
|
+
* @since v2.0.0
|
|
1425
1477
|
*/
|
|
1426
1478
|
<
|
|
1427
1479
|
JoinedTableId extends TableIdFromSchema<Schema> | Id,
|
|
@@ -1445,6 +1497,8 @@ export type Where<
|
|
|
1445
1497
|
* the main and (optionally) joined Tables.
|
|
1446
1498
|
* @param condition A callback that takes a GetTableCell function and that
|
|
1447
1499
|
* should return `true` for the Row to be included in the result.
|
|
1500
|
+
* @category Definition
|
|
1501
|
+
* @since v2.0.0
|
|
1448
1502
|
*/
|
|
1449
1503
|
(
|
|
1450
1504
|
condition: (getTableCell: GetTableCell<Schema, RootTableId>) => boolean,
|
|
@@ -1633,6 +1687,8 @@ export type Group = (
|
|
|
1633
1687
|
export type GroupedAs = {
|
|
1634
1688
|
/**
|
|
1635
1689
|
* A function that lets you specify an alias for the grouped Cell Id.
|
|
1690
|
+
* @category Definition
|
|
1691
|
+
* @since v2.0.0
|
|
1636
1692
|
*/
|
|
1637
1693
|
as: (groupedCellId: Id) => void;
|
|
1638
1694
|
};
|
|
@@ -1736,6 +1792,8 @@ export type Having = {
|
|
|
1736
1792
|
* @param selectedOrGroupedCellId The Id of the Cell in the query to test.
|
|
1737
1793
|
* @param equals The value that the Cell has to have for the Row to be
|
|
1738
1794
|
* included in the result.
|
|
1795
|
+
* @category Definition
|
|
1796
|
+
* @since v2.0.0
|
|
1739
1797
|
*/
|
|
1740
1798
|
(selectedOrGroupedCellId: Id, equals: ResultCell): void;
|
|
1741
1799
|
/**
|
|
@@ -1743,6 +1801,8 @@ export type Having = {
|
|
|
1743
1801
|
* those Rows which meet a calculated boolean condition.
|
|
1744
1802
|
* @param condition A callback that takes a GetCell function and that should
|
|
1745
1803
|
* return `true` for the Row to be included in the result.
|
|
1804
|
+
* @category Definition
|
|
1805
|
+
* @since v2.0.0
|
|
1746
1806
|
*/
|
|
1747
1807
|
(condition: (getSelectedOrGroupedCell: GetResultCell) => boolean): void;
|
|
1748
1808
|
};
|
|
@@ -1839,7 +1899,7 @@ export type Having = {
|
|
|
1839
1899
|
* queries.delListener(listenerId);
|
|
1840
1900
|
* queries.destroy();
|
|
1841
1901
|
* ```
|
|
1842
|
-
* @see
|
|
1902
|
+
* @see Using Queries guides
|
|
1843
1903
|
* @see Car Analysis demo
|
|
1844
1904
|
* @see Movie Database demo
|
|
1845
1905
|
* @category Queries
|