@uwdata/mosaic-core 0.17.0 → 0.18.0

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 (178) hide show
  1. package/LICENSE +47 -0
  2. package/README.md +0 -1
  3. package/dist/src/Coordinator.d.ts +147 -0
  4. package/dist/src/Coordinator.d.ts.map +1 -0
  5. package/dist/src/Coordinator.js +269 -0
  6. package/dist/src/Coordinator.js.map +1 -0
  7. package/dist/src/MosaicClient.d.ts +138 -0
  8. package/dist/src/MosaicClient.d.ts.map +1 -0
  9. package/dist/src/MosaicClient.js +213 -0
  10. package/dist/src/MosaicClient.js.map +1 -0
  11. package/dist/src/Param.d.ts +56 -0
  12. package/dist/src/Param.d.ts.map +1 -0
  13. package/dist/src/Param.js +89 -0
  14. package/dist/src/Param.js.map +1 -0
  15. package/dist/src/QueryConsolidator.d.ts +11 -0
  16. package/dist/src/QueryConsolidator.d.ts.map +1 -0
  17. package/dist/src/QueryConsolidator.js +249 -0
  18. package/dist/src/QueryConsolidator.js.map +1 -0
  19. package/dist/src/QueryManager.d.ts +77 -0
  20. package/dist/src/QueryManager.d.ts.map +1 -0
  21. package/dist/src/QueryManager.js +174 -0
  22. package/dist/src/QueryManager.js.map +1 -0
  23. package/dist/src/Selection.d.ts +222 -0
  24. package/dist/src/Selection.d.ts.map +1 -0
  25. package/dist/src/Selection.js +319 -0
  26. package/dist/src/Selection.js.map +1 -0
  27. package/dist/src/SelectionClause.d.ts +192 -0
  28. package/dist/src/SelectionClause.d.ts.map +1 -0
  29. package/dist/src/SelectionClause.js +126 -0
  30. package/dist/src/SelectionClause.js.map +1 -0
  31. package/dist/src/connectors/Connector.d.ts +26 -0
  32. package/dist/src/connectors/Connector.d.ts.map +1 -0
  33. package/dist/src/connectors/Connector.js +2 -0
  34. package/dist/src/connectors/Connector.js.map +1 -0
  35. package/dist/src/connectors/rest.d.ts +24 -0
  36. package/dist/src/connectors/rest.d.ts.map +1 -0
  37. package/dist/src/connectors/rest.js +37 -0
  38. package/dist/src/connectors/rest.js.map +1 -0
  39. package/dist/src/connectors/socket.d.ts +40 -0
  40. package/dist/src/connectors/socket.d.ts.map +1 -0
  41. package/dist/src/connectors/socket.js +115 -0
  42. package/dist/src/connectors/socket.js.map +1 -0
  43. package/dist/src/connectors/wasm.d.ts +53 -0
  44. package/dist/src/connectors/wasm.d.ts.map +1 -0
  45. package/dist/src/connectors/wasm.js +113 -0
  46. package/dist/src/connectors/wasm.js.map +1 -0
  47. package/dist/src/index.d.ts +28 -0
  48. package/dist/src/index.d.ts.map +1 -0
  49. package/dist/src/index.js +25 -0
  50. package/dist/src/index.js.map +1 -0
  51. package/dist/src/make-client.d.ts +35 -0
  52. package/dist/src/make-client.d.ts.map +1 -0
  53. package/dist/src/make-client.js +52 -0
  54. package/dist/src/make-client.js.map +1 -0
  55. package/dist/src/preagg/PreAggregator.d.ts +150 -0
  56. package/dist/src/preagg/PreAggregator.d.ts.map +1 -0
  57. package/dist/src/preagg/PreAggregator.js +382 -0
  58. package/dist/src/preagg/PreAggregator.js.map +1 -0
  59. package/dist/src/preagg/preagg-columns.d.ts +16 -0
  60. package/dist/src/preagg/preagg-columns.d.ts.map +1 -0
  61. package/dist/src/preagg/preagg-columns.js +95 -0
  62. package/dist/src/preagg/preagg-columns.js.map +1 -0
  63. package/dist/src/preagg/sufficient-statistics.d.ts +14 -0
  64. package/dist/src/preagg/sufficient-statistics.d.ts.map +1 -0
  65. package/dist/src/preagg/sufficient-statistics.js +446 -0
  66. package/dist/src/preagg/sufficient-statistics.js.map +1 -0
  67. package/dist/src/types.d.ts +77 -0
  68. package/dist/src/types.d.ts.map +1 -0
  69. package/dist/src/types.js +2 -0
  70. package/dist/src/types.js.map +1 -0
  71. package/dist/src/util/AsyncDispatch.d.ts +121 -0
  72. package/dist/src/util/AsyncDispatch.d.ts.map +1 -0
  73. package/dist/src/util/AsyncDispatch.js +188 -0
  74. package/dist/src/util/AsyncDispatch.js.map +1 -0
  75. package/dist/src/util/cache.d.ts +19 -0
  76. package/dist/src/util/cache.d.ts.map +1 -0
  77. package/dist/src/util/cache.js +66 -0
  78. package/dist/src/util/cache.js.map +1 -0
  79. package/dist/src/util/decode-ipc.d.ts +12 -0
  80. package/dist/src/util/decode-ipc.d.ts.map +1 -0
  81. package/{src → dist/src}/util/decode-ipc.js +5 -6
  82. package/dist/src/util/decode-ipc.js.map +1 -0
  83. package/dist/src/util/distinct.d.ts +3 -0
  84. package/dist/src/util/distinct.d.ts.map +1 -0
  85. package/dist/src/util/distinct.js +16 -0
  86. package/dist/src/util/distinct.js.map +1 -0
  87. package/dist/src/util/field-info.d.ts +26 -0
  88. package/dist/src/util/field-info.d.ts.map +1 -0
  89. package/dist/src/util/field-info.js +91 -0
  90. package/dist/src/util/field-info.js.map +1 -0
  91. package/dist/src/util/hash.d.ts +2 -0
  92. package/dist/src/util/hash.d.ts.map +1 -0
  93. package/dist/src/util/hash.js +26 -0
  94. package/dist/src/util/hash.js.map +1 -0
  95. package/dist/src/util/is-activatable.d.ts +8 -0
  96. package/dist/src/util/is-activatable.d.ts.map +1 -0
  97. package/dist/src/util/is-activatable.js +10 -0
  98. package/dist/src/util/is-activatable.js.map +1 -0
  99. package/dist/src/util/is-arrow-table.d.ts +9 -0
  100. package/dist/src/util/is-arrow-table.d.ts.map +1 -0
  101. package/dist/src/util/is-arrow-table.js +11 -0
  102. package/dist/src/util/is-arrow-table.js.map +1 -0
  103. package/dist/src/util/js-type.d.ts +9 -0
  104. package/dist/src/util/js-type.d.ts.map +1 -0
  105. package/dist/src/util/js-type.js +59 -0
  106. package/dist/src/util/js-type.js.map +1 -0
  107. package/dist/src/util/priority-queue.d.ts +35 -0
  108. package/dist/src/util/priority-queue.d.ts.map +1 -0
  109. package/dist/src/util/priority-queue.js +81 -0
  110. package/dist/src/util/priority-queue.js.map +1 -0
  111. package/dist/src/util/query-result.d.ts +47 -0
  112. package/dist/src/util/query-result.d.ts.map +1 -0
  113. package/dist/src/util/query-result.js +83 -0
  114. package/dist/src/util/query-result.js.map +1 -0
  115. package/dist/src/util/synchronizer.d.ts +36 -0
  116. package/dist/src/util/synchronizer.d.ts.map +1 -0
  117. package/dist/src/util/synchronizer.js +52 -0
  118. package/dist/src/util/synchronizer.js.map +1 -0
  119. package/dist/src/util/throttle.d.ts +12 -0
  120. package/dist/src/util/throttle.d.ts.map +1 -0
  121. package/dist/src/util/throttle.js +51 -0
  122. package/dist/src/util/throttle.js.map +1 -0
  123. package/dist/src/util/to-data-columns.d.ts +22 -0
  124. package/dist/src/util/to-data-columns.d.ts.map +1 -0
  125. package/dist/src/util/to-data-columns.js +51 -0
  126. package/dist/src/util/to-data-columns.js.map +1 -0
  127. package/dist/src/util/void-logger.d.ts +13 -0
  128. package/dist/src/util/void-logger.d.ts.map +1 -0
  129. package/dist/src/util/void-logger.js +13 -0
  130. package/dist/src/util/void-logger.js.map +1 -0
  131. package/package.json +16 -10
  132. package/src/Coordinator.ts +367 -0
  133. package/src/{MosaicClient.js → MosaicClient.ts} +49 -43
  134. package/src/{Param.js → Param.ts} +29 -28
  135. package/src/{QueryConsolidator.js → QueryConsolidator.ts} +81 -58
  136. package/src/{QueryManager.js → QueryManager.ts} +61 -54
  137. package/src/Selection.ts +388 -0
  138. package/src/SelectionClause.ts +275 -0
  139. package/src/connectors/Connector.ts +6 -6
  140. package/src/connectors/rest.ts +56 -0
  141. package/src/connectors/{socket.js → socket.ts} +53 -42
  142. package/src/connectors/{wasm.js → wasm.ts} +46 -62
  143. package/src/{index.js → index.ts} +13 -1
  144. package/src/make-client.ts +93 -0
  145. package/src/preagg/{PreAggregator.js → PreAggregator.ts} +164 -145
  146. package/src/preagg/{preagg-columns.js → preagg-columns.ts} +27 -24
  147. package/src/preagg/{sufficient-statistics.js → sufficient-statistics.ts} +160 -110
  148. package/src/types.ts +24 -9
  149. package/src/util/{AsyncDispatch.js → AsyncDispatch.ts} +62 -43
  150. package/src/util/{cache.js → cache.ts} +25 -15
  151. package/src/util/decode-ipc.ts +15 -0
  152. package/src/util/{distinct.js → distinct.ts} +3 -3
  153. package/src/util/{field-info.js → field-info.ts} +31 -32
  154. package/src/util/{hash.js → hash.ts} +4 -4
  155. package/src/util/is-activatable.ts +11 -0
  156. package/src/util/is-arrow-table.ts +12 -0
  157. package/src/util/{js-type.js → js-type.ts} +7 -5
  158. package/src/util/{priority-queue.js → priority-queue.ts} +32 -20
  159. package/src/util/{query-result.js → query-result.ts} +24 -17
  160. package/src/util/synchronizer.ts +56 -0
  161. package/src/util/throttle.ts +59 -0
  162. package/src/util/to-data-columns.ts +65 -0
  163. package/src/util/void-logger.ts +23 -0
  164. package/src/Coordinator.js +0 -313
  165. package/src/Selection.js +0 -380
  166. package/src/SelectionClause.js +0 -159
  167. package/src/connectors/rest.js +0 -38
  168. package/src/index-types.ts +0 -5
  169. package/src/make-client.js +0 -101
  170. package/src/util/is-activatable.js +0 -8
  171. package/src/util/is-arrow-table.js +0 -10
  172. package/src/util/selection-types.ts +0 -137
  173. package/src/util/synchronizer.js +0 -47
  174. package/src/util/throttle.js +0 -54
  175. package/src/util/to-data-columns.js +0 -60
  176. package/src/util/void-logger.js +0 -13
  177. package/tsconfig.json +0 -9
  178. package/vitest.config.ts +0 -3
