tinybase 9.3.0 → 9.4.0-beta.1
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/queries/index.d.ts +141 -7
- package/@types/queries/with-schemas/index.d.ts +153 -7
- package/@types/ui-react-dom/index.d.ts +10 -10
- package/@types/ui-react-dom/with-schemas/index.d.ts +10 -10
- package/@types/ui-react-dom-charts/index.d.ts +7 -7
- package/@types/ui-react-dom-charts/with-schemas/index.d.ts +7 -7
- package/@types/ui-react-inspector/index.d.ts +1 -1
- package/@types/ui-react-inspector/with-schemas/index.d.ts +1 -1
- package/@types/ui-solid-dom/index.d.ts +10 -10
- package/@types/ui-solid-dom/with-schemas/index.d.ts +10 -10
- package/@types/ui-solid-inspector/index.d.ts +1 -1
- package/@types/ui-solid-inspector/with-schemas/index.d.ts +1 -1
- package/@types/ui-svelte-dom/index.d.ts +10 -10
- package/@types/ui-svelte-dom/with-schemas/index.d.ts +10 -10
- package/@types/ui-svelte-inspector/index.d.ts +1 -1
- package/@types/ui-svelte-inspector/with-schemas/index.d.ts +1 -1
- package/index.js +200 -24
- package/min/index.js +1 -1
- package/min/index.js.gz +0 -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/queries/index.js +1 -1
- package/min/queries/index.js.gz +0 -0
- package/min/queries/with-schemas/index.js +1 -1
- package/min/queries/with-schemas/index.js.gz +0 -0
- package/min/with-schemas/index.js +1 -1
- package/min/with-schemas/index.js.gz +0 -0
- package/omni/index.js +200 -24
- package/omni/with-schemas/index.js +200 -24
- package/package.json +1 -1
- package/queries/index.js +205 -24
- package/queries/with-schemas/index.js +205 -24
- package/readme.md +1 -1
- package/releases.md +1 -1
- package/with-schemas/index.js +200 -24
|
@@ -1011,6 +1011,138 @@ export type Select = {
|
|
|
1011
1011
|
): SelectedAs;
|
|
1012
1012
|
};
|
|
1013
1013
|
|
|
1014
|
+
/**
|
|
1015
|
+
* The CellIdMapper type describes a function used by a SelectAll clause to map
|
|
1016
|
+
* a source Cell Id to a Cell Id in the query result.
|
|
1017
|
+
* @param cellId The Id of a Cell in the source Row.
|
|
1018
|
+
* @returns The Id to use for that Cell in the result Row.
|
|
1019
|
+
* @category Callback
|
|
1020
|
+
* @since v9.4.0
|
|
1021
|
+
*/
|
|
1022
|
+
export type CellIdMapper = (cellId: Id) => Id;
|
|
1023
|
+
|
|
1024
|
+
/**
|
|
1025
|
+
* The SelectAll type describes a function that lets you select every Cell
|
|
1026
|
+
* present in a source Row.
|
|
1027
|
+
*
|
|
1028
|
+
* The SelectAll function is provided to the third `query` parameter of the
|
|
1029
|
+
* setQueryDefinition method. Different source Rows can contain different Cell
|
|
1030
|
+
* Ids, and each result Row will contain only the Cells present in its
|
|
1031
|
+
* corresponding source Row. The result Table's Cell Ids are therefore the union
|
|
1032
|
+
* of the Cells in its result Rows.
|
|
1033
|
+
*
|
|
1034
|
+
* Source Cell Ids are processed in lexical order, and selection clauses are
|
|
1035
|
+
* processed in the order they are declared. If multiple selected Cells map to
|
|
1036
|
+
* the same result Cell Id, the later one wins.
|
|
1037
|
+
*
|
|
1038
|
+
* When used in a grouped query, the current table-wide union of source Cell Ids
|
|
1039
|
+
* is expanded into individual selections. The query is rebuilt if this union
|
|
1040
|
+
* changes, and any selected Cell that is not grouped becomes a grouping
|
|
1041
|
+
* dimension as usual.
|
|
1042
|
+
* @category Definition
|
|
1043
|
+
* @since v9.4.0
|
|
1044
|
+
*/
|
|
1045
|
+
export type SelectAll = {
|
|
1046
|
+
/**
|
|
1047
|
+
* Calling this function with no parameters will select every Cell present in
|
|
1048
|
+
* each Row of the query's root Table, retaining the source Cell Ids.
|
|
1049
|
+
* @example
|
|
1050
|
+
* This example selects all the Cells from heterogeneous root Rows:
|
|
1051
|
+
*
|
|
1052
|
+
* ```js
|
|
1053
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
1054
|
+
*
|
|
1055
|
+
* const store = createStore().setTable('pets', {
|
|
1056
|
+
* fido: {species: 'dog', color: 'brown'},
|
|
1057
|
+
* felix: {species: 'cat', indoor: true},
|
|
1058
|
+
* });
|
|
1059
|
+
* const queries = createQueries(store);
|
|
1060
|
+
*
|
|
1061
|
+
* queries.setQueryDefinition('query', 'pets', ({selectAll}) => selectAll());
|
|
1062
|
+
*
|
|
1063
|
+
* console.log(queries.getResultRow('query', 'fido'));
|
|
1064
|
+
* // -> {color: 'brown', species: 'dog'}
|
|
1065
|
+
* console.log(queries.getResultRow('query', 'felix'));
|
|
1066
|
+
* // -> {indoor: true, species: 'cat'}
|
|
1067
|
+
* ```
|
|
1068
|
+
* @category Definition
|
|
1069
|
+
* @since v9.4.0
|
|
1070
|
+
*/
|
|
1071
|
+
(): void;
|
|
1072
|
+
/**
|
|
1073
|
+
* Calling this function with a joined Table Id will select every Cell present
|
|
1074
|
+
* in the joined Row.
|
|
1075
|
+
*
|
|
1076
|
+
* An optional second parameter can map each Cell Id with a prefix or
|
|
1077
|
+
* callback.
|
|
1078
|
+
* @param joinedTableId The Id of the joined Table. If the Table was joined
|
|
1079
|
+
* 'as' a different Id, that should instead be used.
|
|
1080
|
+
* @param cellIdPrefixOrMapper An optional prefix to prepend to every Cell Id,
|
|
1081
|
+
* or a CellIdMapper callback that returns each result Cell Id.
|
|
1082
|
+
* @example
|
|
1083
|
+
* This example selects all the Cells from a joined Table, retaining their
|
|
1084
|
+
* Cell Ids:
|
|
1085
|
+
*
|
|
1086
|
+
* ```js
|
|
1087
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
1088
|
+
*
|
|
1089
|
+
* const store = createStore()
|
|
1090
|
+
* .setTable('pets', {fido: {ownerId: '1'}})
|
|
1091
|
+
* .setTable('owners', {'1': {name: 'Alice', city: 'London'}});
|
|
1092
|
+
* const queries = createQueries(store);
|
|
1093
|
+
*
|
|
1094
|
+
* queries.setQueryDefinition('query', 'pets', ({selectAll, join}) => {
|
|
1095
|
+
* selectAll('owners');
|
|
1096
|
+
* join('owners', 'ownerId');
|
|
1097
|
+
* });
|
|
1098
|
+
*
|
|
1099
|
+
* console.log(queries.getResultRow('query', 'fido'));
|
|
1100
|
+
* // -> {city: 'London', name: 'Alice'}
|
|
1101
|
+
* ```
|
|
1102
|
+
* @category Definition
|
|
1103
|
+
* @since v9.4.0
|
|
1104
|
+
*/
|
|
1105
|
+
(joinedTableId: Id, cellIdPrefixOrMapper?: Id | CellIdMapper): void;
|
|
1106
|
+
/**
|
|
1107
|
+
* Calling this function with `true` and a joined query Id will select every
|
|
1108
|
+
* Cell present in the joined result Row.
|
|
1109
|
+
*
|
|
1110
|
+
* An optional third parameter can map each Cell Id with a prefix or callback.
|
|
1111
|
+
* @param asQuery A flag indicating that the next Id is a query Id.
|
|
1112
|
+
* @param joinedQueryId The Id of the joined query result. If the query result
|
|
1113
|
+
* was joined 'as' a different Id, that should instead be used.
|
|
1114
|
+
* @param cellIdPrefixOrMapper An optional prefix to prepend to every Cell Id,
|
|
1115
|
+
* or a CellIdMapper callback that returns each result Cell Id.
|
|
1116
|
+
* @example
|
|
1117
|
+
* This example selects all the Cells from a joined query result, prefixing
|
|
1118
|
+
* each Cell Id:
|
|
1119
|
+
*
|
|
1120
|
+
* ```js
|
|
1121
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
1122
|
+
*
|
|
1123
|
+
* const store = createStore()
|
|
1124
|
+
* .setTable('pets', {fido: {ownerId: '1'}})
|
|
1125
|
+
* .setTable('owners', {'1': {name: 'Alice', city: 'London'}});
|
|
1126
|
+
* const queries = createQueries(store)
|
|
1127
|
+
* .setQueryDefinition('owners', 'owners', ({selectAll}) => selectAll())
|
|
1128
|
+
* .setQueryDefinition('query', 'pets', ({selectAll, join}) => {
|
|
1129
|
+
* selectAll(true, 'owners', 'owner.');
|
|
1130
|
+
* join(true, 'owners', 'ownerId');
|
|
1131
|
+
* });
|
|
1132
|
+
*
|
|
1133
|
+
* console.log(queries.getResultRow('query', 'fido'));
|
|
1134
|
+
* // -> {'owner.city': 'London', 'owner.name': 'Alice'}
|
|
1135
|
+
* ```
|
|
1136
|
+
* @category Definition
|
|
1137
|
+
* @since v9.4.0
|
|
1138
|
+
*/
|
|
1139
|
+
(
|
|
1140
|
+
asQuery: true,
|
|
1141
|
+
joinedQueryId: Id,
|
|
1142
|
+
cellIdPrefixOrMapper?: Id | CellIdMapper,
|
|
1143
|
+
): void;
|
|
1144
|
+
};
|
|
1145
|
+
|
|
1014
1146
|
/**
|
|
1015
1147
|
* The SelectedAs type describes an object returned from calling a Select
|
|
1016
1148
|
* function so that the selected Cell Id can be optionally aliased.
|
|
@@ -1257,8 +1389,8 @@ export type Join = {
|
|
|
1257
1389
|
(joinedTableId: Id, on: Id): JoinedAs;
|
|
1258
1390
|
/**
|
|
1259
1391
|
* Calling this function with three parameters (where the first is `true`)
|
|
1260
|
-
* will indicate that the join to a Row in an adjacent query result is made
|
|
1261
|
-
*
|
|
1392
|
+
* will indicate that the join to a Row in an adjacent query result is made by
|
|
1393
|
+
* finding its Id in a Cell of the query's root Table.
|
|
1262
1394
|
* @param asQuery A flag indicating that the next Id is a query Id.
|
|
1263
1395
|
* @param joinedQueryId The Id of the query result to join to.
|
|
1264
1396
|
* @param on The Id of the Cell in the root Table that contains the joined
|
|
@@ -1323,8 +1455,8 @@ export type Join = {
|
|
|
1323
1455
|
*/
|
|
1324
1456
|
(joinedTableId: Id, fromIntermediateJoinedTableId: Id, on: Id): JoinedAs;
|
|
1325
1457
|
/**
|
|
1326
|
-
* Calling this function with four parameters (where the first is `true`)
|
|
1327
|
-
*
|
|
1458
|
+
* Calling this function with four parameters (where the first is `true`) will
|
|
1459
|
+
* indicate that the join to a Row in a distant query result is made by
|
|
1328
1460
|
* finding its Id in a Cell of an intermediately joined Table.
|
|
1329
1461
|
* @param asQuery A flag indicating that the next Id is a query Id.
|
|
1330
1462
|
* @param joinedQueryId The Id of the distant query result to join to.
|
|
@@ -1371,9 +1503,9 @@ export type Join = {
|
|
|
1371
1503
|
): JoinedAs;
|
|
1372
1504
|
/**
|
|
1373
1505
|
* Calling this function with four parameters (where the first is `true` and
|
|
1374
|
-
* the fourth is a function) will indicate that the join to a Row in a
|
|
1375
|
-
*
|
|
1376
|
-
*
|
|
1506
|
+
* the fourth is a function) will indicate that the join to a Row in a distant
|
|
1507
|
+
* query result is made by calculating its Id from the Cells and the Row Id of
|
|
1508
|
+
* an intermediately joined Table.
|
|
1377
1509
|
* @param asQuery A flag indicating that the next Id is a query Id.
|
|
1378
1510
|
* @param joinedQueryId The Id of the query result to join to.
|
|
1379
1511
|
* @param fromIntermediateJoinedTableId The Id of an intermediate Table (which
|
|
@@ -2102,6 +2234,7 @@ export interface Queries {
|
|
|
2102
2234
|
tableId: Id,
|
|
2103
2235
|
query: (keywords: {
|
|
2104
2236
|
select: Select;
|
|
2237
|
+
selectAll: SelectAll;
|
|
2105
2238
|
join: Join;
|
|
2106
2239
|
where: Where;
|
|
2107
2240
|
group: Group;
|
|
@@ -2116,6 +2249,7 @@ export interface Queries {
|
|
|
2116
2249
|
rootQueryId: Id,
|
|
2117
2250
|
query: (keywords: {
|
|
2118
2251
|
select: Select;
|
|
2252
|
+
selectAll: SelectAll;
|
|
2119
2253
|
join: Join;
|
|
2120
2254
|
where: Where;
|
|
2121
2255
|
group: Group;
|
|
@@ -1158,6 +1158,148 @@ export type Select<
|
|
|
1158
1158
|
): SelectedAs;
|
|
1159
1159
|
};
|
|
1160
1160
|
|
|
1161
|
+
/**
|
|
1162
|
+
* The CellIdMapper type describes a function used by a SelectAll clause to map
|
|
1163
|
+
* a source Cell Id to a Cell Id in the query result.
|
|
1164
|
+
* @param cellId The Id of a Cell in the source Row.
|
|
1165
|
+
* @returns The Id to use for that Cell in the result Row.
|
|
1166
|
+
* @category Callback
|
|
1167
|
+
* @since v9.4.0
|
|
1168
|
+
*/
|
|
1169
|
+
export type CellIdMapper<CellId extends Id = Id> = (cellId: CellId) => Id;
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* The SelectAll type describes a function that lets you select every Cell
|
|
1173
|
+
* present in a source Row.
|
|
1174
|
+
*
|
|
1175
|
+
* The SelectAll function is provided to the third `query` parameter of the
|
|
1176
|
+
* setQueryDefinition method. Different source Rows can contain different Cell
|
|
1177
|
+
* Ids, and each result Row will contain only the Cells present in its
|
|
1178
|
+
* corresponding source Row. The result Table's Cell Ids are therefore the union
|
|
1179
|
+
* of the Cells in its result Rows.
|
|
1180
|
+
*
|
|
1181
|
+
* Source Cell Ids are processed in lexical order, and selection clauses are
|
|
1182
|
+
* processed in the order they are declared. If multiple selected Cells map to
|
|
1183
|
+
* the same result Cell Id, the later one wins.
|
|
1184
|
+
*
|
|
1185
|
+
* When used in a grouped query, the current table-wide union of source Cell Ids
|
|
1186
|
+
* is expanded into individual selections. The query is rebuilt if this union
|
|
1187
|
+
* changes, and any selected Cell that is not grouped becomes a grouping
|
|
1188
|
+
* dimension as usual.
|
|
1189
|
+
* @category Definition
|
|
1190
|
+
* @since v9.4.0
|
|
1191
|
+
*/
|
|
1192
|
+
export type SelectAll<Schema extends OptionalTablesSchema> = {
|
|
1193
|
+
/**
|
|
1194
|
+
* Calling this function with no parameters will select every Cell present in
|
|
1195
|
+
* each Row of the query's root Table, retaining the source Cell Ids.
|
|
1196
|
+
* @example
|
|
1197
|
+
* This example selects all the Cells from heterogeneous root Rows:
|
|
1198
|
+
*
|
|
1199
|
+
* ```js
|
|
1200
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
1201
|
+
*
|
|
1202
|
+
* const store = createStore().setTable('pets', {
|
|
1203
|
+
* fido: {species: 'dog', color: 'brown'},
|
|
1204
|
+
* felix: {species: 'cat', indoor: true},
|
|
1205
|
+
* });
|
|
1206
|
+
* const queries = createQueries(store);
|
|
1207
|
+
*
|
|
1208
|
+
* queries.setQueryDefinition('query', 'pets', ({selectAll}) => selectAll());
|
|
1209
|
+
*
|
|
1210
|
+
* console.log(queries.getResultRow('query', 'fido'));
|
|
1211
|
+
* // -> {color: 'brown', species: 'dog'}
|
|
1212
|
+
* console.log(queries.getResultRow('query', 'felix'));
|
|
1213
|
+
* // -> {indoor: true, species: 'cat'}
|
|
1214
|
+
* ```
|
|
1215
|
+
* @category Definition
|
|
1216
|
+
* @since v9.4.0
|
|
1217
|
+
*/
|
|
1218
|
+
(): void;
|
|
1219
|
+
/**
|
|
1220
|
+
* Calling this function with a joined Table Id will select every Cell present
|
|
1221
|
+
* in the joined Row.
|
|
1222
|
+
*
|
|
1223
|
+
* This has schema-based typing. The following is a simplified representation:
|
|
1224
|
+
*
|
|
1225
|
+
* ```ts override
|
|
1226
|
+
* (joinedTableId: Id, cellIdPrefixOrMapper?: Id | CellIdMapper): void;
|
|
1227
|
+
* ```
|
|
1228
|
+
*
|
|
1229
|
+
* An optional second parameter can map each Cell Id with a prefix or
|
|
1230
|
+
* callback.
|
|
1231
|
+
* @param joinedTableId The Id of the joined Table. If the Table was joined
|
|
1232
|
+
* 'as' a different Id, that should instead be used.
|
|
1233
|
+
* @param cellIdPrefixOrMapper An optional prefix to prepend to every Cell Id,
|
|
1234
|
+
* or a CellIdMapper callback that returns each result Cell Id.
|
|
1235
|
+
* @example
|
|
1236
|
+
* This example selects all the Cells from a joined Table, retaining their
|
|
1237
|
+
* Cell Ids:
|
|
1238
|
+
*
|
|
1239
|
+
* ```js
|
|
1240
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
1241
|
+
*
|
|
1242
|
+
* const store = createStore()
|
|
1243
|
+
* .setTable('pets', {fido: {ownerId: '1'}})
|
|
1244
|
+
* .setTable('owners', {'1': {name: 'Alice', city: 'London'}});
|
|
1245
|
+
* const queries = createQueries(store);
|
|
1246
|
+
*
|
|
1247
|
+
* queries.setQueryDefinition('query', 'pets', ({selectAll, join}) => {
|
|
1248
|
+
* selectAll('owners');
|
|
1249
|
+
* join('owners', 'ownerId');
|
|
1250
|
+
* });
|
|
1251
|
+
*
|
|
1252
|
+
* console.log(queries.getResultRow('query', 'fido'));
|
|
1253
|
+
* // -> {city: 'London', name: 'Alice'}
|
|
1254
|
+
* ```
|
|
1255
|
+
* @category Definition
|
|
1256
|
+
* @since v9.4.0
|
|
1257
|
+
*/
|
|
1258
|
+
<JoinedTableId extends TableIdFromSchema<Schema> | Id>(
|
|
1259
|
+
joinedTableId: JoinedTableId,
|
|
1260
|
+
cellIdPrefixOrMapper?:
|
|
1261
|
+
Id | CellIdMapper<JoinedCellIdOrId<Schema, JoinedTableId>>,
|
|
1262
|
+
): void;
|
|
1263
|
+
/**
|
|
1264
|
+
* Calling this function with `true` and a joined query Id will select every
|
|
1265
|
+
* Cell present in the joined result Row.
|
|
1266
|
+
*
|
|
1267
|
+
* An optional third parameter can map each Cell Id with a prefix or callback.
|
|
1268
|
+
* @param asQuery A flag indicating that the next Id is a query Id.
|
|
1269
|
+
* @param joinedQueryId The Id of the joined query result. If the query result
|
|
1270
|
+
* was joined 'as' a different Id, that should instead be used.
|
|
1271
|
+
* @param cellIdPrefixOrMapper An optional prefix to prepend to every Cell Id,
|
|
1272
|
+
* or a CellIdMapper callback that returns each result Cell Id.
|
|
1273
|
+
* @example
|
|
1274
|
+
* This example selects all the Cells from a joined query result, prefixing
|
|
1275
|
+
* each Cell Id:
|
|
1276
|
+
*
|
|
1277
|
+
* ```js
|
|
1278
|
+
* import {createQueries, createStore} from 'tinybase';
|
|
1279
|
+
*
|
|
1280
|
+
* const store = createStore()
|
|
1281
|
+
* .setTable('pets', {fido: {ownerId: '1'}})
|
|
1282
|
+
* .setTable('owners', {'1': {name: 'Alice', city: 'London'}});
|
|
1283
|
+
* const queries = createQueries(store)
|
|
1284
|
+
* .setQueryDefinition('owners', 'owners', ({selectAll}) => selectAll())
|
|
1285
|
+
* .setQueryDefinition('query', 'pets', ({selectAll, join}) => {
|
|
1286
|
+
* selectAll(true, 'owners', 'owner.');
|
|
1287
|
+
* join(true, 'owners', 'ownerId');
|
|
1288
|
+
* });
|
|
1289
|
+
*
|
|
1290
|
+
* console.log(queries.getResultRow('query', 'fido'));
|
|
1291
|
+
* // -> {'owner.city': 'London', 'owner.name': 'Alice'}
|
|
1292
|
+
* ```
|
|
1293
|
+
* @category Definition
|
|
1294
|
+
* @since v9.4.0
|
|
1295
|
+
*/
|
|
1296
|
+
(
|
|
1297
|
+
asQuery: true,
|
|
1298
|
+
joinedQueryId: Id,
|
|
1299
|
+
cellIdPrefixOrMapper?: Id | CellIdMapper,
|
|
1300
|
+
): void;
|
|
1301
|
+
};
|
|
1302
|
+
|
|
1161
1303
|
/**
|
|
1162
1304
|
* The SelectedAs type describes an object returned from calling a Select
|
|
1163
1305
|
* function so that the selected Cell Id can be optionally aliased.
|
|
@@ -1410,8 +1552,8 @@ export type Join<
|
|
|
1410
1552
|
): JoinedAs;
|
|
1411
1553
|
/**
|
|
1412
1554
|
* Calling this function with three parameters (where the first is `true`)
|
|
1413
|
-
* will indicate that the join to a Row in an adjacent query result is made
|
|
1414
|
-
*
|
|
1555
|
+
* will indicate that the join to a Row in an adjacent query result is made by
|
|
1556
|
+
* finding its Id in a Cell of the query's root Table.
|
|
1415
1557
|
* @param asQuery A flag indicating that the next Id is a query Id.
|
|
1416
1558
|
* @param joinedQueryId The Id of the query result to join to.
|
|
1417
1559
|
* @param on The Id of the Cell in the root Table that contains the joined
|
|
@@ -1491,8 +1633,8 @@ export type Join<
|
|
|
1491
1633
|
on: IntermediateJoinedCellId,
|
|
1492
1634
|
): JoinedAs;
|
|
1493
1635
|
/**
|
|
1494
|
-
* Calling this function with four parameters (where the first is `true`)
|
|
1495
|
-
*
|
|
1636
|
+
* Calling this function with four parameters (where the first is `true`) will
|
|
1637
|
+
* indicate that the join to a Row in a distant query result is made by
|
|
1496
1638
|
* finding its Id in a Cell of an intermediately joined Table.
|
|
1497
1639
|
* @param asQuery A flag indicating that the next Id is a query Id.
|
|
1498
1640
|
* @param joinedQueryId The Id of the distant query result to join to.
|
|
@@ -1553,9 +1695,9 @@ export type Join<
|
|
|
1553
1695
|
): JoinedAs;
|
|
1554
1696
|
/**
|
|
1555
1697
|
* Calling this function with four parameters (where the first is `true` and
|
|
1556
|
-
* the fourth is a function) will indicate that the join to a Row in a
|
|
1557
|
-
*
|
|
1558
|
-
*
|
|
1698
|
+
* the fourth is a function) will indicate that the join to a Row in a distant
|
|
1699
|
+
* query result is made by calculating its Id from the Cells and the Row Id of
|
|
1700
|
+
* an intermediately joined Table.
|
|
1559
1701
|
* @param asQuery A flag indicating that the next Id is a query Id.
|
|
1560
1702
|
* @param joinedQueryId The Id of the query result to join to.
|
|
1561
1703
|
* @param fromIntermediateJoinedTableId The Id of an intermediate Table (which
|
|
@@ -2256,6 +2398,7 @@ export interface Queries<in out Schemas extends OptionalSchemas> {
|
|
|
2256
2398
|
* tableId: Id,
|
|
2257
2399
|
* query: (keywords: {
|
|
2258
2400
|
* select: Select;
|
|
2401
|
+
* selectAll: SelectAll;
|
|
2259
2402
|
* join: Join;
|
|
2260
2403
|
* where: Where;
|
|
2261
2404
|
* group: Group;
|
|
@@ -2270,6 +2413,7 @@ export interface Queries<in out Schemas extends OptionalSchemas> {
|
|
|
2270
2413
|
* rootQueryId: Id,
|
|
2271
2414
|
* query: (keywords: {
|
|
2272
2415
|
* select: Select;
|
|
2416
|
+
* selectAll: SelectAll;
|
|
2273
2417
|
* join: Join;
|
|
2274
2418
|
* where: Where;
|
|
2275
2419
|
* group: Group;
|
|
@@ -2348,6 +2492,7 @@ export interface Queries<in out Schemas extends OptionalSchemas> {
|
|
|
2348
2492
|
tableId: RootTableId,
|
|
2349
2493
|
query: (keywords: {
|
|
2350
2494
|
select: Select<Schemas[0], RootTableId>;
|
|
2495
|
+
selectAll: SelectAll<Schemas[0]>;
|
|
2351
2496
|
join: Join<Schemas[0], RootTableId>;
|
|
2352
2497
|
where: Where<Schemas[0], RootTableId>;
|
|
2353
2498
|
group: Group;
|
|
@@ -2362,6 +2507,7 @@ export interface Queries<in out Schemas extends OptionalSchemas> {
|
|
|
2362
2507
|
rootQueryId: Id,
|
|
2363
2508
|
query: (keywords: {
|
|
2364
2509
|
select: Select<any, any>;
|
|
2510
|
+
selectAll: SelectAll<any>;
|
|
2365
2511
|
join: Join<any, any>;
|
|
2366
2512
|
where: Where<any, any>;
|
|
2367
2513
|
group: Group;
|
|
@@ -692,7 +692,7 @@ export type SortedTablePaginatorProps = {
|
|
|
692
692
|
*
|
|
693
693
|
* See the <TableInHtmlTable /> (React) demo for this component in action:
|
|
694
694
|
*
|
|
695
|
-
* 
|
|
697
697
|
*
|
|
698
698
|
* The component's props identify which Table to render based on Table Id, and
|
|
@@ -838,7 +838,7 @@ export function TableInHtmlTable(
|
|
|
838
838
|
* See the <SortedTableInHtmlTable /> (React) demo for this component in
|
|
839
839
|
* action:
|
|
840
840
|
*
|
|
841
|
-
* 
|
|
843
843
|
*
|
|
844
844
|
* The component's props identify which Table to render based on Table Id, and
|
|
@@ -1011,7 +1011,7 @@ export function SortedTableInHtmlTable(
|
|
|
1011
1011
|
*
|
|
1012
1012
|
* See the <ValuesInHtmlTable /> (React) demo for this component in action:
|
|
1013
1013
|
*
|
|
1014
|
-
* 
|
|
1016
1016
|
*
|
|
1017
1017
|
* The component's props identify which Row to render based on Table Id, Row Id,
|
|
@@ -1142,7 +1142,7 @@ export function ValuesInHtmlTable(
|
|
|
1142
1142
|
*
|
|
1143
1143
|
* See the <SliceInHtmlTable /> (React) demo for this component in action:
|
|
1144
1144
|
*
|
|
1145
|
-
* 
|
|
1147
1147
|
*
|
|
1148
1148
|
* The component's props identify which Slice to render based on Index Id, Slice
|
|
@@ -1300,7 +1300,7 @@ export function SliceInHtmlTable(
|
|
|
1300
1300
|
* See the <RelationshipInHtmlTable /> (React) demo for this component in
|
|
1301
1301
|
* action:
|
|
1302
1302
|
*
|
|
1303
|
-
* 
|
|
1305
1305
|
*
|
|
1306
1306
|
* The component's props identify which Relationship to render based on
|
|
@@ -1478,7 +1478,7 @@ export function RelationshipInHtmlTable(
|
|
|
1478
1478
|
* See the <ResultTableInHtmlTable /> (React) demo for this component in
|
|
1479
1479
|
* action:
|
|
1480
1480
|
*
|
|
1481
|
-
* 
|
|
1483
1483
|
*
|
|
1484
1484
|
* The component's props identify which ResultTable to render based on query Id,
|
|
@@ -1631,7 +1631,7 @@ export function ResultTableInHtmlTable(
|
|
|
1631
1631
|
* See the <ResultSortedTableInHtmlTable /> (React) demo for this component in
|
|
1632
1632
|
* action:
|
|
1633
1633
|
*
|
|
1634
|
-
* 
|
|
1636
1636
|
*
|
|
1637
1637
|
* The component's props identify which ResultTable to render based on query Id,
|
|
@@ -1805,7 +1805,7 @@ export function ResultSortedTableInHtmlTable(
|
|
|
1805
1805
|
*
|
|
1806
1806
|
* See the <EditableCellView /> (React) demo for this component in action:
|
|
1807
1807
|
*
|
|
1808
|
-
* 
|
|
1810
1810
|
*
|
|
1811
1811
|
* The component's props identify which Cell to render based on Table Id, Row
|
|
@@ -1876,7 +1876,7 @@ export function EditableCellView(
|
|
|
1876
1876
|
*
|
|
1877
1877
|
* See the <EditableValueView /> (React) demo for this component in action:
|
|
1878
1878
|
*
|
|
1879
|
-
* 
|
|
1881
1881
|
*
|
|
1882
1882
|
* The component's props identify which Value to render based on Table Id, Row
|
|
@@ -1947,7 +1947,7 @@ export function EditableValueView(
|
|
|
1947
1947
|
* See the <SortedTableInHtmlTable /> (React) demo for this component in
|
|
1948
1948
|
* action:
|
|
1949
1949
|
*
|
|
1950
|
-
* 
|
|
1952
1952
|
*
|
|
1953
1953
|
* The component displays 'previous' and 'next' buttons for paging through the
|
|
@@ -668,7 +668,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
668
668
|
*
|
|
669
669
|
* See the <TableInHtmlTable /> (React) demo for this component in action:
|
|
670
670
|
*
|
|
671
|
-
* 
|
|
673
673
|
*
|
|
674
674
|
* The component's props identify which Table to render based on Table Id, and
|
|
@@ -822,7 +822,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
822
822
|
* See the <SortedTableInHtmlTable /> (React) demo for this component in
|
|
823
823
|
* action:
|
|
824
824
|
*
|
|
825
|
-
* 
|
|
827
827
|
*
|
|
828
828
|
* The component's props identify which Table to render based on Table Id, and
|
|
@@ -1003,7 +1003,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1003
1003
|
*
|
|
1004
1004
|
* See the <ValuesInHtmlTable /> (React) demo for this component in action:
|
|
1005
1005
|
*
|
|
1006
|
-
* 
|
|
1008
1008
|
*
|
|
1009
1009
|
* The component's props identify which Row to render based on Table Id, Row Id,
|
|
@@ -1142,7 +1142,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1142
1142
|
*
|
|
1143
1143
|
* See the <SliceInHtmlTable /> (React) demo for this component in action:
|
|
1144
1144
|
*
|
|
1145
|
-
* 
|
|
1147
1147
|
*
|
|
1148
1148
|
* The component's props identify which Slice to render based on Index Id, Slice
|
|
@@ -1308,7 +1308,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1308
1308
|
* See the <RelationshipInHtmlTable /> (React) demo for this component in
|
|
1309
1309
|
* action:
|
|
1310
1310
|
*
|
|
1311
|
-
* 
|
|
1313
1313
|
*
|
|
1314
1314
|
* The component's props identify which Relationship to render based on
|
|
@@ -1494,7 +1494,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1494
1494
|
* See the <ResultTableInHtmlTable /> (React) demo for this component in
|
|
1495
1495
|
* action:
|
|
1496
1496
|
*
|
|
1497
|
-
* 
|
|
1499
1499
|
*
|
|
1500
1500
|
* The component's props identify which ResultTable to render based on query Id,
|
|
@@ -1655,7 +1655,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1655
1655
|
* See the <ResultSortedTableInHtmlTable /> (React) demo for this component in
|
|
1656
1656
|
* action:
|
|
1657
1657
|
*
|
|
1658
|
-
* 
|
|
1660
1660
|
*
|
|
1661
1661
|
* The component's props identify which ResultTable to render based on query Id,
|
|
@@ -1837,7 +1837,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1837
1837
|
*
|
|
1838
1838
|
* See the <EditableCellView /> (React) demo for this component in action:
|
|
1839
1839
|
*
|
|
1840
|
-
* 
|
|
1842
1842
|
*
|
|
1843
1843
|
* The component's props identify which Cell to render based on Table Id, Row
|
|
@@ -1922,7 +1922,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1922
1922
|
*
|
|
1923
1923
|
* See the <EditableValueView /> (React) demo for this component in action:
|
|
1924
1924
|
*
|
|
1925
|
-
* 
|
|
1927
1927
|
*
|
|
1928
1928
|
* The component's props identify which Value to render based on Table Id, Row
|
|
@@ -1993,7 +1993,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1993
1993
|
* See the <SortedTableInHtmlTable /> (React) demo for this component in
|
|
1994
1994
|
* action:
|
|
1995
1995
|
*
|
|
1996
|
-
* 
|
|
1998
1998
|
*
|
|
1999
1999
|
* The component displays 'previous' and 'next' buttons for paging through the
|
|
@@ -483,7 +483,7 @@ export type YAxisProps = {
|
|
|
483
483
|
*
|
|
484
484
|
* See the Composing Charts (React) demo for this component in action:
|
|
485
485
|
*
|
|
486
|
-
* 
|
|
488
488
|
*
|
|
489
489
|
* The series children declare their own xCellId and yCellId bindings. The
|
|
@@ -542,7 +542,7 @@ export function CartesianChart(
|
|
|
542
542
|
*
|
|
543
543
|
* See the Axis Overrides (React) demo for this component in action:
|
|
544
544
|
*
|
|
545
|
-
* 
|
|
547
547
|
* @category Store components
|
|
548
548
|
* @since v8.5.0
|
|
@@ -558,7 +558,7 @@ export function XAxis(props: XAxisProps): ComponentReturnType;
|
|
|
558
558
|
*
|
|
559
559
|
* See the Axis Overrides (React) demo for this component in action:
|
|
560
560
|
*
|
|
561
|
-
* 
|
|
563
563
|
* @category Store components
|
|
564
564
|
* @since v8.5.0
|
|
@@ -574,7 +574,7 @@ export function YAxis(props: YAxisProps): ComponentReturnType;
|
|
|
574
574
|
*
|
|
575
575
|
* See the Composing Charts (React) demo for this component in action:
|
|
576
576
|
*
|
|
577
|
-
* 
|
|
579
579
|
* @category Store components
|
|
580
580
|
* @since v8.5.0
|
|
@@ -590,7 +590,7 @@ export function LineSeries(props: SeriesProps): ComponentReturnType;
|
|
|
590
590
|
*
|
|
591
591
|
* See the Composing Charts (React) demo for this component in action:
|
|
592
592
|
*
|
|
593
|
-
* 
|
|
595
595
|
* @category Store components
|
|
596
596
|
* @since v8.5.0
|
|
@@ -607,7 +607,7 @@ export function BarSeries(props: SeriesProps): ComponentReturnType;
|
|
|
607
607
|
*
|
|
608
608
|
* See the <LineChart /> (React) demo for this component in action:
|
|
609
609
|
*
|
|
610
|
-
* 
|
|
612
612
|
* @category Store components
|
|
613
613
|
* @since v8.5.0
|
|
@@ -660,7 +660,7 @@ export function LineChart(
|
|
|
660
660
|
*
|
|
661
661
|
* See the Sorting And Types (React) demo for this component in action:
|
|
662
662
|
*
|
|
663
|
-
* 
|
|
665
665
|
* @category Store components
|
|
666
666
|
* @since v8.5.0
|