@elaraai/e3 1.0.98 → 1.0.100

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.
Files changed (146) hide show
  1. package/README.md +4 -5
  2. package/dist/src/browser.d.ts +2 -0
  3. package/dist/src/browser.d.ts.map +1 -1
  4. package/dist/src/browser.js +6 -0
  5. package/dist/src/browser.js.map +1 -1
  6. package/dist/src/environment-capture.d.ts +21 -0
  7. package/dist/src/environment-capture.d.ts.map +1 -1
  8. package/dist/src/environment-capture.js +48 -0
  9. package/dist/src/environment-capture.js.map +1 -1
  10. package/dist/src/export.d.ts +10 -5
  11. package/dist/src/export.d.ts.map +1 -1
  12. package/dist/src/export.js +31 -47
  13. package/dist/src/export.js.map +1 -1
  14. package/dist/src/export.spec.js +27 -16
  15. package/dist/src/export.spec.js.map +1 -1
  16. package/dist/src/function.d.ts.map +1 -1
  17. package/dist/src/function.js.map +1 -1
  18. package/dist/src/functions-cache.d.ts +60 -0
  19. package/dist/src/functions-cache.d.ts.map +1 -0
  20. package/dist/src/functions-cache.js +165 -0
  21. package/dist/src/functions-cache.js.map +1 -0
  22. package/dist/src/functions-link.spec.js +191 -12
  23. package/dist/src/functions-link.spec.js.map +1 -1
  24. package/dist/src/functions-resolve.d.ts +52 -23
  25. package/dist/src/functions-resolve.d.ts.map +1 -1
  26. package/dist/src/functions-resolve.js +244 -96
  27. package/dist/src/functions-resolve.js.map +1 -1
  28. package/dist/src/index.d.ts +8 -61
  29. package/dist/src/index.d.ts.map +1 -1
  30. package/dist/src/index.js +3 -8
  31. package/dist/src/index.js.map +1 -1
  32. package/dist/src/internal.d.ts +53 -0
  33. package/dist/src/internal.d.ts.map +1 -0
  34. package/dist/src/internal.js +29 -0
  35. package/dist/src/internal.js.map +1 -0
  36. package/dist/src/lazy-build.d.ts +25 -0
  37. package/dist/src/lazy-build.d.ts.map +1 -0
  38. package/dist/src/lazy-build.js +56 -0
  39. package/dist/src/lazy-build.js.map +1 -0
  40. package/dist/src/lazy-build.spec.d.ts +6 -0
  41. package/dist/src/lazy-build.spec.d.ts.map +1 -0
  42. package/dist/src/lazy-build.spec.js +153 -0
  43. package/dist/src/lazy-build.spec.js.map +1 -0
  44. package/dist/src/migration.d.ts +20 -163
  45. package/dist/src/migration.d.ts.map +1 -1
  46. package/dist/src/migration.js +37 -34
  47. package/dist/src/migration.js.map +1 -1
  48. package/dist/src/migration.spec.js +83 -78
  49. package/dist/src/migration.spec.js.map +1 -1
  50. package/dist/src/mutation-programs.spec.js +211 -118
  51. package/dist/src/mutation-programs.spec.js.map +1 -1
  52. package/dist/src/mutation.d.ts +37 -141
  53. package/dist/src/mutation.d.ts.map +1 -1
  54. package/dist/src/mutation.js +66 -28
  55. package/dist/src/mutation.js.map +1 -1
  56. package/dist/src/open-beast-link.spec.js +1 -1
  57. package/dist/src/open-beast-link.spec.js.map +1 -1
  58. package/dist/src/output.js.map +1 -1
  59. package/dist/src/package.d.ts +2 -38
  60. package/dist/src/package.d.ts.map +1 -1
  61. package/dist/src/package.js +42 -175
  62. package/dist/src/package.js.map +1 -1
  63. package/dist/src/record-area.d.ts +49 -37
  64. package/dist/src/record-area.d.ts.map +1 -1
  65. package/dist/src/record-area.js +211 -131
  66. package/dist/src/record-area.js.map +1 -1
  67. package/dist/src/record-area.spec.js +79 -62
  68. package/dist/src/record-area.spec.js.map +1 -1
  69. package/dist/src/record-arguments.d.ts +55 -0
  70. package/dist/src/record-arguments.d.ts.map +1 -0
  71. package/dist/src/record-arguments.js +72 -0
  72. package/dist/src/record-arguments.js.map +1 -0
  73. package/dist/src/record-builders.d.ts +547 -0
  74. package/dist/src/record-builders.d.ts.map +1 -0
  75. package/dist/src/record-builders.js +112 -0
  76. package/dist/src/record-builders.js.map +1 -0
  77. package/dist/src/record-declared.spec.d.ts +6 -0
  78. package/dist/src/record-declared.spec.d.ts.map +1 -0
  79. package/dist/src/record-declared.spec.js +251 -0
  80. package/dist/src/record-declared.spec.js.map +1 -0
  81. package/dist/src/record-guards.d.ts +114 -1
  82. package/dist/src/record-guards.d.ts.map +1 -1
  83. package/dist/src/record-guards.js +153 -2
  84. package/dist/src/record-guards.js.map +1 -1
  85. package/dist/src/record-index.d.ts +128 -350
  86. package/dist/src/record-index.d.ts.map +1 -1
  87. package/dist/src/record-index.js +44 -481
  88. package/dist/src/record-index.js.map +1 -1
  89. package/dist/src/record-index.spec.js +124 -90
  90. package/dist/src/record-index.spec.js.map +1 -1
  91. package/dist/src/record-interval.d.ts +57 -36
  92. package/dist/src/record-interval.d.ts.map +1 -1
  93. package/dist/src/record-interval.js +136 -94
  94. package/dist/src/record-interval.js.map +1 -1
  95. package/dist/src/record-interval.spec.js +48 -27
  96. package/dist/src/record-interval.spec.js.map +1 -1
  97. package/dist/src/record-keys.d.ts +146 -0
  98. package/dist/src/record-keys.d.ts.map +1 -0
  99. package/dist/src/record-keys.js +178 -0
  100. package/dist/src/record-keys.js.map +1 -0
  101. package/dist/src/record-nested-programs.d.ts +1457 -0
  102. package/dist/src/record-nested-programs.d.ts.map +1 -0
  103. package/dist/src/record-nested-programs.js +1974 -0
  104. package/dist/src/record-nested-programs.js.map +1 -0
  105. package/dist/src/record-nested.d.ts +284 -0
  106. package/dist/src/record-nested.d.ts.map +1 -0
  107. package/dist/src/record-nested.js +304 -0
  108. package/dist/src/record-nested.js.map +1 -0
  109. package/dist/src/record-nested.spec.d.ts +6 -0
  110. package/dist/src/record-nested.spec.d.ts.map +1 -0
  111. package/dist/src/record-nested.spec.js +1032 -0
  112. package/dist/src/record-nested.spec.js.map +1 -0
  113. package/dist/src/record-patches.d.ts +25 -0
  114. package/dist/src/record-patches.d.ts.map +1 -0
  115. package/dist/src/record-patches.js +27 -0
  116. package/dist/src/record-patches.js.map +1 -0
  117. package/dist/src/record-programs.d.ts +192 -26
  118. package/dist/src/record-programs.d.ts.map +1 -1
  119. package/dist/src/record-programs.js +858 -350
  120. package/dist/src/record-programs.js.map +1 -1
  121. package/dist/src/record-programs.spec.d.ts +6 -0
  122. package/dist/src/record-programs.spec.d.ts.map +1 -0
  123. package/dist/src/record-programs.spec.js +242 -0
  124. package/dist/src/record-programs.spec.js.map +1 -0
  125. package/dist/src/record-series.d.ts +101 -97
  126. package/dist/src/record-series.d.ts.map +1 -1
  127. package/dist/src/record-series.js +198 -149
  128. package/dist/src/record-series.js.map +1 -1
  129. package/dist/src/record-series.spec.js +241 -120
  130. package/dist/src/record-series.spec.js.map +1 -1
  131. package/dist/src/record-tiles.d.ts +328 -37
  132. package/dist/src/record-tiles.d.ts.map +1 -1
  133. package/dist/src/record-tiles.js +289 -100
  134. package/dist/src/record-tiles.js.map +1 -1
  135. package/dist/src/record.d.ts +66 -12
  136. package/dist/src/record.d.ts.map +1 -1
  137. package/dist/src/record.js +103 -34
  138. package/dist/src/record.js.map +1 -1
  139. package/dist/src/record.spec.js +48 -63
  140. package/dist/src/record.spec.js.map +1 -1
  141. package/dist/src/task.d.ts.map +1 -1
  142. package/dist/src/task.js +4 -1
  143. package/dist/src/task.js.map +1 -1
  144. package/dist/src/types.d.ts +103 -37
  145. package/dist/src/types.d.ts.map +1 -1
  146. package/package.json +7 -3