@@ -0,0 +1,77 @@
1
+ import type { Connector } from './connectors/Connector.js';
2
+ import type { Cache, Logger, QueryEntry, QueryRequest } from './types.js';
3
+ import { QueryResult } from './util/query-result.js';
4
+ export declare const Priority: Readonly<{
5
+ High: 0;
6
+ Normal: 1;
7
+ Low: 2;
8
+ }>;
9
+ export declare class QueryManager {
10
+ private queue;
11
+ private db;
12
+ private clientCache;
13
+ private _logger;
14
+ private _logQueries;
15
+ private _consolidate;
16
+ /** Requests pending with the query manager. */
17
+ pendingResults: QueryResult[];
18
+ private maxConcurrentRequests;
19
+ private pendingExec;
20
+ constructor(maxConcurrentRequests?: number);
21
+ next(): void;
22
+ /**
23
+ * Add an entry to the query queue with a priority.
24
+ * @param entry The entry to add.
25
+ * @param priority The query priority, defaults to `Priority.Normal`.
26
+ */
27
+ enqueue(entry: QueryEntry, priority?: number): void;
28
+ /**
29
+ * Submit the query to the connector.
30
+ * @param request The request.
31
+ * @param result The query result.
32
+ */
33
+ submit(request: QueryRequest, result: QueryResult): Promise<void>;
34
+ /**
35
+ * Get or set the current query cache.
36
+ * @param value Cache value to set
37
+ * @returns Current cache
38
+ */
39
+ cache(): Cache | null;
40
+ cache(value: Cache | boolean): Cache;
41
+ /**
42
+ * Get or set the current logger.
43
+ * @param value Logger to set
44
+ * @returns Current logger
45
+ */
46
+ logger(): Logger;
47
+ logger(value: Logger): Logger;
48
+ /**
49
+ * Get or set if queries should be logged.
50
+ * @param value Whether to log queries
51
+ * @returns Current logging state
52
+ */
53
+ logQueries(): boolean;
54
+ logQueries(value: boolean): boolean;
55
+ /**
56
+ * Get or set the database connector.
57
+ * @param connector Connector to set
58
+ * @returns Current connector
59
+ */
60
+ connector(): Connector | null;
61
+ connector(connector: Connector): Connector;
62
+ /**
63
+ * Indicate if query consolidation should be performed.
64
+ * @param flag Whether to enable consolidation
65
+ */
66
+ consolidate(flag: boolean): void;
67
+ /**
68
+ * Request a query result.
69
+ * @param request The request.
70
+ * @param priority The query priority, defaults to `Priority.Normal`.
71
+ * @returns A query result promise.
72
+ */
73
+ request(request: QueryRequest, priority?: number): QueryResult;
74
+ cancel(requests: QueryResult[]): void;
75
+ clear(): void;
76
+ }
77
+ //# sourceMappingURL=QueryManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryManager.d.ts","sourceRoot":"","sources":["../../src/QueryManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI1E,OAAO,EAAE,WAAW,EAAc,MAAM,wBAAwB,CAAC;AAGjE,eAAO,MAAM,QAAQ;;;;EAA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 @@
1
+ import { consolidator } from './QueryConsolidator.js';
2
+ import { lruCache, voidCache } from './util/cache.js';
3
+ import { PriorityQueue } from './util/priority-queue.js';
4
+ import { QueryResult, QueryState } from './util/query-result.js';
5
+ import { voidLogger } from './util/void-logger.js';
6
+ export const Priority = Object.freeze({ High: 0, Normal: 1, Low: 2 });
7
+ export class QueryManager {
8
+ queue;
9
+ db;
10
+ clientCache;
11
+ _logger;
12
+ _logQueries;
13
+ _consolidate;
14
+ /** Requests pending with the query manager. */
15
+ pendingResults;
16
+ maxConcurrentRequests;
17
+ pendingExec;
18
+ constructor(maxConcurrentRequests = 32) {
19
+ this.queue = new PriorityQueue(3);
20
+ this.db = null;
21
+ this.clientCache = null;
22
+ this._logger = voidLogger();
23
+ this._logQueries = false;
24
+ this._consolidate = null;
25
+ this.pendingResults = [];
26
+ this.maxConcurrentRequests = maxConcurrentRequests;
27
+ this.pendingExec = false;
28
+ }
29
+ next() {
30
+ if (this.queue.isEmpty() || this.pendingResults.length > this.maxConcurrentRequests || this.pendingExec) {
31
+ return;
32
+ }
33
+ const entry = this.queue.next();
34
+ if (!entry)
35
+ return;
36
+ const { request, result } = entry;
37
+ this.pendingResults.push(result);
38
+ if (request.type === 'exec')
39
+ this.pendingExec = true;
40
+ this.submit(request, result).finally(() => {
41
+ // return from the queue all requests that are ready
42
+ while (this.pendingResults.length && this.pendingResults[0].state !== QueryState.pending) {
43
+ const result = this.pendingResults.shift();
44
+ if (result.state === QueryState.ready) {
45
+ result.fulfill();
46
+ }
47
+ else if (result.state === QueryState.done) {
48
+ this._logger.warn('Found resolved query in pending results.');
49
+ }
50
+ }
51
+ if (request.type === 'exec')
52
+ this.pendingExec = false;
53
+ this.next();
54
+ });
55
+ }
56
+ /**
57
+ * Add an entry to the query queue with a priority.
58
+ * @param entry The entry to add.
59
+ * @param priority The query priority, defaults to `Priority.Normal`.
60
+ */
61
+ enqueue(entry, priority = Priority.Normal) {
62
+ this.queue.insert(entry, priority);
63
+ this.next();
64
+ }
65
+ /**
66
+ * Submit the query to the connector.
67
+ * @param request The request.
68
+ * @param result The query result.
69
+ */
70
+ async submit(request, result) {
71
+ try {
72
+ const { query, type, cache = false, options } = request;
73
+ const sql = query ? `${query}` : null;
74
+ // check query cache
75
+ if (cache) {
76
+ const cached = this.clientCache.get(sql);
77
+ if (cached) {
78
+ const data = await cached;
79
+ this._logger.debug('Cache');
80
+ result.ready(data);
81
+ return;
82
+ }
83
+ }
84
+ // issue query, potentially cache result
85
+ const t0 = performance.now();
86
+ if (this._logQueries) {
87
+ this._logger.debug('Query', { type, sql, ...options });
88
+ }
89
+ // @ts-expect-error type may be exec | json | arrow
90
+ const promise = this.db.query({ type, sql: sql, ...options });
91
+ if (cache)
92
+ this.clientCache.set(sql, promise);
93
+ const data = await promise;
94
+ if (cache)
95
+ this.clientCache.set(sql, data);
96
+ this._logger.debug(`Request: ${(performance.now() - t0).toFixed(1)}`);
97
+ result.ready(type === 'exec' ? null : data);
98
+ }
99
+ catch (err) {
100
+ result.reject(err);
101
+ }
102
+ }
103
+ cache(value) {
104
+ return value !== undefined
105
+ ? (this.clientCache = value === true ? lruCache() : (value || voidCache()))
106
+ : this.clientCache;
107
+ }
108
+ logger(value) {
109
+ return value ? (this._logger = value) : this._logger;
110
+ }
111
+ logQueries(value) {
112
+ return value !== undefined ? this._logQueries = !!value : this._logQueries;
113
+ }
114
+ connector(connector) {
115
+ return connector ? (this.db = connector) : this.db;
116
+ }
117
+ /**
118
+ * Indicate if query consolidation should be performed.
119
+ * @param flag Whether to enable consolidation
120
+ */
121
+ consolidate(flag) {
122
+ if (flag && !this._consolidate) {
123
+ this._consolidate = consolidator(this.enqueue.bind(this), this.clientCache);
124
+ }
125
+ else if (!flag && this._consolidate) {
126
+ this._consolidate = null;
127
+ }
128
+ }
129
+ /**
130
+ * Request a query result.
131
+ * @param request The request.
132
+ * @param priority The query priority, defaults to `Priority.Normal`.
133
+ * @returns A query result promise.
134
+ */
135
+ request(request, priority = Priority.Normal) {
136
+ const result = new QueryResult();
137
+ const entry = { request, result };
138
+ if (this._consolidate) {
139
+ this._consolidate.add(entry, priority);
140
+ }
141
+ else {
142
+ this.enqueue(entry, priority);
143
+ }
144
+ return result;
145
+ }
146
+ cancel(requests) {
147
+ const set = new Set(requests);
148
+ if (set.size) {
149
+ this.queue.remove(({ result }) => {
150
+ if (set.has(result)) {
151
+ result.reject('Canceled');
152
+ return true;
153
+ }
154
+ return false;
155
+ });
156
+ for (const result of this.pendingResults) {
157
+ if (set.has(result)) {
158
+ result.reject('Canceled');
159
+ }
160
+ }
161
+ }
162
+ }
163
+ clear() {
164
+ this.queue.remove(({ result }) => {
165
+ result.reject('Cleared');
166
+ return true;
167
+ });
168
+ for (const result of this.pendingResults) {
169
+ result.reject('Cleared');
170
+ }
171
+ this.pendingResults = [];
172
+ }
173
+ }
174
+ //# sourceMappingURL=QueryManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryManager.js","sourceRoot":"","sources":["../../src/QueryManager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AAEtE,MAAM,OAAO,YAAY;IACf,KAAK,CAA4B;IACjC,EAAE,CAAmB;IACrB,WAAW,CAAe;IAC1B,OAAO,CAAS;IAChB,WAAW,CAAU;IACrB,YAAY,CAAyC;IAC7D,+CAA+C;IACxC,cAAc,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AC;aAAM,CAAC;YACN,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,QAAuB;QAC5B,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC9B,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;YACb,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;gBAC/B,IAAI,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;oBACpB,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;oBAC1B,OAAO,IAAI,CAAC;gBACd,CAAC;gBACD,OAAO,KAAK,CAAC;YACf,CAAC,CAAC,CAAC;YAEH,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;gBACzC,IAAI,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;oBACpB,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;gBAC5B,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,KAAK;QACH,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;YAC/B,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YACzB,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;QAEH,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACzC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC3B,CAAC;QACD,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;IAC3B,CAAC;CACF"}
@@ -0,0 +1,222 @@
1
+ import { type MosaicClient } from './MosaicClient.js';
2
+ import { type ExprNode, MaybeArray } from '@uwdata/mosaic-sql';
3
+ import { Param } from './Param.js';
4
+ import { ClauseSource, SelectionClause } from './SelectionClause.js';
5
+ export interface SelectionOptions {
6
+ /** Boolean flag indicating cross-filtered resolution. If true, selection clauses will not be applied to the clients they are associated with. */
7
+ cross?: boolean;
8
+ /** Boolean flag indicating if a lack of clauses should correspond to an empty selection with no records. This setting determines the default selection state. */
9
+ empty?: boolean;
10
+ /** Upstream selections whose clauses should be included as part of the new selection. Any clauses published to upstream selections will be relayed to the new selection. */
11
+ include?: Selection | Selection[];
12
+ }
13
+ export interface SelectionResolverOptions extends Pick<SelectionOptions, "empty" | "cross"> {
14
+ /** Boolean flag to indicate a union strategy. If false, an intersection strategy is used. */
15
+ union?: boolean;
16
+ /** Boolean flag to indicate single clauses only. */
17
+ single?: boolean;
18
+ }
19
+ /**
20
+ * Test if a value is a Selection instance.
21
+ * @param x The value to test.
22
+ * @returns True if the input is a Selection, false otherwise.
23
+ */
24
+ export declare function isSelection(x: unknown): x is Selection;
25
+ type SelectionClauseArray = SelectionClause[] & {
26
+ active?: SelectionClause;
27
+ };
28
+ type ResolvedPredicate = MaybeArray<string | boolean | ExprNode> | undefined;
29
+ /**
30
+ * Represents a dynamic set of query filter predicates.
31
+ */
32
+ export declare class Selection extends Param<SelectionClauseArray> {
33
+ _resolved: SelectionClauseArray;
34
+ _resolver: SelectionResolver;
35
+ _relay: Set<Selection>;
36
+ /**
37
+ * Create a new Selection instance with an
38
+ * intersect (conjunction) resolution strategy.
39
+ * @param options The selection options.
40
+ * @returns The new Selection instance.
41
+ */
42
+ static intersect({ cross, empty, include }?: SelectionOptions): Selection;
43
+ /**
44
+ * Create a new Selection instance with a
45
+ * union (disjunction) resolution strategy.
46
+ * @param options The selection options.
47
+ * @returns The new Selection instance.
48
+ */
49
+ static union({ cross, empty, include }?: SelectionOptions): Selection;
50
+ /**
51
+ * Create a new Selection instance with a singular resolution strategy
52
+ * that keeps only the most recent selection clause.
53
+ * @param options The selection options.
54
+ * @returns The new Selection instance.
55
+ */
56
+ static single({ cross, empty, include }?: SelectionOptions): Selection;
57
+ /**
58
+ * Create a new Selection instance with a
59
+ * cross-filtered intersect resolution strategy.
60
+ * @param options The selection options.
61
+ * @returns The new Selection instance.
62
+ */
63
+ static crossfilter({ empty, include }?: Omit<SelectionOptions, 'cross'>): Selection;
64
+ /**
65
+ * Create a new Selection instance.
66
+ * @param resolver The selection resolution
67
+ * strategy to apply.
68
+ * @param include Upstream selections whose clauses
69
+ * should be included as part of this selection. Any clauses published
70
+ * to these upstream selections will be relayed to this selection.
71
+ */
72
+ constructor(resolver?: SelectionResolver, include?: Selection[]);
73
+ /**
74
+ * Create a cloned copy of this Selection instance.
75
+ * @returns A clone of this selection.
76
+ */
77
+ clone(): Selection;
78
+ /**
79
+ * Create a clone of this Selection with clauses corresponding
80
+ * to the provided source removed.
81
+ * @param source The clause source to remove.
82
+ * @returns A cloned and updated Selection.
83
+ */
84
+ remove(source: ClauseSource): Selection;
85
+ /**
86
+ * The selection clause resolver.
87
+ */
88
+ get resolver(): SelectionResolver;
89
+ /**
90
+ * Indicate if this selection has a single resolution strategy.
91
+ */
92
+ get single(): boolean;
93
+ /**
94
+ * The current array of selection clauses.
95
+ */
96
+ get clauses(): SelectionClauseArray;
97
+ /**
98
+ * The current active (most recently updated) selection clause.
99
+ */
100
+ get active(): SelectionClause;
101
+ /**
102
+ * The value corresponding to the current active selection clause.
103
+ * This method ensures compatibility where a normal Param is expected.
104
+ */
105
+ get value(): unknown;
106
+ /**
107
+ * The value corresponding to a given source. Returns undefined if
108
+ * this selection does not include a clause from this source.
109
+ * @param source The clause source to look up the value for.
110
+ */
111
+ valueFor(source: unknown): unknown;
112
+ /**
113
+ * Emit an activate event with the given selection clause.
114
+ * @param clause The clause representing the potential activation.
115
+ */
116
+ activate(clause: SelectionClause): void;
117
+ /**
118
+ * Update the selection with a new selection clause.
119
+ * @param clause The selection clause to add.
120
+ * @returns This Selection instance.
121
+ */
122
+ update(clause: SelectionClause): this;
123
+ /**
124
+ * Reset the selection state by removing all provided clauses. If no clause
125
+ * array is provided as an argument, all current clauses are removed. The
126
+ * reset method (if defined) is invoked on all corresponding clause sources.
127
+ * The reset is relayed to downstream selections that include this selection.
128
+ * @param clauses The clauses to remove. If unspecified, all current clauses are removed.
129
+ * @returns This selection instance.
130
+ */
131
+ reset(clauses?: SelectionClause[]): this;
132
+ /**
133
+ * Upon value-typed updates, sets the current clause list to the
134
+ * input value and returns the active clause value.
135
+ * @param type The event type.
136
+ * @param value The input event value.
137
+ * @returns For value-typed events, returns the active clause
138
+ * values. Otherwise returns the input event value as-is.
139
+ */
140
+ willEmit(type: string, value: unknown): unknown;
141
+ /**
142
+ * Upon value-typed updates, returns a dispatch queue filter function.
143
+ * The return value depends on the selection resolution strategy.
144
+ * @param type The event type.
145
+ * @param value The new event value that will be enqueued.
146
+ * @returns A dispatch queue filter function. For non-value events,
147
+ * returns a function that always returns null (no filtering).
148
+ */
149
+ emitQueueFilter(type: string, value: SelectionClauseArray): ((value: SelectionClauseArray) => boolean) | null;
150
+ /**
151
+ * Indicates if a selection clause should not be applied to a given client.
152
+ * The return value depends on the selection resolution strategy.
153
+ * @param client The client to test.
154
+ * @param clause The selection clause.
155
+ * @returns True if the client should be skipped, false otherwise.
156
+ */
157
+ skip(client: MosaicClient, clause: SelectionClause): boolean;
158
+ /**
159
+ * Return a selection query predicate for the given client.
160
+ * @param client The client whose data may be filtered.
161
+ * @param noSkip Disable skipping of active
162
+ * cross-filtered sources. If set true, the source of the active
163
+ * clause in a cross-filtered selection will not be skipped.
164
+ * @returns The query predicate for filtering client data,
165
+ * based on the current state of this selection.
166
+ */
167
+ predicate(client: MosaicClient, noSkip?: boolean): ResolvedPredicate;
168
+ }
169
+ /**
170
+ * Implements selection clause resolution strategies.
171
+ */
172
+ export declare class SelectionResolver {
173
+ union: boolean;
174
+ cross: boolean;
175
+ single: boolean;
176
+ empty: boolean;
177
+ /**
178
+ * Create a new selection resolved instance.
179
+ * @param options The resolution strategy options.
180
+ * @param options.union Boolean flag to indicate a union strategy.
181
+ * If false, an intersection strategy is used.
182
+ * @param options.cross Boolean flag to indicate cross-filtering.
183
+ * @param options.single Boolean flag to indicate single clauses only.
184
+ * @param options.empty Boolean flag indicating if a lack
185
+ * of clauses should correspond to an empty selection with no records. This
186
+ * setting determines the default selection state.
187
+ */
188
+ constructor({ union, cross, single, empty }?: SelectionResolverOptions);
189
+ /**
190
+ * Resolve a list of selection clauses according to the resolution strategy.
191
+ * @param clauseList An array of selection clauses.
192
+ * @param clause A new selection clause to add.
193
+ * @returns An updated array of selection clauses.
194
+ */
195
+ resolve(clauseList: SelectionClause[], clause: SelectionClause, reset?: boolean): SelectionClause[];
196
+ /**
197
+ * Indicates if a selection clause should not be applied to a given client.
198
+ * The return value depends on the resolution strategy.
199
+ * @param client The selection clause.
200
+ * @param clause The client to test.
201
+ * @returns True if the client should be skipped, false otherwise.
202
+ */
203
+ skip(client: MosaicClient, clause: SelectionClause): boolean;
204
+ /**
205
+ * Return a selection query predicate for the given client.
206
+ * @param clauseList An array of selection clauses.
207
+ * @param active The current active selection clause.
208
+ * @param client The client whose data may be filtered.
209
+ * @returns The query predicate for filtering client data,
210
+ * based on the current state of this selection.
211
+ */
212
+ predicate(clauseList: SelectionClause[], active: SelectionClause, client: MosaicClient): ResolvedPredicate;
213
+ /**
214
+ * Returns a filter function for queued selection updates.
215
+ * @param value The new event value that will be enqueued.
216
+ * @returns A dispatch queue filter
217
+ * function, or null if all unemitted event values should be filtered.
218
+ */
219
+ queueFilter(value: SelectionClauseArray): ((value: SelectionClauseArray) => boolean) | null;
220
+ }
221
+ export {};
222
+ //# sourceMappingURL=Selection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Selection.d.ts","sourceRoot":"","sources":["../../src/Selection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,KAAK,QAAQ,EAAuB,UAAU,EAAM,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAE,K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