@platforma-open/milaboratories.software-ptabler.schema 1.10.0 → 1.12.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/expressions.d.ts +18 -3
- package/package.json +1 -1
- package/src/expressions.ts +18 -3
package/dist/expressions.d.ts
CHANGED
|
@@ -410,6 +410,9 @@ export interface WindowExpression {
|
|
|
410
410
|
* Represents a struct field access operation.
|
|
411
411
|
* This operation retrieves a single field from a struct (nested data structure).
|
|
412
412
|
* It corresponds to Polars' struct.field() functionality.
|
|
413
|
+
*
|
|
414
|
+
* When fields is an array, the operation performs recursive field access,
|
|
415
|
+
* where each element in the array represents a level in the nested structure.
|
|
413
416
|
*/
|
|
414
417
|
export interface StructFieldExpression {
|
|
415
418
|
/** The type of operation, always 'struct_field'. */
|
|
@@ -417,8 +420,20 @@ export interface StructFieldExpression {
|
|
|
417
420
|
/** The struct expression to extract fields from. */
|
|
418
421
|
struct: Expression;
|
|
419
422
|
/**
|
|
420
|
-
* The field name to extract from the struct.
|
|
421
|
-
*
|
|
423
|
+
* The field name(s) to extract from the struct.
|
|
424
|
+
* - If a string, extracts a single field from the struct.
|
|
425
|
+
* - If an array, performs recursive field access where each element represents a level in the nested structure.
|
|
426
|
+
*/
|
|
427
|
+
fields: string | string[];
|
|
428
|
+
/**
|
|
429
|
+
* Optional expected data type for the returned value.
|
|
430
|
+
* This can be used for type validation or casting of the extracted field.
|
|
431
|
+
*/
|
|
432
|
+
dtype?: DataType;
|
|
433
|
+
/**
|
|
434
|
+
* Optional default value to return if the field is not found or is null.
|
|
435
|
+
* If not provided and the field is missing, the operation returns null.
|
|
436
|
+
* Only constant scalar values are supported.
|
|
422
437
|
*/
|
|
423
|
-
|
|
438
|
+
default?: string | number | boolean | null;
|
|
424
439
|
}
|
package/package.json
CHANGED
package/src/expressions.ts
CHANGED
|
@@ -520,6 +520,9 @@ export interface WindowExpression {
|
|
|
520
520
|
* Represents a struct field access operation.
|
|
521
521
|
* This operation retrieves a single field from a struct (nested data structure).
|
|
522
522
|
* It corresponds to Polars' struct.field() functionality.
|
|
523
|
+
*
|
|
524
|
+
* When fields is an array, the operation performs recursive field access,
|
|
525
|
+
* where each element in the array represents a level in the nested structure.
|
|
523
526
|
*/
|
|
524
527
|
export interface StructFieldExpression {
|
|
525
528
|
/** The type of operation, always 'struct_field'. */
|
|
@@ -527,8 +530,20 @@ export interface StructFieldExpression {
|
|
|
527
530
|
/** The struct expression to extract fields from. */
|
|
528
531
|
struct: Expression;
|
|
529
532
|
/**
|
|
530
|
-
* The field name to extract from the struct.
|
|
531
|
-
*
|
|
533
|
+
* The field name(s) to extract from the struct.
|
|
534
|
+
* - If a string, extracts a single field from the struct.
|
|
535
|
+
* - If an array, performs recursive field access where each element represents a level in the nested structure.
|
|
536
|
+
*/
|
|
537
|
+
fields: string | string[];
|
|
538
|
+
/**
|
|
539
|
+
* Optional expected data type for the returned value.
|
|
540
|
+
* This can be used for type validation or casting of the extracted field.
|
|
541
|
+
*/
|
|
542
|
+
dtype?: DataType;
|
|
543
|
+
/**
|
|
544
|
+
* Optional default value to return if the field is not found or is null.
|
|
545
|
+
* If not provided and the field is missing, the operation returns null.
|
|
546
|
+
* Only constant scalar values are supported.
|
|
532
547
|
*/
|
|
533
|
-
|
|
548
|
+
default?: string | number | boolean | null;
|
|
534
549
|
}
|