@@ -4,197 +4,246 @@
4
4
  */
5
5
  /**
6
6
  * The keys of a series index and the contributions of a summary index (#1039):
7
- * a record's events filed by a key — the resource an event is on — and by the
8
- * time tiles it touches (`record-tiles.ts`).
7
+ * a record's events filed by a key — the resource an event is on — and by time
8
+ * (`record-tiles.ts`).
9
9
  *
10
- * Both key an entry `{ …on, __tile, <key> }`: the exact leading fields, the
11
- * tile's start, then the key's value. The tile leads the key, so the events of
12
- * one tile on a contiguous run of keys — a block of a Plan's rows — are one
13
- * contiguous range of either index: a cell.
10
+ * Both lead with the exact leading fields under `on` (#1432), then the key's
11
+ * value, so a key's entries over any span of time are one contiguous range of
12
+ * either index (#1433):
14
13
  *
15
- * - **A series index** is an ordinary maintained index whose keys the SDK
16
- * generates: an entry per tile an event touches, carrying the row. Mutation,
14
+ * - **A series index** files each event once, `{ on: { …on }, key, level,
15
+ * tile }`: at the finest level, from its tile up, whose shortest tile holds
16
+ * the event's length, under the tile of that level holding its start — or,
17
+ * past a year, under each year it touches (`eventFilings`). A reader reads a
18
+ * key one range a level, whatever the span. It is an ordinary maintained
19
+ * index whose keys the SDK generates, each entry carrying the row: mutation,
17
20
  * rebuild, storage and transport are the ones every index has.
18
- * - **A summary index** keeps, for each key, how many rows touch its tile and
19
- * the milliseconds of it they cover. Its keys come from a row's
20
- * contributions, `(K, V) → Dict<IK, Totals>`: the count 1 and the row's share
21
- * of each tile it touches, under each.
21
+ * - **A summary index** keeps, for each key and tile, how many rows touch the
22
+ * tile and the milliseconds of it they cover, `{ on: { …on }, key, tile }`.
23
+ * Its keys come from a row's contributions, `(K, V) → Dict<IK, Totals>`: the
24
+ * count 1 and the row's share of each tile it touches, under each
25
+ * (`tileShares`).
22
26
  *
23
27
  * A row with no start is in neither: it has no time to file it by.
24
28
  *
25
29
  * @packageDocumentation
26
30
  */
