@milaboratories/pl-model-common 1.48.0 → 1.50.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.
- package/dist/author_marker.d.ts +1 -2
- package/dist/author_marker.d.ts.map +1 -1
- package/dist/base64.d.ts +4 -6
- package/dist/base64.d.ts.map +1 -1
- package/dist/block_state.d.ts +13 -9
- package/dist/block_state.d.ts.map +1 -1
- package/dist/bmodel/block_config.d.ts +51 -29
- package/dist/bmodel/block_config.d.ts.map +1 -1
- package/dist/bmodel/block_kind_ref.d.ts +4 -6
- package/dist/bmodel/block_kind_ref.d.ts.map +1 -1
- package/dist/bmodel/code.d.ts +4 -5
- package/dist/bmodel/code.d.ts.map +1 -1
- package/dist/bmodel/container.d.ts +5 -5
- package/dist/bmodel/container.d.ts.map +1 -1
- package/dist/bmodel/normalization.d.ts +1 -3
- package/dist/bmodel/normalization.d.ts.map +1 -1
- package/dist/bmodel/types.d.ts +1 -2
- package/dist/bmodel/types.d.ts.map +1 -1
- package/dist/branding.d.ts +2 -3
- package/dist/branding.d.ts.map +1 -1
- package/dist/columns/accessor_traversal.d.ts +6 -8
- package/dist/columns/accessor_traversal.d.ts.map +1 -1
- package/dist/columns/column_registry.d.ts +2 -3
- package/dist/columns/column_registry.d.ts.map +1 -1
- package/dist/columns/column_selector.d.ts +9 -9
- package/dist/columns/column_selector.d.ts.map +1 -1
- package/dist/columns/dedup.d.ts +1 -3
- package/dist/columns/dedup.d.ts.map +1 -1
- package/dist/columns/providers.d.ts +3 -4
- package/dist/columns/providers.d.ts.map +1 -1
- package/dist/columns/types.d.ts +12 -9
- package/dist/columns/types.d.ts.map +1 -1
- package/dist/common_types.d.ts +4 -6
- package/dist/common_types.d.ts.map +1 -1
- package/dist/dialog/index.d.ts +4 -5
- package/dist/dialog/index.d.ts.map +1 -1
- package/dist/driver_kit.d.ts +2 -2
- package/dist/driver_kit.d.ts.map +1 -1
- package/dist/drivers/ChunkedStreamReader.d.ts +3 -5
- package/dist/drivers/ChunkedStreamReader.d.ts.map +1 -1
- package/dist/drivers/blob.d.ts +36 -25
- package/dist/drivers/blob.d.ts.map +1 -1
- package/dist/drivers/columns/columns_collection_driver.d.ts +6 -7
- package/dist/drivers/columns/columns_collection_driver.d.ts.map +1 -1
- package/dist/drivers/columns/discover_columns_options.d.ts +9 -8
- package/dist/drivers/columns/discover_columns_options.d.ts.map +1 -1
- package/dist/drivers/index.cjs +1 -0
- package/dist/drivers/index.d.ts +4 -2
- package/dist/drivers/index.js +2 -2
- package/dist/drivers/interfaces.d.ts +2 -3
- package/dist/drivers/interfaces.d.ts.map +1 -1
- package/dist/drivers/log.d.ts +26 -28
- package/dist/drivers/log.d.ts.map +1 -1
- package/dist/drivers/ls.d.ts +37 -27
- package/dist/drivers/ls.d.ts.map +1 -1
- package/dist/drivers/pframe/column_filter.d.ts +1 -3
- package/dist/drivers/pframe/column_filter.d.ts.map +1 -1
- package/dist/drivers/pframe/data_info.d.ts +77 -50
- package/dist/drivers/pframe/data_info.d.ts.map +1 -1
- package/dist/drivers/pframe/data_types.d.ts +50 -45
- package/dist/drivers/pframe/data_types.d.ts.map +1 -1
- package/dist/drivers/pframe/driver.d.ts +5 -5
- package/dist/drivers/pframe/driver.d.ts.map +1 -1
- package/dist/drivers/pframe/filter_spec.d.ts +10 -12
- package/dist/drivers/pframe/filter_spec.d.ts.map +1 -1
- package/dist/drivers/pframe/find_columns.d.ts +2 -4
- package/dist/drivers/pframe/find_columns.d.ts.map +1 -1
- package/dist/drivers/pframe/index.cjs +1 -0
- package/dist/drivers/pframe/index.d.ts +4 -2
- package/dist/drivers/pframe/index.js +2 -2
- package/dist/drivers/pframe/linker_columns.d.ts +4 -10
- package/dist/drivers/pframe/linker_columns.d.ts.map +1 -1
- package/dist/drivers/pframe/pframe.d.ts +3 -3
- package/dist/drivers/pframe/pframe.d.ts.map +1 -1
- package/dist/drivers/pframe/query/query_common.d.ts +52 -46
- package/dist/drivers/pframe/query/query_common.d.ts.map +1 -1
- package/dist/drivers/pframe/query/query_data.d.ts +26 -21
- package/dist/drivers/pframe/query/query_data.d.ts.map +1 -1
- package/dist/drivers/pframe/query/query_spec.d.ts +22 -19
- package/dist/drivers/pframe/query/query_spec.d.ts.map +1 -1
- package/dist/drivers/pframe/query/utils.d.ts +15 -11
- package/dist/drivers/pframe/query/utils.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/anchored.d.ts +3 -5
- package/dist/drivers/pframe/spec/anchored.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/discovered_column.d.ts +10 -11
- package/dist/drivers/pframe/spec/discovered_column.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/filtered_column.d.ts +17 -18
- package/dist/drivers/pframe/spec/filtered_column.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/ids.d.ts +16 -16
- package/dist/drivers/pframe/spec/ids.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/index.cjs +1 -0
- package/dist/drivers/pframe/spec/index.d.ts +2 -2
- package/dist/drivers/pframe/spec/index.js +2 -2
- package/dist/drivers/pframe/spec/native_id.d.ts +3 -3
- package/dist/drivers/pframe/spec/native_id.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/overridden.d.ts +14 -16
- package/dist/drivers/pframe/spec/overridden.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/selectors.d.ts +22 -22
- package/dist/drivers/pframe/spec/selectors.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/spec.cjs +39 -2
- package/dist/drivers/pframe/spec/spec.cjs.map +1 -1
- package/dist/drivers/pframe/spec/spec.d.ts +103 -71
- package/dist/drivers/pframe/spec/spec.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/spec.js +39 -3
- package/dist/drivers/pframe/spec/spec.js.map +1 -1
- package/dist/drivers/pframe/spec_driver.d.ts +30 -25
- package/dist/drivers/pframe/spec_driver.d.ts.map +1 -1
- package/dist/drivers/pframe/table.d.ts +1 -3
- package/dist/drivers/pframe/table.d.ts.map +1 -1
- package/dist/drivers/pframe/table_calculate.d.ts +55 -46
- package/dist/drivers/pframe/table_calculate.d.ts.map +1 -1
- package/dist/drivers/pframe/table_common.d.ts +9 -10
- package/dist/drivers/pframe/table_common.d.ts.map +1 -1
- package/dist/drivers/pframe/unique_values.d.ts +3 -3
- package/dist/drivers/pframe/unique_values.d.ts.map +1 -1
- package/dist/drivers/upload.d.ts +2 -3
- package/dist/drivers/upload.d.ts.map +1 -1
- package/dist/drivers/urls.d.ts +7 -8
- package/dist/drivers/urls.d.ts.map +1 -1
- package/dist/errors.d.ts +35 -36
- package/dist/errors.d.ts.map +1 -1
- package/dist/flags/block_flags.cjs.map +1 -1
- package/dist/flags/block_flags.d.ts +7 -7
- package/dist/flags/block_flags.d.ts.map +1 -1
- package/dist/flags/block_flags.js.map +1 -1
- package/dist/flags/flag_utils.d.ts +6 -8
- package/dist/flags/flag_utils.d.ts.map +1 -1
- package/dist/flags/type_utils.d.ts +6 -7
- package/dist/flags/type_utils.d.ts.map +1 -1
- package/dist/httpAuth.d.ts +4 -5
- package/dist/httpAuth.d.ts.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +9 -2
- package/dist/index.js +2 -2
- package/dist/json.d.ts +11 -12
- package/dist/json.d.ts.map +1 -1
- package/dist/navigation.d.ts +16 -11
- package/dist/navigation.d.ts.map +1 -1
- package/dist/plid.d.ts +7 -9
- package/dist/plid.d.ts.map +1 -1
- package/dist/pool/entry.d.ts +8 -6
- package/dist/pool/entry.d.ts.map +1 -1
- package/dist/pool/query.d.ts +3 -4
- package/dist/pool/query.d.ts.map +1 -1
- package/dist/pool/spec.d.ts +33 -30
- package/dist/pool/spec.d.ts.map +1 -1
- package/dist/pool_entry.d.ts +2 -3
- package/dist/pool_entry.d.ts.map +1 -1
- package/dist/project_id.d.ts +1 -3
- package/dist/project_id.d.ts.map +1 -1
- package/dist/ref.d.ts +22 -23
- package/dist/ref.d.ts.map +1 -1
- package/dist/resource_types.d.ts +2 -3
- package/dist/resource_types.d.ts.map +1 -1
- package/dist/services/node_service_handlers.d.ts +1 -3
- package/dist/services/node_service_handlers.d.ts.map +1 -1
- package/dist/services/service_capabilities.d.ts +7 -9
- package/dist/services/service_capabilities.d.ts.map +1 -1
- package/dist/services/service_declarations.d.ts +2 -2
- package/dist/services/service_declarations.d.ts.map +1 -1
- package/dist/services/service_injectors.d.ts +7 -8
- package/dist/services/service_injectors.d.ts.map +1 -1
- package/dist/services/service_registry.d.ts +2 -4
- package/dist/services/service_registry.d.ts.map +1 -1
- package/dist/services/service_types.d.ts +24 -26
- package/dist/services/service_types.d.ts.map +1 -1
- package/dist/template/kind_selector.d.ts +9 -11
- package/dist/template/kind_selector.d.ts.map +1 -1
- package/dist/template/project_template_v1.d.ts +22 -20
- package/dist/template/project_template_v1.d.ts.map +1 -1
- package/dist/template/template_ref_form.d.ts +6 -5
- package/dist/template/template_ref_form.d.ts.map +1 -1
- package/dist/template/template_relocate.cjs +24 -3
- package/dist/template/template_relocate.cjs.map +1 -1
- package/dist/template/template_relocate.d.ts +8 -4
- package/dist/template/template_relocate.d.ts.map +1 -1
- package/dist/template/template_relocate.js +24 -3
- package/dist/template/template_relocate.js.map +1 -1
- package/dist/utag.d.ts +2 -4
- package/dist/utag.d.ts.map +1 -1
- package/dist/util.d.ts +2 -3
- package/dist/util.d.ts.map +1 -1
- package/dist/value_or_error.d.ts +2 -3
- package/dist/value_or_error.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/drivers/pframe/spec/spec.ts +50 -2
- package/src/flags/block_flags.ts +1 -1
- package/src/template/template_relocate.test.ts +57 -0
- package/src/template/template_relocate.ts +32 -4
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { AxisValueType, ColumnValueType } from "../spec/spec.js";
|
|
2
|
+
import "../spec/index.js";
|
|
2
3
|
import { JsonDataInfo } from "../data_info.js";
|
|
3
4
|
import { PObjectId } from "../../../pool/spec.js";
|
|
5
|
+
import "../../../pool/index.js";
|
|
4
6
|
//#region src/drivers/pframe/query/query_common.d.ts
|
|
5
7
|
/**
|
|
6
8
|
* Structural type information for a single column: the axis value types (in
|
|
7
9
|
* order) and the single column value type. Mirrors the self-contained
|
|
8
10
|
* `typeSpec` shape carried by the data layer (`{ axes, column }`).
|
|
9
11
|
*/
|
|
10
|
-
type ColumnTypeSpec = {
|
|
11
|
-
/** List of axis value types defining the dimensions of the data */
|
|
12
|
+
export type ColumnTypeSpec = {
|
|
13
|
+
/** List of axis value types defining the dimensions of the data */
|
|
14
|
+
axes: AxisValueType[];
|
|
15
|
+
/** The single column value type */
|
|
12
16
|
column: ColumnValueType;
|
|
13
17
|
};
|
|
14
18
|
/**
|
|
@@ -29,7 +33,7 @@ type ColumnTypeSpec = {
|
|
|
29
33
|
* - `exp` - Exponential function (e^x)
|
|
30
34
|
* - `negate` - Negation (-x)
|
|
31
35
|
*/
|
|
32
|
-
type NumericUnaryOperand = "abs" | "ceil" | "floor" | "round" | "sqrt" | "log" | "log2" | "log10" | "exp" | "negate";
|
|
36
|
+
export type NumericUnaryOperand = "abs" | "ceil" | "floor" | "round" | "sqrt" | "log" | "log2" | "log10" | "exp" | "negate";
|
|
33
37
|
/**
|
|
34
38
|
* Binary mathematical operation kinds.
|
|
35
39
|
*
|
|
@@ -44,7 +48,7 @@ type NumericUnaryOperand = "abs" | "ceil" | "floor" | "round" | "sqrt" | "log" |
|
|
|
44
48
|
* - `mod` - Modulo: left % right
|
|
45
49
|
* - `power` - Exponentiation: left ** right
|
|
46
50
|
*/
|
|
47
|
-
type NumericBinaryOperand = "add" | "sub" | "mul" | "div" | "mod" | "power";
|
|
51
|
+
export type NumericBinaryOperand = "add" | "sub" | "mul" | "div" | "mod" | "power";
|
|
48
52
|
/**
|
|
49
53
|
* Numeric comparison operation kinds.
|
|
50
54
|
*
|
|
@@ -59,7 +63,7 @@ type NumericBinaryOperand = "add" | "sub" | "mul" | "div" | "mod" | "power";
|
|
|
59
63
|
* - `gt` - Greater than: left > right
|
|
60
64
|
* - `ge` - Greater or equal: left >= right
|
|
61
65
|
*/
|
|
62
|
-
type NumericComparisonOperand = "eq" | "ne" | "lt" | "le" | "gt" | "ge";
|
|
66
|
+
export type NumericComparisonOperand = "eq" | "ne" | "lt" | "le" | "gt" | "ge";
|
|
63
67
|
/**
|
|
64
68
|
* Constant value expression.
|
|
65
69
|
*
|
|
@@ -76,7 +80,7 @@ type NumericComparisonOperand = "eq" | "ne" | "lt" | "le" | "gt" | "ge";
|
|
|
76
80
|
* // Constant boolean
|
|
77
81
|
* { type: 'constant', value: true }
|
|
78
82
|
*/
|
|
79
|
-
type ExprConstant = {
|
|
83
|
+
export type ExprConstant = {
|
|
80
84
|
type: "constant";
|
|
81
85
|
value: string | number | boolean;
|
|
82
86
|
};
|
|
@@ -96,7 +100,7 @@ type ExprConstant = {
|
|
|
96
100
|
* // Combine with NOT to check for non-null
|
|
97
101
|
* { type: 'not', input: { type: 'isNull', input: columnRef } }
|
|
98
102
|
*/
|
|
99
|
-
interface ExprIsNull<I> {
|
|
103
|
+
export interface ExprIsNull<I> {
|
|
100
104
|
type: "isNull";
|
|
101
105
|
/** Input expression to check for null */
|
|
102
106
|
input: I;
|
|
@@ -122,7 +126,7 @@ interface ExprIsNull<I> {
|
|
|
122
126
|
* // Replace null strings with 'unknown'
|
|
123
127
|
* { type: 'fillNull', input: nameColumn, replacement: { type: 'constant', value: 'unknown' } }
|
|
124
128
|
*/
|
|
125
|
-
interface ExprFillNull<I> {
|
|
129
|
+
export interface ExprFillNull<I> {
|
|
126
130
|
type: "fillNull";
|
|
127
131
|
/** Value to check for null */
|
|
128
132
|
input: I;
|
|
@@ -148,7 +152,7 @@ interface ExprFillNull<I> {
|
|
|
148
152
|
*
|
|
149
153
|
* @see NumericUnaryOperand for available operations
|
|
150
154
|
*/
|
|
151
|
-
interface ExprNumericUnary<I> {
|
|
155
|
+
export interface ExprNumericUnary<I> {
|
|
152
156
|
type: "numericUnary";
|
|
153
157
|
/** The mathematical operation to apply */
|
|
154
158
|
operand: NumericUnaryOperand;
|
|
@@ -174,7 +178,7 @@ interface ExprNumericUnary<I> {
|
|
|
174
178
|
*
|
|
175
179
|
* @see NumericBinaryOperand for available operations
|
|
176
180
|
*/
|
|
177
|
-
interface ExprNumericBinary<I> {
|
|
181
|
+
export interface ExprNumericBinary<I> {
|
|
178
182
|
type: "numericBinary";
|
|
179
183
|
/** The arithmetic operation to apply */
|
|
180
184
|
operand: NumericBinaryOperand;
|
|
@@ -208,7 +212,7 @@ interface ExprNumericBinary<I> {
|
|
|
208
212
|
*
|
|
209
213
|
* @see NumericComparisonOperand for available operations
|
|
210
214
|
*/
|
|
211
|
-
interface ExprNumericComparison<I> {
|
|
215
|
+
export interface ExprNumericComparison<I> {
|
|
212
216
|
type: "numericComparison";
|
|
213
217
|
/** The comparison operation to apply */
|
|
214
218
|
operand: NumericComparisonOperand;
|
|
@@ -237,7 +241,7 @@ interface ExprNumericComparison<I> {
|
|
|
237
241
|
* // Matches: "john", "JOHN", "John", "jOhN"
|
|
238
242
|
* { type: 'stringEquals', input: nameColumn, value: 'John', caseInsensitive: true }
|
|
239
243
|
*/
|
|
240
|
-
interface ExprStringEquals<I> {
|
|
244
|
+
export interface ExprStringEquals<I> {
|
|
241
245
|
type: "stringEquals";
|
|
242
246
|
/** Input expression (must evaluate to string) */
|
|
243
247
|
input: I;
|
|
@@ -265,7 +269,7 @@ interface ExprStringEquals<I> {
|
|
|
265
269
|
*
|
|
266
270
|
* @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions | MDN Regular Expressions Guide}
|
|
267
271
|
*/
|
|
268
|
-
interface ExprStringRegex<I> {
|
|
272
|
+
export interface ExprStringRegex<I> {
|
|
269
273
|
type: "stringRegex";
|
|
270
274
|
/** Input expression (must evaluate to string) */
|
|
271
275
|
input: I;
|
|
@@ -289,7 +293,7 @@ interface ExprStringRegex<I> {
|
|
|
289
293
|
* // Case-insensitive contains
|
|
290
294
|
* { type: 'stringContains', input: descColumn, value: 'ERROR', caseInsensitive: true }
|
|
291
295
|
*/
|
|
292
|
-
interface ExprStringContains<I> {
|
|
296
|
+
export interface ExprStringContains<I> {
|
|
293
297
|
type: "stringContains";
|
|
294
298
|
/** Input expression (must evaluate to string) */
|
|
295
299
|
input: I;
|
|
@@ -332,7 +336,7 @@ interface ExprStringContains<I> {
|
|
|
332
336
|
* wildcard: '?'
|
|
333
337
|
* }
|
|
334
338
|
*/
|
|
335
|
-
interface ExprStringContainsFuzzy<I> {
|
|
339
|
+
export interface ExprStringContainsFuzzy<I> {
|
|
336
340
|
type: "stringContainsFuzzy";
|
|
337
341
|
/** Input expression (must evaluate to string) */
|
|
338
342
|
input: I;
|
|
@@ -371,7 +375,7 @@ interface ExprStringContainsFuzzy<I> {
|
|
|
371
375
|
* // NOT (value > 10)
|
|
372
376
|
* { type: 'not', input: comparisonExpr }
|
|
373
377
|
*/
|
|
374
|
-
interface ExprLogicalUnary<I> {
|
|
378
|
+
export interface ExprLogicalUnary<I> {
|
|
375
379
|
type: "not";
|
|
376
380
|
/** Input boolean expression to negate */
|
|
377
381
|
input: I;
|
|
@@ -396,7 +400,7 @@ interface ExprLogicalUnary<I> {
|
|
|
396
400
|
* // (status == 'active') OR (status == 'pending')
|
|
397
401
|
* { type: 'or', input: [statusActive, statusPending] }
|
|
398
402
|
*/
|
|
399
|
-
interface ExprLogicalVariadic<I> {
|
|
403
|
+
export interface ExprLogicalVariadic<I> {
|
|
400
404
|
/** Logical operation: 'and' or 'or' */
|
|
401
405
|
type: "and" | "or";
|
|
402
406
|
/** Array of boolean expressions to combine (minimum 2 elements) */
|
|
@@ -421,7 +425,7 @@ interface ExprLogicalVariadic<I> {
|
|
|
421
425
|
* set: ['active', 'pending', 'review']
|
|
422
426
|
* }
|
|
423
427
|
*/
|
|
424
|
-
interface ExprIsIn<I, T extends string | number> {
|
|
428
|
+
export interface ExprIsIn<I, T extends string | number> {
|
|
425
429
|
type: "isIn";
|
|
426
430
|
/** Input expression to test */
|
|
427
431
|
input: I;
|
|
@@ -442,7 +446,7 @@ interface ExprIsIn<I, T extends string | number> {
|
|
|
442
446
|
*
|
|
443
447
|
* @template I - The expression type (for recursion)
|
|
444
448
|
*/
|
|
445
|
-
interface ExprCast<I> {
|
|
449
|
+
export interface ExprCast<I> {
|
|
446
450
|
type: "cast";
|
|
447
451
|
/** Expression to cast. */
|
|
448
452
|
input: I;
|
|
@@ -454,7 +458,7 @@ interface ExprCast<I> {
|
|
|
454
458
|
*
|
|
455
459
|
* @template I - The expression type (for recursion)
|
|
456
460
|
*/
|
|
457
|
-
interface ExprConditionalCase<I> {
|
|
461
|
+
export interface ExprConditionalCase<I> {
|
|
458
462
|
/** Boolean predicate that selects this branch. */
|
|
459
463
|
when: I;
|
|
460
464
|
/** Value produced when `when` evaluates to true. */
|
|
@@ -482,7 +486,7 @@ interface ExprConditionalCase<I> {
|
|
|
482
486
|
* otherwise: { type: 'constant', value: 'low' }
|
|
483
487
|
* }
|
|
484
488
|
*/
|
|
485
|
-
interface ExprConditional<I> {
|
|
489
|
+
export interface ExprConditional<I> {
|
|
486
490
|
type: "conditional";
|
|
487
491
|
/** Cases evaluated in order; first matching wins. At least one. */
|
|
488
492
|
cases: [ExprConditionalCase<I>, ...ExprConditionalCase<I>[]];
|
|
@@ -490,7 +494,7 @@ interface ExprConditional<I> {
|
|
|
490
494
|
otherwise?: I;
|
|
491
495
|
}
|
|
492
496
|
/** Ranking function kind. */
|
|
493
|
-
type RankingKind = "rank" | "denseRank" | "rowNumber";
|
|
497
|
+
export type RankingKind = "rank" | "denseRank" | "rowNumber";
|
|
494
498
|
/**
|
|
495
499
|
* Ranking expression (always a window function).
|
|
496
500
|
*
|
|
@@ -501,7 +505,7 @@ type RankingKind = "rank" | "denseRank" | "rowNumber";
|
|
|
501
505
|
* @template A - Axis selector type
|
|
502
506
|
* @template C - Column selector type
|
|
503
507
|
*/
|
|
504
|
-
interface ExprRanking<I, A, C> {
|
|
508
|
+
export interface ExprRanking<I, A, C> {
|
|
505
509
|
type: "ranking";
|
|
506
510
|
/** Ranking semantics. */
|
|
507
511
|
kind: RankingKind;
|
|
@@ -527,7 +531,7 @@ interface ExprRanking<I, A, C> {
|
|
|
527
531
|
* // Reference axis by index (data layer)
|
|
528
532
|
* { type: 'axisRef', value: 0 }
|
|
529
533
|
*/
|
|
530
|
-
interface ExprAxisRef<A> {
|
|
534
|
+
export interface ExprAxisRef<A> {
|
|
531
535
|
type: "axisRef";
|
|
532
536
|
/** Axis identifier (selector or index depending on context) */
|
|
533
537
|
value: A;
|
|
@@ -547,12 +551,12 @@ interface ExprAxisRef<A> {
|
|
|
547
551
|
* // Reference column by index (data layer)
|
|
548
552
|
* { type: 'columnRef', value: 0 }
|
|
549
553
|
*/
|
|
550
|
-
interface ExprColumnRef<C> {
|
|
554
|
+
export interface ExprColumnRef<C> {
|
|
551
555
|
type: "columnRef";
|
|
552
556
|
/** Column identifier (ID or index depending on context) */
|
|
553
557
|
value: C;
|
|
554
558
|
}
|
|
555
|
-
type InferBooleanExpressionUnion<E> = [E extends ExprNumericComparison<unknown> ? Extract<E, {
|
|
559
|
+
export type InferBooleanExpressionUnion<E> = [E extends ExprNumericComparison<unknown> ? Extract<E, {
|
|
556
560
|
type: "numericComparison";
|
|
557
561
|
}> : never, E extends ExprStringEquals<unknown> ? Extract<E, {
|
|
558
562
|
type: "stringEquals";
|
|
@@ -588,7 +592,7 @@ type InferBooleanExpressionUnion<E> = [E extends ExprNumericComparison<unknown>
|
|
|
588
592
|
* // Select axis by index
|
|
589
593
|
* { type: 'axis', id: 0 }
|
|
590
594
|
*/
|
|
591
|
-
interface QueryAxisSelector<A> {
|
|
595
|
+
export interface QueryAxisSelector<A> {
|
|
592
596
|
type: "axis";
|
|
593
597
|
/** Axis identifier (name or index depending on context) */
|
|
594
598
|
id: A;
|
|
@@ -610,7 +614,7 @@ interface QueryAxisSelector<A> {
|
|
|
610
614
|
* // Select column by index
|
|
611
615
|
* { type: 'column', id: 0 }
|
|
612
616
|
*/
|
|
613
|
-
interface QueryColumnSelector<C> {
|
|
617
|
+
export interface QueryColumnSelector<C> {
|
|
614
618
|
type: "column";
|
|
615
619
|
/** Column identifier (name or index depending on context) */
|
|
616
620
|
id: C;
|
|
@@ -622,7 +626,7 @@ interface QueryColumnSelector<C> {
|
|
|
622
626
|
* `partitionBy` / `over` fields of window expressions where either an
|
|
623
627
|
* axis or a column can drive the partition.
|
|
624
628
|
*/
|
|
625
|
-
type QuerySelector<A, C> = QueryAxisSelector<A> | QueryColumnSelector<C>;
|
|
629
|
+
export type QuerySelector<A, C> = QueryAxisSelector<A> | QueryColumnSelector<C>;
|
|
626
630
|
/**
|
|
627
631
|
* Left outer join query operation.
|
|
628
632
|
*
|
|
@@ -649,7 +653,7 @@ type QuerySelector<A, C> = QueryAxisSelector<A> | QueryColumnSelector<C>;
|
|
|
649
653
|
* }
|
|
650
654
|
* // Result has all samples; annotations/metadata are null where not available
|
|
651
655
|
*/
|
|
652
|
-
interface QueryOuterJoin<JE extends QueryJoinEntry<unknown>> {
|
|
656
|
+
export interface QueryOuterJoin<JE extends QueryJoinEntry<unknown>> {
|
|
653
657
|
type: "outerJoin";
|
|
654
658
|
/** Primary query - all its records are preserved */
|
|
655
659
|
primary: JE;
|
|
@@ -689,13 +693,15 @@ interface QueryOuterJoin<JE extends QueryJoinEntry<unknown>> {
|
|
|
689
693
|
* axisFilters: [{ axisSelector: 0, constant: 'Sample1' }]
|
|
690
694
|
* }
|
|
691
695
|
*/
|
|
692
|
-
interface QuerySliceAxes<Q, A> {
|
|
696
|
+
export interface QuerySliceAxes<Q, A> {
|
|
693
697
|
type: "sliceAxes";
|
|
694
698
|
/** Input query to slice */
|
|
695
699
|
input: Q;
|
|
696
700
|
/** List of axis filters to apply (at least one required) */
|
|
697
701
|
axisFilters: {
|
|
698
|
-
/** Axis to filter. `SingleAxisSelector` at the spec layer; axis index at the data layer. */
|
|
702
|
+
/** Axis to filter. `SingleAxisSelector` at the spec layer; axis index at the data layer. */
|
|
703
|
+
axisSelector: A;
|
|
704
|
+
/** The constant value to filter the axis to */
|
|
699
705
|
constant: string | number;
|
|
700
706
|
}[];
|
|
701
707
|
}
|
|
@@ -725,13 +731,14 @@ interface QuerySliceAxes<Q, A> {
|
|
|
725
731
|
* ]
|
|
726
732
|
* }
|
|
727
733
|
*/
|
|
728
|
-
interface QuerySort<Q, E> {
|
|
734
|
+
export interface QuerySort<Q, E> {
|
|
729
735
|
type: "sort";
|
|
730
736
|
/** Input query to sort */
|
|
731
737
|
input: Q;
|
|
732
738
|
/** Sort criteria in priority order (at least one required) */
|
|
733
739
|
sortBy: {
|
|
734
|
-
expression: E;
|
|
740
|
+
expression: E;
|
|
741
|
+
/** If true, sort ascending (A-Z, 0-9); if false, descending */
|
|
735
742
|
ascending: boolean;
|
|
736
743
|
/**
|
|
737
744
|
* Null placement control:
|
|
@@ -773,7 +780,7 @@ interface QuerySort<Q, E> {
|
|
|
773
780
|
* }
|
|
774
781
|
* }
|
|
775
782
|
*/
|
|
776
|
-
interface QueryFilter<Q, E> {
|
|
783
|
+
export interface QueryFilter<Q, E> {
|
|
777
784
|
type: "filter";
|
|
778
785
|
/** Input query to filter */
|
|
779
786
|
input: Q;
|
|
@@ -795,7 +802,7 @@ interface QueryFilter<Q, E> {
|
|
|
795
802
|
*
|
|
796
803
|
* @template C - Column reference type (e.g., PObjectId for spec, full PColumn for rich queries)
|
|
797
804
|
*/
|
|
798
|
-
interface QueryColumn<C = PObjectId> {
|
|
805
|
+
export interface QueryColumn<C = PObjectId> {
|
|
799
806
|
type: "column";
|
|
800
807
|
/** Column reference (ID or full column object depending on context) */
|
|
801
808
|
column: C;
|
|
@@ -819,7 +826,7 @@ interface QueryColumn<C = PObjectId> {
|
|
|
819
826
|
* dataInfo: { ... } // JsonDataInfo object
|
|
820
827
|
* }
|
|
821
828
|
*/
|
|
822
|
-
interface QueryInlineColumn<T> {
|
|
829
|
+
export interface QueryInlineColumn<T> {
|
|
823
830
|
type: "inlineColumn";
|
|
824
831
|
/** Type specification defining axes and column types */
|
|
825
832
|
spec: T;
|
|
@@ -867,7 +874,7 @@ interface QueryInlineColumn<T> {
|
|
|
867
874
|
* specOverride: { ... }
|
|
868
875
|
* }
|
|
869
876
|
*/
|
|
870
|
-
interface QuerySparseToDenseColumn<C, A, SO> {
|
|
877
|
+
export interface QuerySparseToDenseColumn<C, A, SO> {
|
|
871
878
|
type: "sparseToDenseColumn";
|
|
872
879
|
/** Column reference (ID or full column object depending on context) */
|
|
873
880
|
column: C;
|
|
@@ -914,7 +921,7 @@ interface QuerySparseToDenseColumn<C, A, SO> {
|
|
|
914
921
|
* entries: [query1Entry, query2Entry]
|
|
915
922
|
* }
|
|
916
923
|
*/
|
|
917
|
-
interface QuerySymmetricJoin<JE extends QueryJoinEntry<unknown>> {
|
|
924
|
+
export interface QuerySymmetricJoin<JE extends QueryJoinEntry<unknown>> {
|
|
918
925
|
/** 'innerJoin' for intersection, 'fullJoin' for union with nulls */
|
|
919
926
|
type: "innerJoin" | "fullJoin";
|
|
920
927
|
/** Queries to join (at least one required) */
|
|
@@ -933,7 +940,7 @@ interface QuerySymmetricJoin<JE extends QueryJoinEntry<unknown>> {
|
|
|
933
940
|
* // Wrap a query for use in join
|
|
934
941
|
* { entry: someQuery }
|
|
935
942
|
*/
|
|
936
|
-
interface QueryJoinEntry<Q> {
|
|
943
|
+
export interface QueryJoinEntry<Q> {
|
|
937
944
|
/** The query to be joined */
|
|
938
945
|
entry: Q;
|
|
939
946
|
}
|
|
@@ -968,7 +975,7 @@ interface QueryJoinEntry<Q> {
|
|
|
968
975
|
* secondary: [{ entry: restQuery, ... }]
|
|
969
976
|
* }
|
|
970
977
|
*/
|
|
971
|
-
interface QueryLinkerJoin<L, JE extends QueryJoinEntry<unknown>> {
|
|
978
|
+
export interface QueryLinkerJoin<L, JE extends QueryJoinEntry<unknown>> {
|
|
972
979
|
type: "linkerJoin";
|
|
973
980
|
/** Linker side — column reference plus layer-specific integration data. */
|
|
974
981
|
linker: L;
|
|
@@ -986,7 +993,7 @@ interface QueryLinkerJoin<L, JE extends QueryJoinEntry<unknown>> {
|
|
|
986
993
|
* The Rust runtime accepts the legacy `"add"` tag as a serde alias;
|
|
987
994
|
* new code should emit `"append"`.
|
|
988
995
|
*/
|
|
989
|
-
type TransformColumnsMode = "append" | "replace";
|
|
996
|
+
export type TransformColumnsMode = "append" | "replace";
|
|
990
997
|
/**
|
|
991
998
|
* Single column entry for {@link QueryTransformColumns}.
|
|
992
999
|
*
|
|
@@ -994,7 +1001,7 @@ type TransformColumnsMode = "append" | "replace";
|
|
|
994
1001
|
* @template SO - Spec override type (typically `PColumnIdAndSpec` at
|
|
995
1002
|
* the spec layer, or layer-specific id+typespec at the data layer)
|
|
996
1003
|
*/
|
|
997
|
-
interface TransformColumnEntry<E, SO> {
|
|
1004
|
+
export interface TransformColumnEntry<E, SO> {
|
|
998
1005
|
/** Expression computing the column values. */
|
|
999
1006
|
expression: E;
|
|
1000
1007
|
/**
|
|
@@ -1014,7 +1021,7 @@ interface TransformColumnEntry<E, SO> {
|
|
|
1014
1021
|
* @template E - Expression type
|
|
1015
1022
|
* @template SO - Spec override type
|
|
1016
1023
|
*/
|
|
1017
|
-
interface QueryTransformColumns<Q, E, SO> {
|
|
1024
|
+
export interface QueryTransformColumns<Q, E, SO> {
|
|
1018
1025
|
type: "transformColumns";
|
|
1019
1026
|
/** Input query. */
|
|
1020
1027
|
input: Q;
|
|
@@ -1039,7 +1046,7 @@ interface QueryTransformColumns<Q, E, SO> {
|
|
|
1039
1046
|
* @template Q - Input query type
|
|
1040
1047
|
* @template SO - Spec override type
|
|
1041
1048
|
*/
|
|
1042
|
-
interface QuerySpecOverride<Q, SO> {
|
|
1049
|
+
export interface QuerySpecOverride<Q, SO> {
|
|
1043
1050
|
type: "specOverride";
|
|
1044
1051
|
/** Input query whose spec is to be overridden. */
|
|
1045
1052
|
input: Q;
|
|
@@ -1047,5 +1054,4 @@ interface QuerySpecOverride<Q, SO> {
|
|
|
1047
1054
|
override: SO;
|
|
1048
1055
|
}
|
|
1049
1056
|
//#endregion
|
|
1050
|
-
export { ColumnTypeSpec, ExprAxisRef, ExprCast, ExprColumnRef, ExprConditional, ExprConditionalCase, ExprConstant, ExprFillNull, ExprIsIn, ExprIsNull, ExprLogicalUnary, ExprLogicalVariadic, ExprNumericBinary, ExprNumericComparison, ExprNumericUnary, ExprRanking, ExprStringContains, ExprStringContainsFuzzy, ExprStringEquals, ExprStringRegex, InferBooleanExpressionUnion, NumericBinaryOperand, NumericComparisonOperand, NumericUnaryOperand, QueryAxisSelector, QueryColumn, QueryColumnSelector, QueryFilter, QueryInlineColumn, QueryJoinEntry, QueryLinkerJoin, QueryOuterJoin, QuerySelector, QuerySliceAxes, QuerySort, QuerySparseToDenseColumn, QuerySpecOverride, QuerySymmetricJoin, QueryTransformColumns, RankingKind, TransformColumnEntry, TransformColumnsMode };
|
|
1051
1057
|
//# sourceMappingURL=query_common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query_common.d.ts","names":[],"sources":["../../../../src/drivers/pframe/query/query_common.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"query_common.d.ts","names":[],"sources":["../../../../src/drivers/pframe/query/query_common.ts"],"mappings":"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"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ColumnTypeSpec, ExprAxisRef, ExprCast, ExprColumnRef, ExprConditional, ExprConstant, ExprFillNull, ExprIsIn, ExprIsNull, ExprLogicalUnary, ExprLogicalVariadic, ExprNumericBinary, ExprNumericComparison, ExprNumericUnary, ExprRanking, ExprStringContains, ExprStringContainsFuzzy, ExprStringEquals, ExprStringRegex, InferBooleanExpressionUnion, QueryColumn, QueryFilter, QueryInlineColumn, QueryJoinEntry, QueryLinkerJoin, QueryOuterJoin, QuerySliceAxes, QuerySort, QuerySparseToDenseColumn, QuerySymmetricJoin, QueryTransformColumns } from "./query_common.js";
|
|
2
2
|
import { PObjectId } from "../../../pool/spec.js";
|
|
3
|
+
import "../../../pool/index.js";
|
|
3
4
|
//#region src/drivers/pframe/query/query_data.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* Column identifier with type specification.
|
|
@@ -8,7 +9,9 @@ import { PObjectId } from "../../../pool/spec.js";
|
|
|
8
9
|
* Used in data layer to carry type information alongside column references.
|
|
9
10
|
*/
|
|
10
11
|
type ColumnIdAndTypeSpec = {
|
|
11
|
-
/** Unique identifier of the column */
|
|
12
|
+
/** Unique identifier of the column */
|
|
13
|
+
id: PObjectId;
|
|
14
|
+
/** Type specification defining the axes and the single column value type */
|
|
12
15
|
spec: ColumnTypeSpec;
|
|
13
16
|
};
|
|
14
17
|
/**
|
|
@@ -23,20 +26,20 @@ type ColumnIdAndTypeSpec = {
|
|
|
23
26
|
* // - This entry's axis 1 maps to result axis 2
|
|
24
27
|
* { entry: queryData, axesMapping: [0, 2] }
|
|
25
28
|
*/
|
|
26
|
-
interface DataQueryJoinEntry extends QueryJoinEntry<DataQuery> {
|
|
29
|
+
export interface DataQueryJoinEntry extends QueryJoinEntry<DataQuery> {
|
|
27
30
|
/** Maps this entry's axes to the result axes by index */
|
|
28
31
|
axesMapping: number[];
|
|
29
32
|
}
|
|
30
33
|
/** @see QueryColumn */
|
|
31
|
-
type DataQueryColumn = QueryColumn;
|
|
34
|
+
export type DataQueryColumn = QueryColumn;
|
|
32
35
|
/** @see QueryInlineColumn */
|
|
33
|
-
type DataQueryInlineColumn = QueryInlineColumn<ColumnIdAndTypeSpec>;
|
|
36
|
+
export type DataQueryInlineColumn = QueryInlineColumn<ColumnIdAndTypeSpec>;
|
|
34
37
|
/** @see QuerySparseToDenseColumn */
|
|
35
|
-
type DataQuerySparseToDenseColumn = QuerySparseToDenseColumn<PObjectId, number, ColumnIdAndTypeSpec>;
|
|
38
|
+
export type DataQuerySparseToDenseColumn = QuerySparseToDenseColumn<PObjectId, number, ColumnIdAndTypeSpec>;
|
|
36
39
|
/** @see QuerySymmetricJoin */
|
|
37
|
-
type DataQuerySymmetricJoin = QuerySymmetricJoin<DataQueryJoinEntry>;
|
|
40
|
+
export type DataQuerySymmetricJoin = QuerySymmetricJoin<DataQueryJoinEntry>;
|
|
38
41
|
/** @see QueryOuterJoin */
|
|
39
|
-
type DataQueryOuterJoin = QueryOuterJoin<DataQueryJoinEntry>;
|
|
42
|
+
export type DataQueryOuterJoin = QueryOuterJoin<DataQueryJoinEntry>;
|
|
40
43
|
/**
|
|
41
44
|
* Linker side of a data-layer linker-join.
|
|
42
45
|
*
|
|
@@ -45,21 +48,24 @@ type DataQueryOuterJoin = QueryOuterJoin<DataQueryJoinEntry>;
|
|
|
45
48
|
* - `axesMapping` — how the linker's axes map into the joined result
|
|
46
49
|
* - `oneSideAxesIndices` — which axis indices in the joined result to project out
|
|
47
50
|
*/
|
|
48
|
-
type DataQueryLinkerJoinLinker = {
|
|
49
|
-
/** Linker column reference. */
|
|
50
|
-
|
|
51
|
+
export type DataQueryLinkerJoinLinker = {
|
|
52
|
+
/** Linker column reference. */
|
|
53
|
+
column: PObjectId;
|
|
54
|
+
/** Linker's axes mapped into the joined result. */
|
|
55
|
+
axesMapping: number[];
|
|
56
|
+
/** Axis indices (in the joined result) to project out — the linker's one-side axes. */
|
|
51
57
|
oneSideAxesIndices: number[];
|
|
52
58
|
};
|
|
53
59
|
/** @see QueryLinkerJoin */
|
|
54
|
-
type DataQueryLinkerJoin = QueryLinkerJoin<DataQueryLinkerJoinLinker, DataQueryJoinEntry>;
|
|
60
|
+
export type DataQueryLinkerJoin = QueryLinkerJoin<DataQueryLinkerJoinLinker, DataQueryJoinEntry>;
|
|
55
61
|
/** @see QuerySliceAxes */
|
|
56
|
-
type DataQuerySliceAxes = QuerySliceAxes<DataQuery, number>;
|
|
62
|
+
export type DataQuerySliceAxes = QuerySliceAxes<DataQuery, number>;
|
|
57
63
|
/** @see QuerySort */
|
|
58
|
-
type DataQuerySort = QuerySort<DataQuery, DataQueryExpression>;
|
|
64
|
+
export type DataQuerySort = QuerySort<DataQuery, DataQueryExpression>;
|
|
59
65
|
/** @see QueryFilter */
|
|
60
|
-
type DataQueryFilter = QueryFilter<DataQuery, DataQueryBooleanExpression>;
|
|
66
|
+
export type DataQueryFilter = QueryFilter<DataQuery, DataQueryBooleanExpression>;
|
|
61
67
|
/** @see QueryTransformColumns */
|
|
62
|
-
type DataQueryTransformColumns = QueryTransformColumns<DataQuery, DataQueryExpression, ColumnIdAndTypeSpec>;
|
|
68
|
+
export type DataQueryTransformColumns = QueryTransformColumns<DataQuery, DataQueryExpression, ColumnIdAndTypeSpec>;
|
|
63
69
|
/**
|
|
64
70
|
* Union of all data layer query types.
|
|
65
71
|
*
|
|
@@ -71,13 +77,12 @@ type DataQueryTransformColumns = QueryTransformColumns<DataQuery, DataQueryExpre
|
|
|
71
77
|
* - Join operations: innerJoin, fullJoin, outerJoin, linkerJoin
|
|
72
78
|
* - Transformations: sliceAxes, sort, filter, transformColumns
|
|
73
79
|
*/
|
|
74
|
-
type DataQuery = DataQueryColumn | DataQueryInlineColumn | DataQuerySparseToDenseColumn | DataQuerySymmetricJoin | DataQueryOuterJoin | DataQueryLinkerJoin | DataQuerySliceAxes | DataQuerySort | DataQueryFilter | DataQueryTransformColumns;
|
|
80
|
+
export type DataQuery = DataQueryColumn | DataQueryInlineColumn | DataQuerySparseToDenseColumn | DataQuerySymmetricJoin | DataQueryOuterJoin | DataQueryLinkerJoin | DataQuerySliceAxes | DataQuerySort | DataQueryFilter | DataQueryTransformColumns;
|
|
75
81
|
/** @see ExprAxisRef */
|
|
76
|
-
type DataExprAxisRef = ExprAxisRef<number>;
|
|
82
|
+
export type DataExprAxisRef = ExprAxisRef<number>;
|
|
77
83
|
/** @see ExprColumnRef */
|
|
78
|
-
type DataExprColumnRef = ExprColumnRef<number>;
|
|
79
|
-
type DataQueryExpression = DataExprColumnRef | DataExprAxisRef | ExprConstant | ExprNumericBinary<DataQueryExpression> | ExprNumericComparison<DataQueryExpression> | ExprNumericUnary<DataQueryExpression> | ExprStringEquals<DataQueryExpression> | ExprStringContains<DataQueryExpression> | ExprStringRegex<DataQueryExpression> | ExprStringContainsFuzzy<DataQueryExpression> | ExprIsNull<DataQueryExpression> | ExprFillNull<DataQueryExpression> | ExprLogicalUnary<DataQueryExpression> | ExprLogicalVariadic<DataQueryExpression> | ExprIsIn<DataQueryExpression, string> | ExprIsIn<DataQueryExpression, number> | ExprCast<DataQueryExpression> | ExprConditional<DataQueryExpression> | ExprRanking<DataQueryExpression, number, number>;
|
|
80
|
-
type DataQueryBooleanExpression = InferBooleanExpressionUnion<DataQueryExpression>;
|
|
84
|
+
export type DataExprColumnRef = ExprColumnRef<number>;
|
|
85
|
+
export type DataQueryExpression = DataExprColumnRef | DataExprAxisRef | ExprConstant | ExprNumericBinary<DataQueryExpression> | ExprNumericComparison<DataQueryExpression> | ExprNumericUnary<DataQueryExpression> | ExprStringEquals<DataQueryExpression> | ExprStringContains<DataQueryExpression> | ExprStringRegex<DataQueryExpression> | ExprStringContainsFuzzy<DataQueryExpression> | ExprIsNull<DataQueryExpression> | ExprFillNull<DataQueryExpression> | ExprLogicalUnary<DataQueryExpression> | ExprLogicalVariadic<DataQueryExpression> | ExprIsIn<DataQueryExpression, string> | ExprIsIn<DataQueryExpression, number> | ExprCast<DataQueryExpression> | ExprConditional<DataQueryExpression> | ExprRanking<DataQueryExpression, number, number>;
|
|
86
|
+
export type DataQueryBooleanExpression = InferBooleanExpressionUnion<DataQueryExpression>;
|
|
81
87
|
//#endregion
|
|
82
|
-
export { DataExprAxisRef, DataExprColumnRef, DataQuery, DataQueryBooleanExpression, DataQueryColumn, DataQueryExpression, DataQueryFilter, DataQueryInlineColumn, DataQueryJoinEntry, DataQueryLinkerJoin, DataQueryLinkerJoinLinker, DataQueryOuterJoin, DataQuerySliceAxes, DataQuerySort, DataQuerySparseToDenseColumn, DataQuerySymmetricJoin, DataQueryTransformColumns };
|
|
83
88
|
//# sourceMappingURL=query_data.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query_data.d.ts","names":[],"sources":["../../../../src/drivers/pframe/query/query_data.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"query_data.d.ts","names":[],"sources":["../../../../src/drivers/pframe/query/query_data.ts"],"mappings":";;;;;;;;;;KAyCK;;EAEH,IAAI;;EAEJ,MAAM;;;;;;;;;;;;;;iBAeS,2BAA2B,eAAe;;EAEzD;;;YAIU,kBAAkB;;YAElB,wBAAwB,kBAAkB;;YAE1C,+BAA+B,yBACzC,mBAEA;;YAGU,yBAAyB,mBAAmB;;YAE5C,qBAAqB,eAAe;;;;;;;;;YASpC;;EAEV,QAAQ;;EAER;;EAEA;;;YAGU,sBAAsB,gBAAgB,2BAA2B;;YAEjE,qBAAqB,eAAe;;YAEpC,gBAAgB,UAAU,WAAW;;YAErC,kBAAkB,YAAY,WAAW;;YAEzC,4BAA4B,sBACtC,WACA,qBACA;;;;;;;;;;;;YAcU,YACR,kBACA,wBACA,+BACA,yBACA,qBACA,sBACA,qBACA,gBACA,kBACA;;YAGQ,kBAAkB;;YAElB,oBAAoB;YAEpB,sBACR,oBACA,kBACA,eACA,kBAAkB,uBAClB,sBAAsB,uBACtB,iBAAiB,uBACjB,iBAAiB,uBACjB,mBAAmB,uBACnB,gBAAgB,uBAChB,wBAAwB,uBACxB,WAAW,uBACX,aAAa,uBACb,iBAAiB,uBACjB,oBAAoB,uBACpB,SAAS,+BACT,SAAS,+BAET,SAAS,uBACT,gBAAgB,uBAEhB,YAAY;YAGJ,6BAA6B,4BAA4B"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Domain, PColumnIdAndSpec } from "../spec/spec.js";
|
|
2
2
|
import { SpecOverrides } from "../spec/overridden.js";
|
|
3
3
|
import { ColumnUniversalId } from "../spec/ids.js";
|
|
4
|
+
import "../spec/index.js";
|
|
4
5
|
import { ExprAxisRef, ExprCast, ExprColumnRef, ExprConditional, ExprConstant, ExprFillNull, ExprIsIn, ExprIsNull, ExprLogicalUnary, ExprLogicalVariadic, ExprNumericBinary, ExprNumericComparison, ExprNumericUnary, ExprRanking, ExprStringContains, ExprStringContainsFuzzy, ExprStringEquals, ExprStringRegex, InferBooleanExpressionUnion, QueryColumn, QueryFilter, QueryInlineColumn, QueryJoinEntry, QueryLinkerJoin, QueryOuterJoin, QuerySliceAxes, QuerySort, QuerySparseToDenseColumn, QuerySpecOverride, QuerySymmetricJoin, QueryTransformColumns } from "./query_common.js";
|
|
5
6
|
import { SingleAxisSelector } from "../spec/selectors.js";
|
|
6
7
|
import { PObjectId } from "../../../pool/spec.js";
|
|
8
|
+
import "../../../pool/index.js";
|
|
7
9
|
//#region src/drivers/pframe/query/query_spec.d.ts
|
|
8
10
|
/**
|
|
9
11
|
* Join entry for spec-layer queries — the base join entry extended with
|
|
@@ -15,39 +17,41 @@ import { PObjectId } from "../../../pool/spec.js";
|
|
|
15
17
|
* qualifications: [{ axis: { name: 'sample' }, contextDomain: { ... } }]
|
|
16
18
|
* }
|
|
17
19
|
*/
|
|
18
|
-
type SpecQueryJoinEntry<C = ColumnUniversalId> = QueryJoinEntry<SpecQuery<C>> & {
|
|
20
|
+
export type SpecQueryJoinEntry<C = ColumnUniversalId> = QueryJoinEntry<SpecQuery<C>> & {
|
|
19
21
|
qualifications?: readonly {
|
|
20
|
-
/** Axis to qualify. */
|
|
22
|
+
/** Axis to qualify. */
|
|
23
|
+
axis: SingleAxisSelector;
|
|
24
|
+
/** Additional domain constraints for this axis. */
|
|
21
25
|
contextDomain: Domain;
|
|
22
26
|
}[];
|
|
23
27
|
};
|
|
24
28
|
/** @see QueryColumn */
|
|
25
|
-
type SpecQueryColumn<C = ColumnUniversalId> = QueryColumn<C>;
|
|
29
|
+
export type SpecQueryColumn<C = ColumnUniversalId> = QueryColumn<C>;
|
|
26
30
|
/** @see QueryInlineColumn */
|
|
27
|
-
type SpecQueryInlineColumn = QueryInlineColumn<PColumnIdAndSpec>;
|
|
31
|
+
export type SpecQueryInlineColumn = QueryInlineColumn<PColumnIdAndSpec>;
|
|
28
32
|
/** @see QuerySparseToDenseColumn */
|
|
29
|
-
type SpecQuerySparseToDenseColumn<C = ColumnUniversalId> = QuerySparseToDenseColumn<C, SingleAxisSelector, PColumnIdAndSpec>;
|
|
33
|
+
export type SpecQuerySparseToDenseColumn<C = ColumnUniversalId> = QuerySparseToDenseColumn<C, SingleAxisSelector, PColumnIdAndSpec>;
|
|
30
34
|
/** @see QuerySymmetricJoin */
|
|
31
|
-
type SpecQuerySymmetricJoin<C = ColumnUniversalId> = QuerySymmetricJoin<SpecQueryJoinEntry<C>>;
|
|
35
|
+
export type SpecQuerySymmetricJoin<C = ColumnUniversalId> = QuerySymmetricJoin<SpecQueryJoinEntry<C>>;
|
|
32
36
|
/** @see QueryOuterJoin */
|
|
33
|
-
type SpecQueryOuterJoin<C = ColumnUniversalId> = QueryOuterJoin<SpecQueryJoinEntry<C>>;
|
|
37
|
+
export type SpecQueryOuterJoin<C = ColumnUniversalId> = QueryOuterJoin<SpecQueryJoinEntry<C>>;
|
|
34
38
|
/** @see QueryLinkerJoin */
|
|
35
|
-
type SpecQueryLinkerJoin<C = ColumnUniversalId> = QueryLinkerJoin<SpecQuery<C>, SpecQueryJoinEntry<C>>;
|
|
39
|
+
export type SpecQueryLinkerJoin<C = ColumnUniversalId> = QueryLinkerJoin<SpecQuery<C>, SpecQueryJoinEntry<C>>;
|
|
36
40
|
/** @see QuerySliceAxes */
|
|
37
|
-
type SpecQuerySliceAxes<C = ColumnUniversalId> = QuerySliceAxes<SpecQuery<C>, SingleAxisSelector>;
|
|
41
|
+
export type SpecQuerySliceAxes<C = ColumnUniversalId> = QuerySliceAxes<SpecQuery<C>, SingleAxisSelector>;
|
|
38
42
|
/** @see QuerySort */
|
|
39
|
-
type SpecQuerySort<C = ColumnUniversalId> = QuerySort<SpecQuery<C>, SpecQueryExpression>;
|
|
43
|
+
export type SpecQuerySort<C = ColumnUniversalId> = QuerySort<SpecQuery<C>, SpecQueryExpression>;
|
|
40
44
|
/** @see QueryFilter */
|
|
41
|
-
type SpecQueryFilter<C = ColumnUniversalId> = QueryFilter<SpecQuery<C>, SpecQueryBooleanExpression>;
|
|
45
|
+
export type SpecQueryFilter<C = ColumnUniversalId> = QueryFilter<SpecQuery<C>, SpecQueryBooleanExpression>;
|
|
42
46
|
/** @see QueryTransformColumns */
|
|
43
|
-
type SpecQueryTransformColumns<C = ColumnUniversalId> = QueryTransformColumns<SpecQuery<C>, SpecQueryExpression, PColumnIdAndSpec>;
|
|
47
|
+
export type SpecQueryTransformColumns<C = ColumnUniversalId> = QueryTransformColumns<SpecQuery<C>, SpecQueryExpression, PColumnIdAndSpec>;
|
|
44
48
|
/**
|
|
45
49
|
* Client-side spec-override node — collapsed at the host boundary, never
|
|
46
50
|
* sent to pframe-engine.
|
|
47
51
|
*
|
|
48
52
|
* @see QuerySpecOverride
|
|
49
53
|
*/
|
|
50
|
-
type SpecQuerySpecOverride<C = ColumnUniversalId> = QuerySpecOverride<SpecQuery<C>, SpecOverrides>;
|
|
54
|
+
export type SpecQuerySpecOverride<C = ColumnUniversalId> = QuerySpecOverride<SpecQuery<C>, SpecOverrides>;
|
|
51
55
|
/**
|
|
52
56
|
* Union of all spec layer query types.
|
|
53
57
|
*
|
|
@@ -64,13 +68,12 @@ type SpecQuerySpecOverride<C = ColumnUniversalId> = QuerySpecOverride<SpecQuery<
|
|
|
64
68
|
* - Transformations: sliceAxes, sort, filter, transformColumns
|
|
65
69
|
* - Client-side overlays: specOverride (collapsed before reaching the engine)
|
|
66
70
|
*/
|
|
67
|
-
type SpecQuery<C = ColumnUniversalId> = SpecQueryColumn<C> | SpecQueryInlineColumn | SpecQuerySparseToDenseColumn<C> | SpecQuerySymmetricJoin<C> | SpecQueryOuterJoin<C> | SpecQueryLinkerJoin<C> | SpecQuerySliceAxes<C> | SpecQuerySort<C> | SpecQueryFilter<C> | SpecQueryTransformColumns<C> | SpecQuerySpecOverride<C>;
|
|
71
|
+
export type SpecQuery<C = ColumnUniversalId> = SpecQueryColumn<C> | SpecQueryInlineColumn | SpecQuerySparseToDenseColumn<C> | SpecQuerySymmetricJoin<C> | SpecQueryOuterJoin<C> | SpecQueryLinkerJoin<C> | SpecQuerySliceAxes<C> | SpecQuerySort<C> | SpecQueryFilter<C> | SpecQueryTransformColumns<C> | SpecQuerySpecOverride<C>;
|
|
68
72
|
/** @see ExprAxisRef */
|
|
69
|
-
type SpecExprAxisRef = ExprAxisRef<SingleAxisSelector>;
|
|
73
|
+
export type SpecExprAxisRef = ExprAxisRef<SingleAxisSelector>;
|
|
70
74
|
/** @see ExprColumnRef */
|
|
71
|
-
type SpecExprColumnRef = ExprColumnRef<ColumnUniversalId>;
|
|
72
|
-
type SpecQueryExpression = SpecExprColumnRef | SpecExprAxisRef | ExprConstant | ExprNumericBinary<SpecQueryExpression> | ExprNumericComparison<SpecQueryExpression> | ExprNumericUnary<SpecQueryExpression> | ExprStringEquals<SpecQueryExpression> | ExprStringContains<SpecQueryExpression> | ExprStringRegex<SpecQueryExpression> | ExprStringContainsFuzzy<SpecQueryExpression> | ExprIsNull<SpecQueryExpression> | ExprFillNull<SpecQueryExpression> | ExprLogicalUnary<SpecQueryExpression> | ExprLogicalVariadic<SpecQueryExpression> | ExprIsIn<SpecQueryExpression, string> | ExprIsIn<SpecQueryExpression, number> | ExprCast<SpecQueryExpression> | ExprConditional<SpecQueryExpression> | ExprRanking<SpecQueryExpression, SingleAxisSelector, PObjectId>;
|
|
73
|
-
type SpecQueryBooleanExpression = InferBooleanExpressionUnion<SpecQueryExpression>;
|
|
75
|
+
export type SpecExprColumnRef = ExprColumnRef<ColumnUniversalId>;
|
|
76
|
+
export type SpecQueryExpression = SpecExprColumnRef | SpecExprAxisRef | ExprConstant | ExprNumericBinary<SpecQueryExpression> | ExprNumericComparison<SpecQueryExpression> | ExprNumericUnary<SpecQueryExpression> | ExprStringEquals<SpecQueryExpression> | ExprStringContains<SpecQueryExpression> | ExprStringRegex<SpecQueryExpression> | ExprStringContainsFuzzy<SpecQueryExpression> | ExprIsNull<SpecQueryExpression> | ExprFillNull<SpecQueryExpression> | ExprLogicalUnary<SpecQueryExpression> | ExprLogicalVariadic<SpecQueryExpression> | ExprIsIn<SpecQueryExpression, string> | ExprIsIn<SpecQueryExpression, number> | ExprCast<SpecQueryExpression> | ExprConditional<SpecQueryExpression> | ExprRanking<SpecQueryExpression, SingleAxisSelector, PObjectId>;
|
|
77
|
+
export type SpecQueryBooleanExpression = InferBooleanExpressionUnion<SpecQueryExpression>;
|
|
74
78
|
//#endregion
|
|
75
|
-
export { SpecExprAxisRef, SpecExprColumnRef, SpecQuery, SpecQueryBooleanExpression, SpecQueryColumn, SpecQueryExpression, SpecQueryFilter, SpecQueryInlineColumn, SpecQueryJoinEntry, SpecQueryLinkerJoin, SpecQueryOuterJoin, SpecQuerySliceAxes, SpecQuerySort, SpecQuerySparseToDenseColumn, SpecQuerySpecOverride, SpecQuerySymmetricJoin, SpecQueryTransformColumns };
|
|
76
79
|
//# sourceMappingURL=query_spec.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query_spec.d.ts","names":[],"sources":["../../../../src/drivers/pframe/query/query_spec.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"query_spec.d.ts","names":[],"sources":["../../../../src/drivers/pframe/query/query_spec.ts"],"mappings":";;;;;;;;;;;;;;;;;;;YAgDY,mBAAmB,IAAI,qBAAqB,eAAe,UAAU;EAC/E;;IAEE,MAAM;;IAEN,eAAe;;;;YAKP,gBAAgB,IAAI,qBAAqB,YAAY;;YAErD,wBAAwB,kBAAkB;;YAE1C,6BAA6B,IAAI,qBAAqB,yBAChE,GACA,oBACA;;YAGU,uBAAuB,IAAI,qBAAqB,mBAC1D,mBAAmB;;YAGT,mBAAmB,IAAI,qBAAqB,eAAe,mBAAmB;;YAE9E,oBAAoB,IAAI,qBAAqB,gBACvD,UAAU,IACV,mBAAmB;;YAGT,mBAAmB,IAAI,qBAAqB,eACtD,UAAU,IACV;;YAGU,cAAc,IAAI,qBAAqB,UAAU,UAAU,IAAI;;YAE/D,gBAAgB,IAAI,qBAAqB,YACnD,UAAU,IACV;;YAGU,0BAA0B,IAAI,qBAAqB,sBAC7D,UAAU,IACV,qBACA;;;;;;;YAQU,sBAAsB,IAAI,qBAAqB,kBACzD,UAAU,IACV;;;;;;;;;;;;;;;;;YAmBU,UAAU,IAAI,qBACtB,gBAAgB,KAChB,wBACA,6BAA6B,KAC7B,uBAAuB,KACvB,mBAAmB,KACnB,oBAAoB,KACpB,mBAAmB,KACnB,cAAc,KACd,gBAAgB,KAChB,0BAA0B,KAC1B,sBAAsB;;YAGd,kBAAkB,YAAY;;YAE9B,oBAAoB,cAAc;YAElC,sBACR,oBACA,kBACA,eACA,kBAAkB,uBAClB,sBAAsB,uBACtB,iBAAiB,uBACjB,iBAAiB,uBACjB,mBAAmB,uBACnB,gBAAgB,uBAChB,wBAAwB,uBACxB,WAAW,uBACX,aAAa,uBACb,iBAAiB,uBACjB,oBAAoB,uBACpB,SAAS,+BACT,SAAS,+BAET,SAAS,uBACT,gBAAgB,uBAEhB,YAAY,qBAAqB,oBAAoB;YAG7C,6BAA6B,4BAA4B"}
|