@milaboratories/pl-model-middle-layer 1.29.0 → 1.29.1
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/block_meta/block_description.d.ts +140 -140
- package/dist/block_meta/block_manifest.d.ts +312 -312
- package/dist/block_meta/block_meta.d.ts +72 -72
- package/dist/block_meta/content_types.d.ts +8 -8
- package/dist/block_registry/overview.d.ts +1056 -1056
- package/dist/pframe/internal_api/api_read.d.ts +2 -24
- package/dist/pframe/internal_api/api_read.d.ts.map +1 -1
- package/dist/pframe/internal_api/index.d.ts +4 -4
- package/dist/pframe/internal_api/pframe.d.ts +4 -31
- package/dist/pframe/internal_api/pframe.d.ts.map +1 -1
- package/dist/pframe/internal_api/table.d.ts +3 -67
- package/dist/pframe/internal_api/table.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/pframe/internal_api/api_read.ts +1 -28
- package/src/pframe/internal_api/pframe.ts +3 -33
- package/src/pframe/internal_api/table.ts +2 -73
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PTableV11 } from "./table.js";
|
|
2
2
|
import { PTableId } from "./common.js";
|
|
3
3
|
import { DataQuery, DataQueryBooleanExpression, PObjectId, UniqueValuesResponse } from "@milaboratories/pl-model-common";
|
|
4
4
|
|
|
@@ -22,32 +22,10 @@ interface UniqueValuesRequestV2 {
|
|
|
22
22
|
/** Max number of values to return. Overflow is reported in the response. */
|
|
23
23
|
readonly limit: number;
|
|
24
24
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Read interface exposed by PFrames library. Returns the {@link PTableV10}
|
|
27
|
-
* table view, which provides the `export` method.
|
|
28
|
-
*
|
|
29
|
-
* Spec-side operations (finding columns, listing columns, retrieving
|
|
30
|
-
* column specs, computing axis integrations) are not part of this
|
|
31
|
-
* surface — callers cache column specs themselves or route through
|
|
32
|
-
* WASM-spec. The data-side `createTable` accepts a pre-lowered
|
|
33
|
-
* `DataQuery`; `getUniqueValues` takes pre-resolved indices via
|
|
34
|
-
* {@link UniqueValuesRequestV2}.
|
|
35
|
-
*/
|
|
36
|
-
interface PFrameReadAPIV13 {
|
|
37
|
-
/** Creates table from a pre-lowered data query. */
|
|
38
|
-
createTable(tableId: PTableId, dataQuery: DataQuery): PTableV10;
|
|
39
|
-
/** Calculate set of unique values for a specific axis for the filtered set of records. */
|
|
40
|
-
getUniqueValues(request: UniqueValuesRequestV2, ops?: {
|
|
41
|
-
signal?: AbortSignal;
|
|
42
|
-
}): Promise<UniqueValuesResponse>;
|
|
43
|
-
}
|
|
44
25
|
/**
|
|
45
26
|
* Read interface exposed by PFrames library. Returns the {@link PTableV11}
|
|
46
27
|
* table view, whose `export` takes a column-index → header map.
|
|
47
28
|
*
|
|
48
|
-
* Identical to {@link PFrameReadAPIV13} apart from the table view returned by
|
|
49
|
-
* `createTable`.
|
|
50
|
-
*
|
|
51
29
|
* Spec-side operations (finding columns, listing columns, retrieving
|
|
52
30
|
* column specs, computing axis integrations) are not part of this
|
|
53
31
|
* surface — callers cache column specs themselves or route through
|
|
@@ -64,5 +42,5 @@ interface PFrameReadAPIV14 {
|
|
|
64
42
|
}): Promise<UniqueValuesResponse>;
|
|
65
43
|
}
|
|
66
44
|
//#endregion
|
|
67
|
-
export {
|
|
45
|
+
export { PFrameReadAPIV14, UniqueValuesRequestV2 };
|
|
68
46
|
//# sourceMappingURL=api_read.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api_read.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_read.ts"],"mappings":";;;;;;;AAeA;;;;UAAiB,qBAAA;EAEI;EAAA,SAAV,QAAA,EAAU,SAAA;EASV;;;;EAAA,SAHA,SAAA;EAoBM;EAAA,SAjBN,OAAA,EAAS,0BAAA;;WAGT,KAAA;AAAA;;;;;;;;;;;;UAcM,gBAAA;EAEuC;EAAtD,WAAA,CAAY,OAAA,EAAS,QAAA,EAAU,SAAA,EAAW,SAAA,GAAY,SAAA;EAI3C;EADX,eAAA,CACE,OAAA,EAAS,qBAAA,EACT,GAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA,CAAQ,oBAAA;AAAA
|
|
1
|
+
{"version":3,"file":"api_read.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_read.ts"],"mappings":";;;;;;;AAeA;;;;UAAiB,qBAAA;EAEI;EAAA,SAAV,QAAA,EAAU,SAAA;EASV;;;;EAAA,SAHA,SAAA;EAoBM;EAAA,SAjBN,OAAA,EAAS,0BAAA;;WAGT,KAAA;AAAA;;;;;;;;;;;;UAcM,gBAAA;EAEuC;EAAtD,WAAA,CAAY,OAAA,EAAS,QAAA,EAAU,SAAA,EAAW,SAAA,GAAY,SAAA;EAI3C;EADX,eAAA,CACE,OAAA,EAAS,qBAAA,EACT,GAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA,CAAQ,oBAAA;AAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PTableV11 } from "./table.js";
|
|
2
2
|
import { AxisQualification, ColumnAxesWithQualifications, ConstantAxisFilter, Logger, PFrameId, PTableId } from "./common.js";
|
|
3
|
-
import {
|
|
3
|
+
import { PFrameReadAPIV14, UniqueValuesRequestV2 } from "./api_read.js";
|
|
4
4
|
import { BaseObjectStore, FileRange, FsStoreOptions, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions } from "./http_helpers.js";
|
|
5
5
|
import { AddColumnEntry, DataInfo, DataInfoExtension, FilePath, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV5, SpecExtension } from "./api_factory.js";
|
|
6
6
|
import { DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse } from "./delete_column.js";
|
|
@@ -8,12 +8,12 @@ import { DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColu
|
|
|
8
8
|
import { FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit } from "./find_columns.js";
|
|
9
9
|
import { EvaluateQueryResponse, LegacyQuery, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmV2, PFrameWasmV3 } from "./api_wasm.js";
|
|
10
10
|
import { ArtificialColumnJoinEntry, ColumnJoinEntry, CreateTableRequestV4, FullJoinV4, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, OuterJoinV4, SlicedColumnJoinEntry } from "./create_table.js";
|
|
11
|
-
import {
|
|
11
|
+
import { PFrameFactoryV7, PFrameOptionsV2, PFrameV16 } from "./pframe.js";
|
|
12
12
|
import { SingleAxisSelector as SingleAxisSelector$1 } from "@milaboratories/pl-model-common";
|
|
13
13
|
|
|
14
14
|
//#region src/pframe/internal_api/index.d.ts
|
|
15
15
|
declare namespace index_d_exports {
|
|
16
|
-
export { AddColumnEntry, ArtificialColumnJoinEntry, AxisQualification, BaseObjectStore, ColumnAxesWithQualifications, ColumnJoinEntry, ConstantAxisFilter, CreateTableRequestV4, DataInfo, DataInfoExtension, DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse, DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, EvaluateQueryResponse, FilePath, FileRange, FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit, FsStoreOptions, FullJoinV4, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, LegacyQuery, Logger, MatcherMap, MultiAxisSelector, MultiColumnSelector, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, OuterJoinV4, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV5,
|
|
16
|
+
export { AddColumnEntry, ArtificialColumnJoinEntry, AxisQualification, BaseObjectStore, ColumnAxesWithQualifications, ColumnJoinEntry, ConstantAxisFilter, CreateTableRequestV4, DataInfo, DataInfoExtension, DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse, DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, EvaluateQueryResponse, FilePath, FileRange, FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit, FsStoreOptions, FullJoinV4, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, LegacyQuery, Logger, MatcherMap, MultiAxisSelector, MultiColumnSelector, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, OuterJoinV4, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV5, PFrameFactoryV7, PFrameId, PFrameOptionsV2, PFrameReadAPIV14, PFrameV16, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmV2, PFrameWasmV3, PTableId, PTableV11, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions, SingleAxisSelector$1 as SingleAxisSelector, SlicedColumnJoinEntry, SpecExtension, StringMatcher, UniqueValuesRequestV2 };
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
19
|
export { index_d_exports };
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import { Logger, PFrameId } from "./common.js";
|
|
2
|
-
import {
|
|
2
|
+
import { PFrameReadAPIV14 } from "./api_read.js";
|
|
3
3
|
import { PFrameFactoryAPIV5 } from "./api_factory.js";
|
|
4
4
|
|
|
5
5
|
//#region src/pframe/internal_api/pframe.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* Full PFrame surface — factory operations plus data-side reads. Exposes
|
|
8
|
-
* {@link
|
|
9
|
-
|
|
10
|
-
interface PFrameV15 extends PFrameFactoryAPIV5, PFrameReadAPIV13 {}
|
|
11
|
-
/**
|
|
12
|
-
* Full PFrame surface — factory operations plus data-side reads.
|
|
13
|
-
*
|
|
14
|
-
* Identical to {@link PFrameV15} but exposes {@link PFrameReadAPIV14}, whose
|
|
15
|
-
* tables' `export` takes a column-index → header map.
|
|
8
|
+
* {@link PFrameReadAPIV14}, whose tables' `export` takes a column-index →
|
|
9
|
+
* header map.
|
|
16
10
|
*/
|
|
17
11
|
interface PFrameV16 extends PFrameFactoryAPIV5, PFrameReadAPIV14 {}
|
|
18
12
|
type PFrameOptionsV2 = {
|
|
@@ -20,31 +14,10 @@ type PFrameOptionsV2 = {
|
|
|
20
14
|
spillPath: string; /** Logger instance, no logging is performed when not provided */
|
|
21
15
|
logger?: Logger;
|
|
22
16
|
};
|
|
23
|
-
/**
|
|
24
|
-
* PFrame management functions exposed by the PFrame module. Creates
|
|
25
|
-
* {@link PFrameV15} instances, whose tables provide the `export` method.
|
|
26
|
-
*/
|
|
27
|
-
interface PFrameFactoryV6 {
|
|
28
|
-
/**
|
|
29
|
-
* Create a new PFrame instance.
|
|
30
|
-
* @warning Use concurrency limiting to avoid OOM crashes when multiple instances are simultaneously in use.
|
|
31
|
-
*/
|
|
32
|
-
createPFrame(options: PFrameOptionsV2): PFrameV15;
|
|
33
|
-
/**
|
|
34
|
-
* Dump active allocations from all PFrames instances in pprof format.
|
|
35
|
-
* The result of this function should be saved as `profile.pb.gz`.
|
|
36
|
-
* Use {@link https://pprof.me/} or {@link https://www.speedscope.app/}
|
|
37
|
-
* to view the allocation flamechart.
|
|
38
|
-
* @warning This method will always reject on Windows!
|
|
39
|
-
*/
|
|
40
|
-
pprofDump: () => Promise<Uint8Array>;
|
|
41
|
-
}
|
|
42
17
|
/**
|
|
43
18
|
* PFrame management functions exposed by the PFrame module. Creates
|
|
44
19
|
* {@link PFrameV16} instances, whose tables' `export` takes a
|
|
45
20
|
* column-index → header map.
|
|
46
|
-
*
|
|
47
|
-
* Identical to {@link PFrameFactoryV6} apart from the created PFrame surface.
|
|
48
21
|
*/
|
|
49
22
|
interface PFrameFactoryV7 {
|
|
50
23
|
/**
|
|
@@ -62,5 +35,5 @@ interface PFrameFactoryV7 {
|
|
|
62
35
|
pprofDump: () => Promise<Uint8Array>;
|
|
63
36
|
}
|
|
64
37
|
//#endregion
|
|
65
|
-
export {
|
|
38
|
+
export { PFrameFactoryV7, PFrameOptionsV2, PFrameV16 };
|
|
66
39
|
//# sourceMappingURL=pframe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pframe.d.ts","names":[],"sources":["../../../src/pframe/internal_api/pframe.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"pframe.d.ts","names":[],"sources":["../../../src/pframe/internal_api/pframe.ts"],"mappings":";;;;;;AAUA;;;;UAAiB,SAAA,SAAkB,kBAAA,EAAoB,gBAAA;AAAA,KAE3C,eAAA;uCAEV,OAAA,EAAS,QAAA,EAAT;EAEA,SAAA;EAEA,MAAA,GAAS,MAAA;AAAA;;;AAQX;;;UAAiB,eAAA;EAKyB;;;;EAAxC,YAAA,CAAa,OAAA,EAAS,eAAA,GAAkB,SAAA;EAAxC;;;;;;;EASA,SAAA,QAAiB,OAAA,CAAQ,UAAA;AAAA"}
|
|
@@ -4,72 +4,8 @@ import { PTableShape, PTableVector, TableRange } from "@milaboratories/pl-model-
|
|
|
4
4
|
/**
|
|
5
5
|
* Table view returned by `createTable`.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* The table's column spec is owned by the caller — selector → index
|
|
10
|
-
* resolution runs on the caller side via WASM-spec.
|
|
11
|
-
*/
|
|
12
|
-
interface PTableV10 extends Disposable {
|
|
13
|
-
/**
|
|
14
|
-
* Get PTable disk footprint in bytes.
|
|
15
|
-
*
|
|
16
|
-
* @param ops.withPredecessors When true, the footprint includes
|
|
17
|
-
* every registered predecessor table reachable through the
|
|
18
|
-
* query lineage. When false or omitted, only this table's own
|
|
19
|
-
* materialised data is counted.
|
|
20
|
-
*
|
|
21
|
-
* Warning: This call materializes the join.
|
|
22
|
-
*/
|
|
23
|
-
getFootprint(ops?: {
|
|
24
|
-
withPredecessors?: boolean;
|
|
25
|
-
signal?: AbortSignal;
|
|
26
|
-
}): Promise<number>;
|
|
27
|
-
/**
|
|
28
|
-
* Unified table shape
|
|
29
|
-
* Warning: This call materializes the join.
|
|
30
|
-
*/
|
|
31
|
-
getShape(ops?: {
|
|
32
|
-
signal?: AbortSignal;
|
|
33
|
-
}): Promise<PTableShape>;
|
|
34
|
-
/**
|
|
35
|
-
* Retrieve the data from the table. To retrieve only data required, it can be
|
|
36
|
-
* sliced both horizontally ({@link columnIndices}) and vertically
|
|
37
|
-
* ({@link range}).
|
|
38
|
-
* This call materializes the join.
|
|
39
|
-
*
|
|
40
|
-
* @param columnIndices unified indices of columns to be retrieved
|
|
41
|
-
* @param range optionally limit the range of records to retrieve
|
|
42
|
-
* */
|
|
43
|
-
getData(columnIndices: number[], ops?: {
|
|
44
|
-
range?: TableRange;
|
|
45
|
-
signal?: AbortSignal;
|
|
46
|
-
}): Promise<PTableVector[]>;
|
|
47
|
-
/**
|
|
48
|
-
* Stream the full, sorted table to a file at `path`. The output format is
|
|
49
|
-
* selected from the file extension: `csv`, `tsv`, `parquet`, or `xlsx`.
|
|
50
|
-
* Writing is bounded-memory.
|
|
51
|
-
* This call materializes the join.
|
|
52
|
-
*
|
|
53
|
-
* @param path destination file path; its extension selects the format
|
|
54
|
-
* @param headers column names in unified order (axes first, then data
|
|
55
|
-
* columns). Length must equal the number of table fields — the data layer
|
|
56
|
-
* is name-independent, so names are supplied by the caller.
|
|
57
|
-
*
|
|
58
|
-
* @remarks For `xlsx` the caller must ensure the row count is below Excel's
|
|
59
|
-
* 1,048,576-row per-sheet limit.
|
|
60
|
-
*/
|
|
61
|
-
export(path: string, headers: string[], ops?: {
|
|
62
|
-
signal?: AbortSignal;
|
|
63
|
-
}): Promise<void>;
|
|
64
|
-
/** Deallocates all underlying resources */
|
|
65
|
-
dispose(): void;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Table view returned by `createTable`.
|
|
69
|
-
*
|
|
70
|
-
* Identical to {@link PTableV10} but {@link PTableV11.export} takes a
|
|
71
|
-
* `headers` map (unified column index → header name) that both selects the
|
|
72
|
-
* columns to export and names them, instead of a positional `string[]`.
|
|
7
|
+
* {@link PTableV11.export} takes a `headers` map (unified column index →
|
|
8
|
+
* header name) that both selects the columns to export and names them.
|
|
73
9
|
*
|
|
74
10
|
* PTable can be thought as having a composite primary key, consisting
|
|
75
11
|
* of axes, and a set of data columns derived from PColumn values.
|
|
@@ -134,5 +70,5 @@ interface PTableV11 extends Disposable {
|
|
|
134
70
|
dispose(): void;
|
|
135
71
|
}
|
|
136
72
|
//#endregion
|
|
137
|
-
export {
|
|
73
|
+
export { PTableV11 };
|
|
138
74
|
//# sourceMappingURL=table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","names":[],"sources":["../../../src/pframe/internal_api/table.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"table.d.ts","names":[],"sources":["../../../src/pframe/internal_api/table.ts"],"mappings":";;;;;AAaA;;;;;;;;;UAAiB,SAAA,SAAkB,UAAA;EAkCtB;;;;;;;;;;EAvBX,YAAA,CAAa,GAAA;IAAQ,gBAAA;IAA4B,MAAA,GAAS,WAAA;EAAA,IAAgB,OAAA;EAAA;;;;EAM1E,QAAA,CAAS,GAAA;IAAQ,MAAA,GAAS,WAAA;EAAA,IAAgB,OAAA,CAAQ,WAAA;EAWlD;;;;;;;;;EAAA,OAAA,CACE,aAAA,YACA,GAAA;IACE,KAAA,GAAQ,UAAA;IACR,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA,CAAQ,YAAA;EAsBP;;;;;;;;;;;;;;;;EAJJ,MAAA,CACE,IAAA,UACA,OAAA,EAAS,MAAA,kBACT,GAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA;;EAGH,OAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pl-model-middle-layer",
|
|
3
|
-
"version": "1.29.
|
|
3
|
+
"version": "1.29.1",
|
|
4
4
|
"description": "Common model between middle layer and non-block UI code",
|
|
5
5
|
"files": [
|
|
6
6
|
"./dist/**/*",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "~24.5.2",
|
|
28
28
|
"typescript": "~5.9.3",
|
|
29
|
-
"@milaboratories/ts-builder": "1.5.0",
|
|
30
29
|
"@milaboratories/ts-configs": "1.2.3",
|
|
30
|
+
"@milaboratories/ts-builder": "1.5.0",
|
|
31
31
|
"@milaboratories/build-configs": "2.0.0"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
@@ -4,7 +4,7 @@ import type {
|
|
|
4
4
|
DataQuery,
|
|
5
5
|
DataQueryBooleanExpression,
|
|
6
6
|
} from "@milaboratories/pl-model-common";
|
|
7
|
-
import type {
|
|
7
|
+
import type { PTableV11 } from "./table";
|
|
8
8
|
import type { PTableId } from "./common";
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -30,37 +30,10 @@ export interface UniqueValuesRequestV2 {
|
|
|
30
30
|
readonly limit: number;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
/**
|
|
34
|
-
* Read interface exposed by PFrames library. Returns the {@link PTableV10}
|
|
35
|
-
* table view, which provides the `export` method.
|
|
36
|
-
*
|
|
37
|
-
* Spec-side operations (finding columns, listing columns, retrieving
|
|
38
|
-
* column specs, computing axis integrations) are not part of this
|
|
39
|
-
* surface — callers cache column specs themselves or route through
|
|
40
|
-
* WASM-spec. The data-side `createTable` accepts a pre-lowered
|
|
41
|
-
* `DataQuery`; `getUniqueValues` takes pre-resolved indices via
|
|
42
|
-
* {@link UniqueValuesRequestV2}.
|
|
43
|
-
*/
|
|
44
|
-
export interface PFrameReadAPIV13 {
|
|
45
|
-
/** Creates table from a pre-lowered data query. */
|
|
46
|
-
createTable(tableId: PTableId, dataQuery: DataQuery): PTableV10;
|
|
47
|
-
|
|
48
|
-
/** Calculate set of unique values for a specific axis for the filtered set of records. */
|
|
49
|
-
getUniqueValues(
|
|
50
|
-
request: UniqueValuesRequestV2,
|
|
51
|
-
ops?: {
|
|
52
|
-
signal?: AbortSignal;
|
|
53
|
-
},
|
|
54
|
-
): Promise<UniqueValuesResponse>;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
33
|
/**
|
|
58
34
|
* Read interface exposed by PFrames library. Returns the {@link PTableV11}
|
|
59
35
|
* table view, whose `export` takes a column-index → header map.
|
|
60
36
|
*
|
|
61
|
-
* Identical to {@link PFrameReadAPIV13} apart from the table view returned by
|
|
62
|
-
* `createTable`.
|
|
63
|
-
*
|
|
64
37
|
* Spec-side operations (finding columns, listing columns, retrieving
|
|
65
38
|
* column specs, computing axis integrations) are not part of this
|
|
66
39
|
* surface — callers cache column specs themselves or route through
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
import type { PFrameFactoryAPIV5 } from "./api_factory";
|
|
2
|
-
import type {
|
|
2
|
+
import type { PFrameReadAPIV14 } from "./api_read";
|
|
3
3
|
import type { Logger } from "./common";
|
|
4
4
|
import type { PFrameId } from "./common";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Full PFrame surface — factory operations plus data-side reads. Exposes
|
|
8
|
-
* {@link
|
|
9
|
-
|
|
10
|
-
export interface PFrameV15 extends PFrameFactoryAPIV5, PFrameReadAPIV13 {}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Full PFrame surface — factory operations plus data-side reads.
|
|
14
|
-
*
|
|
15
|
-
* Identical to {@link PFrameV15} but exposes {@link PFrameReadAPIV14}, whose
|
|
16
|
-
* tables' `export` takes a column-index → header map.
|
|
8
|
+
* {@link PFrameReadAPIV14}, whose tables' `export` takes a column-index →
|
|
9
|
+
* header map.
|
|
17
10
|
*/
|
|
18
11
|
export interface PFrameV16 extends PFrameFactoryAPIV5, PFrameReadAPIV14 {}
|
|
19
12
|
|
|
@@ -26,33 +19,10 @@ export type PFrameOptionsV2 = {
|
|
|
26
19
|
logger?: Logger;
|
|
27
20
|
};
|
|
28
21
|
|
|
29
|
-
/**
|
|
30
|
-
* PFrame management functions exposed by the PFrame module. Creates
|
|
31
|
-
* {@link PFrameV15} instances, whose tables provide the `export` method.
|
|
32
|
-
*/
|
|
33
|
-
export interface PFrameFactoryV6 {
|
|
34
|
-
/**
|
|
35
|
-
* Create a new PFrame instance.
|
|
36
|
-
* @warning Use concurrency limiting to avoid OOM crashes when multiple instances are simultaneously in use.
|
|
37
|
-
*/
|
|
38
|
-
createPFrame(options: PFrameOptionsV2): PFrameV15;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Dump active allocations from all PFrames instances in pprof format.
|
|
42
|
-
* The result of this function should be saved as `profile.pb.gz`.
|
|
43
|
-
* Use {@link https://pprof.me/} or {@link https://www.speedscope.app/}
|
|
44
|
-
* to view the allocation flamechart.
|
|
45
|
-
* @warning This method will always reject on Windows!
|
|
46
|
-
*/
|
|
47
|
-
pprofDump: () => Promise<Uint8Array>;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
22
|
/**
|
|
51
23
|
* PFrame management functions exposed by the PFrame module. Creates
|
|
52
24
|
* {@link PFrameV16} instances, whose tables' `export` takes a
|
|
53
25
|
* column-index → header map.
|
|
54
|
-
*
|
|
55
|
-
* Identical to {@link PFrameFactoryV6} apart from the created PFrame surface.
|
|
56
26
|
*/
|
|
57
27
|
export interface PFrameFactoryV7 {
|
|
58
28
|
/**
|
|
@@ -3,79 +3,8 @@ import type { PTableShape, PTableVector, TableRange } from "@milaboratories/pl-m
|
|
|
3
3
|
/**
|
|
4
4
|
* Table view returned by `createTable`.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* The table's column spec is owned by the caller — selector → index
|
|
9
|
-
* resolution runs on the caller side via WASM-spec.
|
|
10
|
-
*/
|
|
11
|
-
export interface PTableV10 extends Disposable {
|
|
12
|
-
/**
|
|
13
|
-
* Get PTable disk footprint in bytes.
|
|
14
|
-
*
|
|
15
|
-
* @param ops.withPredecessors When true, the footprint includes
|
|
16
|
-
* every registered predecessor table reachable through the
|
|
17
|
-
* query lineage. When false or omitted, only this table's own
|
|
18
|
-
* materialised data is counted.
|
|
19
|
-
*
|
|
20
|
-
* Warning: This call materializes the join.
|
|
21
|
-
*/
|
|
22
|
-
getFootprint(ops?: { withPredecessors?: boolean; signal?: AbortSignal }): Promise<number>;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Unified table shape
|
|
26
|
-
* Warning: This call materializes the join.
|
|
27
|
-
*/
|
|
28
|
-
getShape(ops?: { signal?: AbortSignal }): Promise<PTableShape>;
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Retrieve the data from the table. To retrieve only data required, it can be
|
|
32
|
-
* sliced both horizontally ({@link columnIndices}) and vertically
|
|
33
|
-
* ({@link range}).
|
|
34
|
-
* This call materializes the join.
|
|
35
|
-
*
|
|
36
|
-
* @param columnIndices unified indices of columns to be retrieved
|
|
37
|
-
* @param range optionally limit the range of records to retrieve
|
|
38
|
-
* */
|
|
39
|
-
getData(
|
|
40
|
-
columnIndices: number[],
|
|
41
|
-
ops?: {
|
|
42
|
-
range?: TableRange;
|
|
43
|
-
signal?: AbortSignal;
|
|
44
|
-
},
|
|
45
|
-
): Promise<PTableVector[]>;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Stream the full, sorted table to a file at `path`. The output format is
|
|
49
|
-
* selected from the file extension: `csv`, `tsv`, `parquet`, or `xlsx`.
|
|
50
|
-
* Writing is bounded-memory.
|
|
51
|
-
* This call materializes the join.
|
|
52
|
-
*
|
|
53
|
-
* @param path destination file path; its extension selects the format
|
|
54
|
-
* @param headers column names in unified order (axes first, then data
|
|
55
|
-
* columns). Length must equal the number of table fields — the data layer
|
|
56
|
-
* is name-independent, so names are supplied by the caller.
|
|
57
|
-
*
|
|
58
|
-
* @remarks For `xlsx` the caller must ensure the row count is below Excel's
|
|
59
|
-
* 1,048,576-row per-sheet limit.
|
|
60
|
-
*/
|
|
61
|
-
export(
|
|
62
|
-
path: string,
|
|
63
|
-
headers: string[],
|
|
64
|
-
ops?: {
|
|
65
|
-
signal?: AbortSignal;
|
|
66
|
-
},
|
|
67
|
-
): Promise<void>;
|
|
68
|
-
|
|
69
|
-
/** Deallocates all underlying resources */
|
|
70
|
-
dispose(): void;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Table view returned by `createTable`.
|
|
75
|
-
*
|
|
76
|
-
* Identical to {@link PTableV10} but {@link PTableV11.export} takes a
|
|
77
|
-
* `headers` map (unified column index → header name) that both selects the
|
|
78
|
-
* columns to export and names them, instead of a positional `string[]`.
|
|
6
|
+
* {@link PTableV11.export} takes a `headers` map (unified column index →
|
|
7
|
+
* header name) that both selects the columns to export and names them.
|
|
79
8
|
*
|
|
80
9
|
* PTable can be thought as having a composite primary key, consisting
|
|
81
10
|
* of axes, and a set of data columns derived from PColumn values.
|