27
- import { DateTimeType, DictType, East, Expr, NullType, OptionType, SetType, StructType, isTypeEqual, printType, some, } from '@elaraai/east';
28
- import { RecordSummaryTotalsType } from '@elaraai/e3-types';
29
- import { checkTile, tileShares } from './record-tiles.js';
30
- /** The reserved name of a series or summary index's tile field. */
31
- export const TILE_FIELD = '__tile';
31
+ import { ArrayType, DateTimeType, DictType, East, NullType, SetType, StringType, StructType, variant, withLocationCapture, } from '@elaraai/east';
32
+ import { RecordLevelType, RecordSummaryTotalsType } from '@elaraai/e3-types';
33
+ import { INDEX_PURITY, checkEntryParams, checkPure, indexRunner, indexedEntry, onlyOptions, signatureOf, } from './record-guards.js';
34
+ import { checkLeading, checkTimeField, fieldReader, leadingValues } from './record-keys.js';
35
+ import { TILE_FNS, TileFilingType, TileShareType, checkTile } from './record-tiles.js';
36
+ import { lazyBuilds } from './lazy-build.js';
32
37
  /**
33
38
  * Checks a series or summary declaration's fields against the record's row:
34
39
  * the key is a field that is no Set, the start and the end are DateTime or
35
- * Option<DateTime> fields, the tile is one an index files by, the row has no
36
- * field named `__tile`, and the leading fields take neither `__tile`, the key,
37
- * the start nor the end. A leading field is matched exactly, before the tile:
38
- * led by the start or the end the tiles are cut by, a tile's events on a block
39
- * of keys would be a range for each instant, never one.
40
+ * Option<DateTime> fields, the tile is one an index files by, and the leading
41
+ * fields take neither the key — the index orders by it already — nor the start
42
+ * nor the end: a leading field is matched exactly, before the key, and led by
43
+ * the start or the end the tiles are cut by, a key's events over a span would
44
+ * be a range for each instant, never one range a level.
40
45
  *
41
46
  * @param constructor - The constructor, as a refusal names it
42
47
  * @param name - The index
43
48
  * @param valueType - The record's row type
44
- * @param on - The exact leading fields
45
- * @param spec - The fields and the tile
46
- * @returns The types the key is built from
49
+ * @param spec - The declaration
50
+ * @returns The fields
47
51
  * @throws {Error} Naming the option, the field and why
48
52
  */
