@platforma-open/milaboratories.software-ptabler.schema 1.4.0 → 1.6.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/basic_steps.d.ts +25 -0
- package/dist/index.d.ts +2 -2
- package/dist/sort.d.ts +3 -2
- package/package.json +1 -1
- package/src/basic_steps.ts +29 -0
- package/src/index.ts +5 -2
- package/src/sort.ts +4 -2
package/dist/basic_steps.d.ts
CHANGED
|
@@ -133,3 +133,28 @@ export interface WithColumnsStep {
|
|
|
133
133
|
expression: Expression;
|
|
134
134
|
}[];
|
|
135
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Defines a step that excludes a specific set of columns from an input table
|
|
138
|
+
* and outputs the result to a new table in the tablespace. This operation is
|
|
139
|
+
* similar to Polars' `exclude` method.
|
|
140
|
+
*/
|
|
141
|
+
export interface WithoutColumnsStep {
|
|
142
|
+
/**
|
|
143
|
+
* The type identifier for this step.
|
|
144
|
+
* Must be 'without_columns'.
|
|
145
|
+
*/
|
|
146
|
+
type: 'without_columns';
|
|
147
|
+
/**
|
|
148
|
+
* The name of the input table in the tablespace from which columns will be excluded.
|
|
149
|
+
*/
|
|
150
|
+
inputTable: string;
|
|
151
|
+
/**
|
|
152
|
+
* The name for the resulting table that will be added to the tablespace.
|
|
153
|
+
* This new table will contain all columns from the inputTable except those specified.
|
|
154
|
+
*/
|
|
155
|
+
outputTable: string;
|
|
156
|
+
/**
|
|
157
|
+
* An array of column names to be excluded from the input table.
|
|
158
|
+
*/
|
|
159
|
+
columns: string[];
|
|
160
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ReadCsvStep, WriteCsvStep } from './io';
|
|
2
|
-
import { AddColumnsStep, FilterStep } from './basic_steps';
|
|
2
|
+
import { AddColumnsStep, FilterStep, SelectStep, WithColumnsStep, WithoutColumnsStep } from './basic_steps';
|
|
3
3
|
import { AggregateStep } from './aggregate';
|
|
4
4
|
import { AnyJoinStep } from './join';
|
|
5
5
|
import { ConcatenateStep } from './concatenate';
|
|
6
6
|
import { SortStep } from './sort';
|
|
7
|
-
export type PTablerStep = ReadCsvStep | WriteCsvStep | AddColumnsStep | FilterStep | AggregateStep | AnyJoinStep | ConcatenateStep | SortStep;
|
|
7
|
+
export type PTablerStep = ReadCsvStep | WriteCsvStep | AddColumnsStep | FilterStep | AggregateStep | AnyJoinStep | ConcatenateStep | SortStep | SelectStep | WithColumnsStep | WithoutColumnsStep;
|
|
8
8
|
export type PTablerWorkflow = {
|
|
9
9
|
workflow: PTablerStep[];
|
|
10
10
|
};
|
package/dist/sort.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { Expression } from './expressions';
|
|
1
2
|
/**
|
|
2
3
|
* Defines a single sort instruction, specifying the column, sort order,
|
|
3
4
|
* and null handling strategy.
|
|
4
5
|
*/
|
|
5
6
|
export interface SortDirective {
|
|
6
|
-
/** The
|
|
7
|
-
|
|
7
|
+
/** The expression to sort by. */
|
|
8
|
+
value: Expression;
|
|
8
9
|
/**
|
|
9
10
|
* Whether to sort in descending order for this column.
|
|
10
11
|
* Defaults to false (ascending).
|
package/package.json
CHANGED
package/src/basic_steps.ts
CHANGED
|
@@ -151,3 +151,32 @@ export interface WithColumnsStep {
|
|
|
151
151
|
expression: Expression;
|
|
152
152
|
}[];
|
|
153
153
|
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Defines a step that excludes a specific set of columns from an input table
|
|
157
|
+
* and outputs the result to a new table in the tablespace. This operation is
|
|
158
|
+
* similar to Polars' `exclude` method.
|
|
159
|
+
*/
|
|
160
|
+
export interface WithoutColumnsStep {
|
|
161
|
+
/**
|
|
162
|
+
* The type identifier for this step.
|
|
163
|
+
* Must be 'without_columns'.
|
|
164
|
+
*/
|
|
165
|
+
type: 'without_columns';
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* The name of the input table in the tablespace from which columns will be excluded.
|
|
169
|
+
*/
|
|
170
|
+
inputTable: string;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* The name for the resulting table that will be added to the tablespace.
|
|
174
|
+
* This new table will contain all columns from the inputTable except those specified.
|
|
175
|
+
*/
|
|
176
|
+
outputTable: string;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* An array of column names to be excluded from the input table.
|
|
180
|
+
*/
|
|
181
|
+
columns: string[];
|
|
182
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReadCsvStep, WriteCsvStep } from './io';
|
|
2
|
-
import type { AddColumnsStep, FilterStep } from './basic_steps';
|
|
2
|
+
import type { AddColumnsStep, FilterStep, SelectStep, WithColumnsStep, WithoutColumnsStep } from './basic_steps';
|
|
3
3
|
import type { AggregateStep } from './aggregate';
|
|
4
4
|
import type { AnyJoinStep } from './join';
|
|
5
5
|
import type { ConcatenateStep } from './concatenate';
|
|
@@ -13,7 +13,10 @@ export type PTablerStep =
|
|
|
13
13
|
| AggregateStep
|
|
14
14
|
| AnyJoinStep
|
|
15
15
|
| ConcatenateStep
|
|
16
|
-
| SortStep
|
|
16
|
+
| SortStep
|
|
17
|
+
| SelectStep
|
|
18
|
+
| WithColumnsStep
|
|
19
|
+
| WithoutColumnsStep;
|
|
17
20
|
|
|
18
21
|
export type PTablerWorkflow = {
|
|
19
22
|
workflow: PTablerStep[];
|
package/src/sort.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import type { Expression } from './expressions';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Defines a single sort instruction, specifying the column, sort order,
|
|
3
5
|
* and null handling strategy.
|
|
4
6
|
*/
|
|
5
7
|
export interface SortDirective {
|
|
6
|
-
/** The
|
|
7
|
-
|
|
8
|
+
/** The expression to sort by. */
|
|
9
|
+
value: Expression;
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* Whether to sort in descending order for this column.
|