49
- export function checkTimeTile(constructor, name, valueType, on, spec) {
53
+ function checkTimeTile(constructor, name, valueType, spec) {
50
54
  if (valueType.type !== 'Struct')
51
55
  throw new Error(`${constructor} '${name}' indexes a record with Struct rows`);
52
56
  const rowType = valueType;
53
- checkTile(constructor, name, spec.tile);
54
- if (Object.hasOwn(rowType.fields, TILE_FIELD)) {
55
- throw new Error(`${constructor} '${name}': the row has a field named '${TILE_FIELD}', which the index reserves for its tile`);
56
- }
57
- const keyField = rowType.fields[spec.key];
58
- if (keyField === undefined)
57
+ const tile = checkTile(constructor, name, spec.tile);
58
+ const keyType = rowType.fields[spec.key];
59
+ if (keyType === undefined)
59
60
  throw new Error(`${constructor} '${name}' key names unknown row field '${spec.key}'`);
60
- if (keyField.type === 'Set') {
61
+ if (keyType.type === 'Set') {
61
62
  throw new Error(`${constructor} '${name}' key names '${spec.key}', a Set: the key is the one field naming what an event is on`);
62
63
  }
63
- const timed = (option, field) => {
64
- const type = rowType.fields[field];
65
- if (type === undefined)
66
- throw new Error(`${constructor} '${name}' ${option} names unknown row field '${field}'`);
67
- if (!isTypeEqual(type, DateTimeType) && !isTypeEqual(type, OptionType(DateTimeType))) {
68
- throw new Error(`${constructor} '${name}' ${option} names '${field}', of type ${printType(type)}: ${option} is a DateTime or an Option<DateTime> field`);
69
- }
70
- return type;
71
- };
72
- const startType = timed('from', spec.from);
73
- const endType = timed('to', spec.to);
74
- for (const field of [spec.key, TILE_FIELD]) {
75
- if (on.includes(field))
76
- throw new Error(`${constructor} '${name}': '${field}' follows the leading fields, and cannot be one`);
77
- }
64
+ const start = checkTimeField(constructor, name, rowType, 'from', spec.from);
65
+ const end = checkTimeField(constructor, name, rowType, 'to', spec.to);
66
+ const on = spec.on ?? [];
67
+ if (on.includes(spec.key))
68
+ throw new Error(`${constructor} '${name}': '${spec.key}' follows the leading fields, and cannot be one`);
78
69
  for (const [field, what] of [[spec.from, 'start'], [spec.to, 'end']]) {
79
70
  if (on.includes(field)) {
80
71
  throw new Error(`${constructor} '${name}': '${field}' is the event's ${what}, which its tiles are cut by, and cannot be a leading field`);
81
72
  }
82
73
  }
83
- const fields = Object.fromEntries(on.map((field) => {
84
- const type = rowType.fields[field];
85
- return [field, type.type === 'Set' ? type.key : type];
86
- }));
87
- const indexType = StructType({ ...fields, [TILE_FIELD]: DateTimeType, [spec.key]: keyField });
88
- return { rowType, startType, endType, indexType };
74
+ return { rowType, leading: checkLeading(constructor, name, rowType, on), key: { field: spec.key, type: keyType }, start, end, tile };
89
75
  }
90
76
  /**
91
- * Builds a function of a row's tiles: `(K, V) → C`, the row's start and end
92
- * read, each tile it touches and its share, under each combination of its
93
- * leading values, folded into `C` by `put`.
77
+ * A series index's definition (`index.series`): its key function,
78
+ * `(K, V) → Set<IK>`, an entry per place a row's event is filed
79
+ * (`eventFilings`: once, or once a year past a year), `{ on: { …on }, key,
80
+ * level, tile }` — one per combination of its leading values, a Set among them
81
+ * fanning out, as the interval index's do; and its projection, the whole row,
82
+ * so a cell reads the index alone and no record segment. It stays an ordinary
83
+ * maintained index: mutation, rebuild, storage and transport are shared.
84
+ *
85
+ * @param constructor - The declaration, as a refusal names it
86
+ * @param name - The index
87
+ * @param rec - Its record
88
+ * @param spec - The key, the start and the end, the tile, and the optional leading `on`
89
+ * @param config - Its runner selection
90
+ * @returns The definition
91
+ * @throws {Error} When a field is not of its option's type, naming the option, the field and its type; when the tile is
92
+ * not one of the five; when the key, the start or the end is a leading field; or on any guard every index applies
94
93
  */
95
- function overTiles(keyType, checked, on, spec, prefix, output, empty, put) {
96
- const shares = tileShares(spec.tile);
97
- const prefixType = prefix === undefined ? undefined : Expr.type(prefix.fn);
98
- // Dynamic field names are erased only inside this generated East function,
99
- // as in the field, interval and area key generators; every type was checked.
100
- return East.function([keyType, checked.rowType], output, ($, key, row) => {
101
- const tiles = $.const(shares);
102
- const into = $.let(empty(), output);
103
- const start = $.let(checked.startType.type === 'DateTime' ? some(row[spec.from]) : row[spec.from], OptionType(DateTimeType));
104
- const end = $.let(checked.endType.type === 'DateTime' ? some(row[spec.to]) : row[spec.to], OptionType(DateTimeType));
105
- $.match(start, {
106
- some: ($, from) => {
107
- // No end is an instant at the start; the tiles say so of one at or before it.
108
- const to = $.let(end.match({ some: (_$, to) => to, none: () => from }), DateTimeType);
109
- const touched = $.let(tiles(from, to, East.print(key)));
110
- const file = ($, leading) => {
111
- $.for(touched, ($, share) => {
112
- put($, into, { ...leading, [TILE_FIELD]: share.tile, [spec.key]: row[spec.key] }, share);
113
- });
114
- };
115
- if (prefix === undefined) {
116
- file($, {});
117
- return;
118
- }
119
- const make = $.const(prefix.fn);
120
- const values = $.let(make(key, row), prefixType.output);
121
- const leadingOf = (value) => Object.fromEntries(on.map((field) => [field, on.length === 1 ? value : value[field]]));
122
- if (prefix.multi)
123
- $.for(values, ($, value) => file($, leadingOf(value)));
124
- else
125
- file($, leadingOf(values));
126
- },
127
- });
128
- return into;
94
+ export function seriesDefinition(constructor, name, rec, spec, config) {
95
+ const { keyType, valueType } = indexedEntry(constructor, name, rec);
96
+ onlyOptions(constructor, name, spec, ['on', 'key', 'from', 'to', 'tile'], 'value' in spec ? 'a series index carries the whole row as its projection, so it takes no value' : undefined);
97
+ const fields = checkTimeTile(constructor, name, valueType, spec);
98
+ const { rowType, leading } = fields;
99
+ const indexType = StructType({ on: leading.onType, key: fields.key.type, level: RecordLevelType, tile: DateTimeType });
100
+ const level = variant(fields.tile, null);
101
+ const readKey = fieldReader(keyType, rowType, fields.key);
102
+ const readStart = fieldReader(keyType, rowType, { option: fields.start });
103
+ const readEnd = fieldReader(keyType, rowType, { option: fields.end });
104
+ const leads = leadingValues(keyType, rowType, leading);
105
+ // An event's entries under one combination of its leading values: one a place it is filed.
106
+ const filedUnder = East.function([leading.onType, fields.key.type, ArrayType(TileFilingType)], SetType(indexType), (_$, on, key, filings) => filings.toSet((_$, filing) => ({ on, key, level: filing.level, tile: filing.tile })));
107
+ const keyFn = East.function([keyType, rowType], SetType(indexType), ($, key, row) => {
108
+ const keyOf = $.const(readKey);
109
+ const startOf = $.const(readStart);
110
+ const endOf = $.const(readEnd);
111
+ const file = $.const(TILE_FNS.placedFilings);
112
+ const combinations = $.const(leads);
113
+ const under = $.const(filedUnder);
114
+ const eventKey = $.let(keyOf(key, row));
115
+ const filings = $.let(file(level, startOf(key, row), endOf(key, row), East.print(key)));
116
+ return combinations(key, row).flattenToSet((_$, on) => under(on, eventKey, filings));
129
117
  });
118
+ // It carries its rows: each entry's projection is the whole row, so a cell reads the index alone and no record segment.
119
+ const valueFn = East.function([keyType, rowType], rowType, (_$, _key, row) => row);
120
+ const runner = indexRunner(config);
121
+ checkPure(`${constructor} '${name}' 'keys' function`, keyFn, INDEX_PURITY);
122
+ checkEntryParams(constructor, name, "'keys' function", keyType, valueType, signatureOf(keyFn).inputs);
123
+ return {
124
+ kind: 'recordIndex',
125
+ name,
126
+ record: rec,
127
+ on: Object.freeze([...(spec.on ?? [])]),
128
+ series: Object.freeze({ key: spec.key, from: spec.from, to: spec.to, tile: fields.tile }),
129
+ keyFn,
130
+ valueFn,
131
+ multi: true,
132
+ keyType: indexType,
133
+ valueType: rowType,
134
+ runner,
135
+ };
130
136
  }
137
+ /** The largest Integer: a summary's total past it is no Integer. */
138
+ const INTEGER_MAX = (1n << 63n) - 1n;
139
+ /** What a refusal says of totals summed past the largest Integer, after naming them. */
140
+ const PAST_INTEGER_MAX = 'sum past the largest Integer: declare a finer tile, whose totals are smaller';
131
141
  /**
132
- * The series index's key function: `(K, V) → Set<IK>`, an entry per tile a
133
- * row's event touches, `{ …on, __tile, <key> }` — one per combination of its
134
- * leading values, a Set among them fanning out, as the interval index's do.
142
+ * A summary's merge, `({ik, k}, Totals, Totals) → Totals`: a build's pieces
143
+ * hold the same keys, and a key's totals across them are their sum, refused
144
+ * past the largest Integer naming the index and the key. Built with no source
145
+ * locations, so its program is the same wherever the package is built.
135
146
  *
136
- * @param name - The index, for the refusals
137
- * @param keyType - The record's key type
138
- * @param valueType - The record's row type
139
- * @param on - The exact leading fields
140
- * @param spec - The key, the start and the end, and the tile
141
- * @param prefix - The leading fields' generated key function
142
- * @returns The key function and the index key's type
143
- * @throws {Error} As {@link checkTimeTile} does
147
+ * @param name - The index
148
+ * @param indexType - Its key type
149
+ * @returns The merge
144
150
  */
145
- export function seriesKeys(name, keyType, valueType, on, spec, prefix) {
146
- const checked = checkTimeTile('e3.recordIndex.series', name, valueType, on, spec);
147
- const keys = SetType(checked.indexType);
148
- const fn = overTiles(keyType, checked, on, spec, prefix, keys, () => new Set(), ($, into, ik) => { $(into.tryInsert(ik)); });
149
- return { fn, multi: true, indexType: checked.indexType };
151
+ export function summaryMerge(name, indexType) {
152
+ return withLocationCapture(false, () => East.function([StructType({ ik: indexType, k: NullType }), RecordSummaryTotalsType, RecordSummaryTotalsType], RecordSummaryTotalsType, ($, entry, a, b) => {
153
+ const add = $.const(SERIES_FNS.addTotals);
154
+ return add(East.str `${name}: the totals under ${East.print(entry)}`, a, b);
155
+ }));
150
156
  }
151
157
  /**
152
- * The summary index's contributions: `(K, V) → Dict<IK, Totals>`, under each
153
- * tile a row's event touches — once per combination of its leading values —
154
- * the count 1 and the milliseconds of the tile it covers.
158
+ * A summary index's definition (`index.summary`): its key function, a
159
+ * row's contributions, `(K, V) → Dict<IK, Totals>` — under each tile its event
160
+ * touches, `{ on: { …on }, key, tile }`, once per combination of its leading
161
+ * values, the count 1 and the milliseconds of the tile it covers — and its
162
+ * merge, `({ik, k}, Totals, Totals) → Totals`: a build's pieces hold the same
163
+ * keys, and a key's totals across them are their sum.
155
164
  *
156
- * @param name - The index, for the refusals
157
- * @param keyType - The record's key type
158
- * @param valueType - The record's row type
159
- * @param on - The exact leading fields
160
- * @param spec - The key, the start and the end, and the tile
161
- * @param prefix - The leading fields' generated key function
162
- * @returns The contributions function and the index key's type
163
- * @throws {Error} As {@link checkTimeTile} does
165
+ * @param constructor - The declaration, as a refusal names it
166
+ * @param name - The index
167
+ * @param rec - Its record
168
+ * @param spec - The key, the start and the end, the tile, and the optional leading `on`
169
+ * @param config - Its runner selection
170
+ * @returns The definition
171
+ * @throws {Error} As {@link seriesDefinition} does
164
172
  */
165
- export function summaryContributions(name, keyType, valueType, on, spec, prefix) {
166
- const checked = checkTimeTile('e3.recordIndex.summary', name, valueType, on, spec);
167
- const totals = DictType(checked.indexType, RecordSummaryTotalsType);
168
- const fn = overTiles(keyType, checked, on, spec, prefix, totals, () => new Map(), ($, into, ik, share) => { $(into.insertOrUpdate(ik, { count: 1n, ms: share.ms })); });
169
- return { fn, indexType: checked.indexType };
173
+ export function summaryDefinition(constructor, name, rec, spec, config) {
174
+ const { keyType, valueType } = indexedEntry(constructor, name, rec);
175
+ onlyOptions(constructor, name, spec, ['on', 'key', 'from', 'to', 'tile'], 'value' in spec ? 'a summary index holds its totals, so it takes no value' : undefined);
176
+ const fields = checkTimeTile(constructor, name, valueType, spec);
177
+ const { rowType, leading } = fields;
178
+ const indexType = StructType({ on: leading.onType, key: fields.key.type, tile: DateTimeType });
179
+ const totalsType = DictType(indexType, RecordSummaryTotalsType);
180
+ const level = variant(fields.tile, null);
181
+ const readKey = fieldReader(keyType, rowType, fields.key);
182
+ const readStart = fieldReader(keyType, rowType, { option: fields.start });
183
+ const readEnd = fieldReader(keyType, rowType, { option: fields.end });
184
+ const leads = leadingValues(keyType, rowType, leading);
185
+ // An event's contributions under one combination of its leading values: the count 1 and its share, under each tile.
186
+ const sharesUnder = East.function([leading.onType, fields.key.type, ArrayType(TileShareType)], totalsType, (_$, on, key, shares) => shares.toDict((_$, share) => ({ on, key, tile: share.tile }), (_$, share) => ({ count: 1n, ms: share.ms })));
187
+ const keyFn = East.function([keyType, rowType], totalsType, ($, key, row) => {
188
+ const keyOf = $.const(readKey);
189
+ const startOf = $.const(readStart);
190
+ const endOf = $.const(readEnd);
191
+ const share = $.const(TILE_FNS.placedShares);
192
+ const combinations = $.const(leads);
193
+ const under = $.const(sharesUnder);
194
+ const eventKey = $.let(keyOf(key, row));
195
+ const shares = $.let(share(level, startOf(key, row), endOf(key, row), East.print(key)));
196
+ return combinations(key, row).flattenToDict((_$, on) => under(on, eventKey, shares));
197
+ });
198
+ const mergeFn = summaryMerge(name, indexType);
199
+ const runner = indexRunner(config);
200
+ checkPure(`${constructor} '${name}' contributions`, keyFn, INDEX_PURITY);
201
+ checkEntryParams(constructor, name, 'contributions', keyType, valueType, signatureOf(keyFn).inputs);
202
+ return {
203
+ kind: 'recordIndex',
204
+ name,
205
+ record: rec,
206
+ on: Object.freeze([...(spec.on ?? [])]),
207
+ summary: Object.freeze({ key: spec.key, from: spec.from, to: spec.to, tile: fields.tile }),
208
+ keyFn,
209
+ mergeFn,
210
+ // A row touches several keys, and a key stands for several rows.
211
+ multi: true,
212
+ keyType: indexType,
213
+ valueType: RecordSummaryTotalsType,
214
+ runner,
215
+ };
170
216
  }
171
- /** The largest Integer: a summary's total past it is no Integer. */
172
- const INTEGER_MAX = (1n << 63n) - 1n;
217
+ // ── The functions, each built the first time it is read ──────────────────────
173
218
  /**
174
- * A summary's merge: the build's pieces hold the same keys, and a key's
175
- * totals across them are their sum. Integer addition is associative and
176
- * commutative, so the pieces fold to the same totals in any order.
177
- *
178
- * @remarks
179
- * East's Integer addition wraps, so a sum past the largest Integer is refused
180
- * rather than stored below none — as a write that would carry a total past it
181
- * is: a finer tile's totals are smaller.
182
- *
183
- * @param name - The summary, as the refusal names it
184
- * @param indexType - The summary's index key
185
- * @returns `({ik, k}, Totals, Totals) → Totals`
186
- * @throws East runtime error when a key's totals sum past the largest Integer,
187
- * naming the summary, the key and a finer tile
219
+ * A summary index's East functions, each built the first time it is read,
220
+ * with no location captured ({@link lazyBuilds}, #1466): importing the SDK
221
+ * builds none of them.
188
222
  */
189
- export function summaryMerge(name, indexType) {
190
- const entry = StructType({ ik: indexType, k: NullType });
191
- const past = 'sum past the largest Integer: declare a finer tile, whose totals are smaller';
192
- return East.function([entry, RecordSummaryTotalsType, RecordSummaryTotalsType], RecordSummaryTotalsType, ($, key, a, b) => {
193
- // Totals are never below none, so a sum passes the largest Integer exactly when one part passes what the other leaves of it.
194
- $.if(a.count.greater(East.value(INTEGER_MAX).subtract(b.count)).or(() => a.ms.greater(East.value(INTEGER_MAX).subtract(b.ms))), ($) => {
195
- $.error(East.str `${name}: the totals under ${East.print(key)} ${past}`);
223
+ export const SERIES_FNS = lazyBuilds({
224
+ /**
225
+ * Two of a summary's totals summed. Integer addition is associative and
226
+ * commutative, so a build's pieces fold to the same totals in any order.
227
+ *
228
+ * `(what, a, b) → a + b`, `what` naming the totals in the refusal.
229
+ *
230
+ * @remarks
231
+ * East's Integer addition wraps, so a sum past the largest Integer is refused
232
+ * rather than stored below none — as a write that would carry a total past it
233
+ * is: a finer tile's totals are smaller.
234
+ *
235
+ * Throws an East runtime error when the totals sum past the largest Integer,
236
+ * naming `what` and a finer tile.
237
+ */
238
+ get addTotals() {
239
+ return East.function([StringType, RecordSummaryTotalsType, RecordSummaryTotalsType], RecordSummaryTotalsType, ($, what, a, b) => {
240
+ const max = $.const(INTEGER_MAX);
241
+ // Totals are never below none, so a sum passes the largest Integer exactly when one part passes what the other leaves of it.
242
+ $.if(a.count.greater(max.subtract(b.count)).or(() => a.ms.greater(max.subtract(b.ms))), ($) => {
243
+ $.error(East.str `${what} ${PAST_INTEGER_MAX}`);
244
+ });
245
+ return { count: a.count.add(b.count), ms: a.ms.add(b.ms) };
196
246
  });
197
- return { count: a.count.add(b.count), ms: a.ms.add(b.ms) };
198
- });
199
- }
247
+ },
248
+ });
200
249
  //# sourceMappingURL=record-series.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"record-series.js","sourceRoot":"","sources":["../../src/record-series.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EACL,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,GAE5G,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAmB,MAAM,mBAAmB,CAAC;AAE3E,mEAAmE;AACnE,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC;AAsBnC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,aAAa,CAAC,WAAmB,EAAE,IAAY,EAAE,SAAmB,EAAE,EAAqB,EAAE,IAAoB;IAC/H,IAAI,SAAS,CAAC,IAAI,KAAK,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,WAAW,KAAK,IAAI,qCAAqC,CAAC,CAAC;IAC/G,MAAM,OAAO,GAAG,SAAiD,CAAC;IAClE,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACxC,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,GAAG,WAAW,KAAK,IAAI,iCAAiC,UAAU,0CAA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