@milaboratories/pl-model-middle-layer 1.12.7 → 1.12.9
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/_virtual/_rolldown/runtime.cjs +43 -0
- package/dist/_virtual/_rolldown/runtime.js +18 -0
- package/dist/author_marker.d.ts +2 -5
- package/dist/block_meta/block_components.cjs +21 -29
- package/dist/block_meta/block_components.cjs.map +1 -1
- package/dist/block_meta/block_components.d.ts +537 -533
- package/dist/block_meta/block_components.js +20 -27
- package/dist/block_meta/block_components.js.map +1 -1
- package/dist/block_meta/block_description.cjs +22 -25
- package/dist/block_meta/block_description.cjs.map +1 -1
- package/dist/block_meta/block_description.d.ts +1815 -1812
- package/dist/block_meta/block_description.js +20 -22
- package/dist/block_meta/block_description.js.map +1 -1
- package/dist/block_meta/block_id.cjs +21 -28
- package/dist/block_meta/block_id.cjs.map +1 -1
- package/dist/block_meta/block_id.d.ts +30 -26
- package/dist/block_meta/block_id.js +20 -26
- package/dist/block_meta/block_id.js.map +1 -1
- package/dist/block_meta/block_manifest.cjs +24 -29
- package/dist/block_meta/block_manifest.cjs.map +1 -1
- package/dist/block_meta/block_manifest.d.ts +4778 -4773
- package/dist/block_meta/block_manifest.js +20 -24
- package/dist/block_meta/block_manifest.js.map +1 -1
- package/dist/block_meta/block_meta.cjs +35 -50
- package/dist/block_meta/block_meta.cjs.map +1 -1
- package/dist/block_meta/block_meta.d.ts +810 -806
- package/dist/block_meta/block_meta.js +31 -45
- package/dist/block_meta/block_meta.js.map +1 -1
- package/dist/block_meta/common.d.ts +5 -2
- package/dist/block_meta/content_conversion.cjs +19 -16
- package/dist/block_meta/content_conversion.cjs.map +1 -1
- package/dist/block_meta/content_conversion.d.ts +7 -3
- package/dist/block_meta/content_conversion.js +19 -15
- package/dist/block_meta/content_conversion.js.map +1 -1
- package/dist/block_meta/content_types.cjs +77 -187
- package/dist/block_meta/content_types.cjs.map +1 -1
- package/dist/block_meta/content_types.d.ts +382 -378
- package/dist/block_meta/content_types.js +76 -185
- package/dist/block_meta/content_types.js.map +1 -1
- package/dist/block_meta/index.cjs +8 -0
- package/dist/block_meta/index.d.ts +9 -10
- package/dist/block_meta/index.js +8 -0
- package/dist/block_meta/semver.cjs +6 -9
- package/dist/block_meta/semver.cjs.map +1 -1
- package/dist/block_meta/semver.d.ts +5 -1
- package/dist/block_meta/semver.js +5 -7
- package/dist/block_meta/semver.js.map +1 -1
- package/dist/block_registry/block_pack_spec.cjs +30 -34
- package/dist/block_registry/block_pack_spec.cjs.map +1 -1
- package/dist/block_registry/block_pack_spec.d.ts +172 -168
- package/dist/block_registry/block_pack_spec.js +29 -32
- package/dist/block_registry/block_pack_spec.js.map +1 -1
- package/dist/block_registry/index.cjs +3 -0
- package/dist/block_registry/index.d.ts +3 -4
- package/dist/block_registry/index.js +3 -0
- package/dist/block_registry/overview.cjs +55 -66
- package/dist/block_registry/overview.cjs.map +1 -1
- package/dist/block_registry/overview.d.ts +10345 -10340
- package/dist/block_registry/overview.js +54 -64
- package/dist/block_registry/overview.js.map +1 -1
- package/dist/block_registry/registry_spec.cjs +17 -16
- package/dist/block_registry/registry_spec.cjs.map +1 -1
- package/dist/block_registry/registry_spec.d.ts +147 -143
- package/dist/block_registry/registry_spec.js +16 -14
- package/dist/block_registry/registry_spec.js.map +1 -1
- package/dist/block_settings.cjs +3 -2
- package/dist/block_settings.cjs.map +1 -1
- package/dist/block_settings.d.ts +12 -10
- package/dist/block_settings.js +3 -1
- package/dist/block_settings.js.map +1 -1
- package/dist/block_state.d.ts +14 -14
- package/dist/index.cjs +102 -99
- package/dist/index.d.ts +25 -12
- package/dist/index.js +18 -16
- package/dist/json.cjs +16 -13
- package/dist/json.cjs.map +1 -1
- package/dist/json.d.ts +11 -7
- package/dist/json.js +14 -11
- package/dist/json.js.map +1 -1
- package/dist/pframe/index.d.ts +1 -2
- package/dist/pframe/internal_api/api_factory.cjs +3 -2
- package/dist/pframe/internal_api/api_factory.cjs.map +1 -1
- package/dist/pframe/internal_api/api_factory.d.ts +40 -36
- package/dist/pframe/internal_api/api_factory.js +3 -1
- package/dist/pframe/internal_api/api_factory.js.map +1 -1
- package/dist/pframe/internal_api/api_read.d.ts +40 -36
- package/dist/pframe/internal_api/api_wasm.d.ts +71 -70
- package/dist/pframe/internal_api/common.d.ts +18 -14
- package/dist/pframe/internal_api/create_table.d.ts +46 -42
- package/dist/pframe/internal_api/delete_column.d.ts +11 -7
- package/dist/pframe/internal_api/find_columns.d.ts +21 -17
- package/dist/pframe/internal_api/http_helpers.cjs +36 -27
- package/dist/pframe/internal_api/http_helpers.cjs.map +1 -1
- package/dist/pframe/internal_api/http_helpers.d.ts +153 -170
- package/dist/pframe/internal_api/http_helpers.js +36 -26
- package/dist/pframe/internal_api/http_helpers.js.map +1 -1
- package/dist/pframe/internal_api/index.cjs +18 -10
- package/dist/pframe/internal_api/index.cjs.map +1 -1
- package/dist/pframe/internal_api/index.d.ts +18 -11
- package/dist/pframe/internal_api/index.js +15 -3
- package/dist/pframe/internal_api/index.js.map +1 -1
- package/dist/pframe/internal_api/pframe.d.ts +26 -27
- package/dist/pframe/internal_api/table.d.ts +52 -48
- package/dist/project.d.ts +6 -3
- package/dist/project_list.d.ts +18 -14
- package/dist/project_overview.d.ts +135 -143
- package/dist/update_info.d.ts +10 -5
- package/package.json +5 -5
- package/dist/author_marker.d.ts.map +0 -1
- package/dist/block_meta/block_components.d.ts.map +0 -1
- package/dist/block_meta/block_description.d.ts.map +0 -1
- package/dist/block_meta/block_id.d.ts.map +0 -1
- package/dist/block_meta/block_manifest.d.ts.map +0 -1
- package/dist/block_meta/block_meta.d.ts.map +0 -1
- package/dist/block_meta/common.d.ts.map +0 -1
- package/dist/block_meta/content_conversion.d.ts.map +0 -1
- package/dist/block_meta/content_types.d.ts.map +0 -1
- package/dist/block_meta/index.d.ts.map +0 -1
- package/dist/block_meta/semver.d.ts.map +0 -1
- package/dist/block_registry/block_pack_spec.d.ts.map +0 -1
- package/dist/block_registry/index.d.ts.map +0 -1
- package/dist/block_registry/overview.d.ts.map +0 -1
- package/dist/block_registry/registry_spec.d.ts.map +0 -1
- package/dist/block_settings.d.ts.map +0 -1
- package/dist/block_state.d.ts.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/json.d.ts.map +0 -1
- package/dist/pframe/index.d.ts.map +0 -1
- package/dist/pframe/internal_api/api_factory.d.ts.map +0 -1
- package/dist/pframe/internal_api/api_read.d.ts.map +0 -1
- package/dist/pframe/internal_api/api_wasm.d.ts.map +0 -1
- package/dist/pframe/internal_api/common.d.ts.map +0 -1
- package/dist/pframe/internal_api/create_table.d.ts.map +0 -1
- package/dist/pframe/internal_api/delete_column.d.ts.map +0 -1
- package/dist/pframe/internal_api/find_columns.d.ts.map +0 -1
- package/dist/pframe/internal_api/http_helpers.d.ts.map +0 -1
- package/dist/pframe/internal_api/index.d.ts.map +0 -1
- package/dist/pframe/internal_api/pframe.d.ts.map +0 -1
- package/dist/pframe/internal_api/table.d.ts.map +0 -1
- package/dist/project.d.ts.map +0 -1
- package/dist/project_list.d.ts.map +0 -1
- package/dist/project_overview.d.ts.map +0 -1
- package/dist/update_info.d.ts.map +0 -1
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { HttpServerInfo } from "./http_helpers.js";
|
|
2
|
+
import { BinaryPartitionedDataInfo, Branded, JsonDataInfo, JsonPartitionedDataInfo, PColumnSpec, PObjectId, ParquetChunk, ParquetPartitionedDataInfo } from "@milaboratories/pl-model-common";
|
|
3
|
+
|
|
4
|
+
//#region src/pframe/internal_api/api_factory.d.ts
|
|
3
5
|
/** PColumn spec file extension */
|
|
4
|
-
|
|
6
|
+
declare const SpecExtension: ".spec";
|
|
5
7
|
/** PColumn data info file extension */
|
|
6
|
-
|
|
8
|
+
declare const DataInfoExtension: ".datainfo";
|
|
7
9
|
/** Abstract identifier of a data blob that can be requested from the storage backend */
|
|
8
|
-
|
|
10
|
+
type PFrameBlobId = Branded<string, "PFrameInternal.PFrameBlobId">;
|
|
9
11
|
/** Path of the file containing requested data (blob). This path is returned by
|
|
10
12
|
* {@link BlobPathResolver} as soon as blob materialized in the file system. */
|
|
11
|
-
|
|
13
|
+
type FilePath = string;
|
|
12
14
|
/** Data source allows PFrame to retrieve the data blobs for columns with assigned data info. */
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
interface PFrameDataSourceV2 {
|
|
16
|
+
/**
|
|
17
|
+
* PFrame may notify storage backend about its plans to use particular blobs in the future.
|
|
18
|
+
* Storage backend will do its best to preload specified blob so the subsequent
|
|
19
|
+
* {@link resolveBlob} will quickly return preloaded file path.
|
|
20
|
+
*/
|
|
21
|
+
preloadBlob(blobIds: PFrameBlobId[]): Promise<void>;
|
|
22
|
+
/** Returns raw blob data given the blob id from {@link DataInfo}. */
|
|
23
|
+
resolveBlobContent(blobId: PFrameBlobId): Promise<Uint8Array>;
|
|
24
|
+
/**
|
|
25
|
+
* Parquet HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer}
|
|
26
|
+
* When not provided, parquet BlobIds would be treated as local file paths.
|
|
27
|
+
*/
|
|
28
|
+
parquetServer?: HttpServerInfo;
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
31
|
* Union type representing all possible data storage formats for PColumn data.
|
|
@@ -31,23 +33,25 @@ export interface PFrameDataSourceV2 {
|
|
|
31
33
|
*
|
|
32
34
|
* @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)
|
|
33
35
|
*/
|
|
34
|
-
|
|
36
|
+
type DataInfo<Blob> = JsonDataInfo | JsonPartitionedDataInfo<Blob> | BinaryPartitionedDataInfo<Blob> | ParquetPartitionedDataInfo<ParquetChunk<Blob>>;
|
|
35
37
|
/** API exposed by PFrames library allowing to create and provide data for
|
|
36
38
|
* PFrame objects */
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
39
|
+
interface PFrameFactoryAPIV4 extends Disposable {
|
|
40
|
+
/** Associates data source with this PFrame */
|
|
41
|
+
setDataSource(dataSource: PFrameDataSourceV2): void;
|
|
42
|
+
/** Adds PColumn without data info */
|
|
43
|
+
addColumnSpec(columnId: PObjectId, columnSpec: PColumnSpec): void;
|
|
44
|
+
/**
|
|
45
|
+
* Assign data info to the specified PColumn.
|
|
46
|
+
* For parquet data info, schema resolution via network is performed during this call.
|
|
47
|
+
*/
|
|
48
|
+
setColumnData(columnId: PObjectId, dataInfo: DataInfo<PFrameBlobId>, options?: {
|
|
49
|
+
signal?: AbortSignal;
|
|
50
|
+
}): Promise<void>;
|
|
51
|
+
/** Releases all the data previously added to PFrame using methods above,
|
|
52
|
+
* any interactions with disposed PFrame will result in exception */
|
|
53
|
+
dispose(): void;
|
|
52
54
|
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { DataInfo, DataInfoExtension, FilePath, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV4, SpecExtension };
|
|
53
57
|
//# sourceMappingURL=api_factory.d.ts.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
//#region src/pframe/internal_api/api_factory.ts
|
|
1
2
|
/** PColumn spec file extension */
|
|
2
3
|
const SpecExtension = ".spec";
|
|
3
4
|
/** PColumn data info file extension */
|
|
4
5
|
const DataInfoExtension = ".datainfo";
|
|
5
6
|
|
|
7
|
+
//#endregion
|
|
6
8
|
export { DataInfoExtension, SpecExtension };
|
|
7
|
-
//# sourceMappingURL=api_factory.js.map
|
|
9
|
+
//# sourceMappingURL=api_factory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api_factory.js","sources":["../../../src/pframe/internal_api/api_factory.ts"],"sourcesContent":["import type {\n BinaryPartitionedDataInfo,\n Branded,\n JsonDataInfo,\n JsonPartitionedDataInfo,\n ParquetChunk,\n ParquetPartitionedDataInfo,\n PColumnSpec,\n PObjectId,\n} from \"@milaboratories/pl-model-common\";\nimport type { HttpServerInfo } from \"./http_helpers\";\n\n/** PColumn spec file extension */\nexport const SpecExtension = \".spec\" as const;\n\n/** PColumn data info file extension */\nexport const DataInfoExtension = \".datainfo\" as const;\n\n/** Abstract identifier of a data blob that can be requested from the storage backend */\nexport type PFrameBlobId = Branded<string, \"PFrameInternal.PFrameBlobId\">;\n\n/** Path of the file containing requested data (blob). This path is returned by\n * {@link BlobPathResolver} as soon as blob materialized in the file system. */\nexport type FilePath = string;\n\n/** Data source allows PFrame to retrieve the data blobs for columns with assigned data info. */\nexport interface PFrameDataSourceV2 {\n /**\n * PFrame may notify storage backend about its plans to use particular blobs in the future.\n * Storage backend will do its best to preload specified blob so the subsequent\n * {@link resolveBlob} will quickly return preloaded file path.\n */\n preloadBlob(blobIds: PFrameBlobId[]): Promise<void>;\n\n /** Returns raw blob data given the blob id from {@link DataInfo}. */\n resolveBlobContent(blobId: PFrameBlobId): Promise<Uint8Array>;\n\n /**\n * Parquet HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer}\n * When not provided, parquet BlobIds would be treated as local file paths.\n */\n parquetServer?: HttpServerInfo;\n}\n\n/**\n * Union type representing all possible data storage formats for PColumn data.\n * The specific format used depends on data size, access patterns, and performance requirements.\n *\n * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)\n */\nexport type DataInfo<Blob> =\n | JsonDataInfo\n | JsonPartitionedDataInfo<Blob>\n | BinaryPartitionedDataInfo<Blob>\n | ParquetPartitionedDataInfo<ParquetChunk<Blob>>;\n\n/** API exposed by PFrames library allowing to create and provide data for\n * PFrame objects */\nexport interface PFrameFactoryAPIV4 extends Disposable {\n /** Associates data source with this PFrame */\n setDataSource(dataSource: PFrameDataSourceV2): void;\n\n /** Adds PColumn without data info */\n addColumnSpec(columnId: PObjectId, columnSpec: PColumnSpec): void;\n\n /**\n * Assign data info to the specified PColumn.\n * For parquet data info, schema resolution via network is performed during this call.\n */\n setColumnData(\n columnId: PObjectId,\n dataInfo: DataInfo<PFrameBlobId>,\n options?: {\n signal?: AbortSignal;\n },\n ): Promise<void>;\n\n /** Releases all the data previously added to PFrame using methods above,\n * any interactions with disposed PFrame will result in exception */\n dispose(): void;\n}\n"],"
|
|
1
|
+
{"version":3,"file":"api_factory.js","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"sourcesContent":["import type {\n BinaryPartitionedDataInfo,\n Branded,\n JsonDataInfo,\n JsonPartitionedDataInfo,\n ParquetChunk,\n ParquetPartitionedDataInfo,\n PColumnSpec,\n PObjectId,\n} from \"@milaboratories/pl-model-common\";\nimport type { HttpServerInfo } from \"./http_helpers\";\n\n/** PColumn spec file extension */\nexport const SpecExtension = \".spec\" as const;\n\n/** PColumn data info file extension */\nexport const DataInfoExtension = \".datainfo\" as const;\n\n/** Abstract identifier of a data blob that can be requested from the storage backend */\nexport type PFrameBlobId = Branded<string, \"PFrameInternal.PFrameBlobId\">;\n\n/** Path of the file containing requested data (blob). This path is returned by\n * {@link BlobPathResolver} as soon as blob materialized in the file system. */\nexport type FilePath = string;\n\n/** Data source allows PFrame to retrieve the data blobs for columns with assigned data info. */\nexport interface PFrameDataSourceV2 {\n /**\n * PFrame may notify storage backend about its plans to use particular blobs in the future.\n * Storage backend will do its best to preload specified blob so the subsequent\n * {@link resolveBlob} will quickly return preloaded file path.\n */\n preloadBlob(blobIds: PFrameBlobId[]): Promise<void>;\n\n /** Returns raw blob data given the blob id from {@link DataInfo}. */\n resolveBlobContent(blobId: PFrameBlobId): Promise<Uint8Array>;\n\n /**\n * Parquet HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer}\n * When not provided, parquet BlobIds would be treated as local file paths.\n */\n parquetServer?: HttpServerInfo;\n}\n\n/**\n * Union type representing all possible data storage formats for PColumn data.\n * The specific format used depends on data size, access patterns, and performance requirements.\n *\n * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)\n */\nexport type DataInfo<Blob> =\n | JsonDataInfo\n | JsonPartitionedDataInfo<Blob>\n | BinaryPartitionedDataInfo<Blob>\n | ParquetPartitionedDataInfo<ParquetChunk<Blob>>;\n\n/** API exposed by PFrames library allowing to create and provide data for\n * PFrame objects */\nexport interface PFrameFactoryAPIV4 extends Disposable {\n /** Associates data source with this PFrame */\n setDataSource(dataSource: PFrameDataSourceV2): void;\n\n /** Adds PColumn without data info */\n addColumnSpec(columnId: PObjectId, columnSpec: PColumnSpec): void;\n\n /**\n * Assign data info to the specified PColumn.\n * For parquet data info, schema resolution via network is performed during this call.\n */\n setColumnData(\n columnId: PObjectId,\n dataInfo: DataInfo<PFrameBlobId>,\n options?: {\n signal?: AbortSignal;\n },\n ): Promise<void>;\n\n /** Releases all the data previously added to PFrame using methods above,\n * any interactions with disposed PFrame will result in exception */\n dispose(): void;\n}\n"],"mappings":";;AAaA,MAAa,gBAAgB;;AAG7B,MAAa,oBAAoB"}
|
|
@@ -1,39 +1,43 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { PTableId } from "./common.js";
|
|
2
|
+
import { FindColumnsRequest, FindColumnsResponse } from "./find_columns.js";
|
|
3
|
+
import { DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse } from "./delete_column.js";
|
|
4
|
+
import { CreateTableRequestV4 } from "./create_table.js";
|
|
5
|
+
import { PTableV8 } from "./table.js";
|
|
6
|
+
import { DataQuery, PColumnInfo, PColumnSpec, PObjectId, PTableColumnSpec, UniqueValuesRequest, UniqueValuesResponse } from "@milaboratories/pl-model-common";
|
|
7
|
+
|
|
8
|
+
//#region src/pframe/internal_api/api_read.d.ts
|
|
7
9
|
/** Read interface exposed by PFrames library */
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
10
|
+
interface PFrameReadAPIV11 {
|
|
11
|
+
/**
|
|
12
|
+
* Finds columns given filtering criteria on column name, annotations etc.
|
|
13
|
+
* and a set of qualified axes specs to find only columns with compatible
|
|
14
|
+
* axes spec.
|
|
15
|
+
*
|
|
16
|
+
* Only column specs are used, this method will work even for columns
|
|
17
|
+
* with no assigned data.
|
|
18
|
+
* */
|
|
19
|
+
findColumns(request: FindColumnsRequest): Promise<FindColumnsResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Construct new axes integration with some entry removed but integration qualificaitons preserved.
|
|
22
|
+
* Removes more then one entry in case the removal will create several disjoint sets of axes.
|
|
23
|
+
*/
|
|
24
|
+
deleteColumn(request: DeleteColumnFromColumnsRequest): Promise<DeleteColumnFromColumnsResponse>;
|
|
25
|
+
/** Retrieve single column spec */
|
|
26
|
+
getColumnSpec(columnId: PObjectId): Promise<PColumnSpec | null>;
|
|
27
|
+
/** Retrieve information about all columns currently added to the PFrame */
|
|
28
|
+
listColumns(): Promise<PColumnInfo[]>;
|
|
29
|
+
/** Calculates data for the table and returns an object to access it */
|
|
30
|
+
createTable(tableId: PTableId, request: CreateTableRequestV4): PTableV8;
|
|
31
|
+
/** Creates table from data query and returns an object to access it */
|
|
32
|
+
createTableV2(tableId: PTableId, request: {
|
|
33
|
+
tableSpec: PTableColumnSpec[];
|
|
34
|
+
dataQuery: DataQuery;
|
|
35
|
+
}): PTableV8;
|
|
36
|
+
/** Calculate set of unique values for a specific axis for the filtered set of records */
|
|
37
|
+
getUniqueValues(request: UniqueValuesRequest, ops?: {
|
|
38
|
+
signal?: AbortSignal;
|
|
39
|
+
}): Promise<UniqueValuesResponse>;
|
|
38
40
|
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { PFrameReadAPIV11 };
|
|
39
43
|
//# sourceMappingURL=api_read.d.ts.map
|
|
@@ -1,74 +1,76 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
import { FindColumnsRequest, FindColumnsResponse } from "./find_columns.js";
|
|
2
|
+
import { DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse } from "./delete_column.js";
|
|
3
|
+
import { AxesId, AxesSpec, DataQuery, JoinEntry, PColumnSpec, PObjectId, PTableColumnId, PTableColumnSpec, PTableRecordFilter, PTableSorting, SingleAxisSelector, SpecQuery } from "@milaboratories/pl-model-common";
|
|
4
|
+
|
|
5
|
+
//#region src/pframe/internal_api/api_wasm.d.ts
|
|
6
|
+
interface PFrameWasmAPI {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new PFrame from a map of column IDs to column specifications.
|
|
9
|
+
*/
|
|
10
|
+
createPFrame(spec: Record<string, PColumnSpec>): PFrameWasm;
|
|
11
|
+
/**
|
|
12
|
+
* Expands an {@link AxesSpec} into {@link AxesId}s with parent information
|
|
13
|
+
* resolved.
|
|
14
|
+
*/
|
|
15
|
+
expandAxes(spec: AxesSpec): AxesId;
|
|
16
|
+
/**
|
|
17
|
+
* Collapses {@link AxesId} into {@link AxesSpec}.
|
|
18
|
+
*/
|
|
19
|
+
collapseAxes(ids: AxesId): AxesSpec;
|
|
20
|
+
/**
|
|
21
|
+
* Finds the index of an axis matching the given selector.
|
|
22
|
+
* Returns -1 if no matching axis is found.
|
|
23
|
+
*/
|
|
24
|
+
findAxis(spec: AxesSpec, selector: SingleAxisSelector): number;
|
|
25
|
+
/**
|
|
26
|
+
* Finds the flat index of a table column matching the given
|
|
27
|
+
* selector within a table spec. Returns -1 if not found.
|
|
28
|
+
*/
|
|
29
|
+
findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
|
|
28
30
|
}
|
|
29
31
|
/**
|
|
30
32
|
* A PFrame represents a collection of columns that can be queried and joined.
|
|
31
33
|
*/
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
34
|
+
interface PFrameWasm extends Disposable {
|
|
35
|
+
/**
|
|
36
|
+
* Deletes columns from a columns specification.
|
|
37
|
+
*/
|
|
38
|
+
deleteColumns(request: DeleteColumnFromColumnsRequest): DeleteColumnFromColumnsResponse;
|
|
39
|
+
/**
|
|
40
|
+
* Finds columns in the PFrame matching the given filter criteria.
|
|
41
|
+
*/
|
|
42
|
+
findColumns(request: FindColumnsRequest): FindColumnsResponse;
|
|
43
|
+
/**
|
|
44
|
+
* Evaluates a query specification against this PFrame.
|
|
45
|
+
*
|
|
46
|
+
* Takes a SpecQuery (which can represent columns, joins, filters, sorts,
|
|
47
|
+
* etc.) and returns the resulting table specification along with the data
|
|
48
|
+
* layer query representation.
|
|
49
|
+
*/
|
|
50
|
+
evaluateQuery(request: SpecQuery): EvaluateQueryResponse;
|
|
51
|
+
/**
|
|
52
|
+
* Rewrites a legacy query format (V4) to the current SpecQuery format.
|
|
53
|
+
*
|
|
54
|
+
* This method upgrades older query structures that use JoinEntryV4, filters,
|
|
55
|
+
* and sorting into the new unified SpecQuery format with proper filter and
|
|
56
|
+
* sort query nodes.
|
|
57
|
+
*/
|
|
58
|
+
rewriteLegacyQuery(request: LegacyQuery): SpecQuery;
|
|
57
59
|
}
|
|
58
60
|
/**
|
|
59
61
|
* Response from evaluating a query against a PFrame.
|
|
60
62
|
*/
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
type EvaluateQueryResponse = {
|
|
64
|
+
/**
|
|
65
|
+
* The table specification describing the structure of the query result,
|
|
66
|
+
* including all axes and columns that will be present in the output.
|
|
67
|
+
*/
|
|
68
|
+
tableSpec: PTableColumnSpec[];
|
|
69
|
+
/**
|
|
70
|
+
* The data layer query representation with numeric indices,
|
|
71
|
+
* suitable for execution by the data processing engine.
|
|
72
|
+
*/
|
|
73
|
+
dataQuery: DataQuery;
|
|
72
74
|
};
|
|
73
75
|
/**
|
|
74
76
|
* Represents a legacy (V4) query format used before the unified SpecQuery.
|
|
@@ -76,12 +78,11 @@ export type EvaluateQueryResponse = {
|
|
|
76
78
|
* This type is used with {@link PFrameWasm.rewriteLegacyQuery} to upgrade
|
|
77
79
|
* older query structures to the current {@link SpecQuery} format.
|
|
78
80
|
*/
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
filters?: PTableRecordFilter[];
|
|
84
|
-
/** Optional sorting specifications for ordering the results. */
|
|
85
|
-
sorting?: PTableSorting[];
|
|
81
|
+
type LegacyQuery = {
|
|
82
|
+
/** The source join entry defining the data sources and join structure. */src: JoinEntry<PObjectId>; /** Optional record-level filters to apply to the query results. */
|
|
83
|
+
filters?: PTableRecordFilter[]; /** Optional sorting specifications for ordering the results. */
|
|
84
|
+
sorting?: PTableSorting[];
|
|
86
85
|
};
|
|
86
|
+
//#endregion
|
|
87
|
+
export { EvaluateQueryResponse, LegacyQuery, PFrameWasm, PFrameWasmAPI };
|
|
87
88
|
//# sourceMappingURL=api_wasm.d.ts.map
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { AxisSpec, PFrameHandle, PTableHandle, SingleAxisSelector } from "@milaboratories/pl-model-common";
|
|
2
|
+
|
|
3
|
+
//#region src/pframe/internal_api/common.d.ts
|
|
4
|
+
type Logger = (level: "info" | "warn" | "error", message: string) => void;
|
|
5
|
+
type PFrameId = PFrameHandle;
|
|
6
|
+
type PTableId = PTableHandle;
|
|
7
|
+
interface AxisQualification {
|
|
8
|
+
axis: SingleAxisSelector;
|
|
9
|
+
additionalDomains: Record<string, string>;
|
|
8
10
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
interface ColumnAxesWithQualifications {
|
|
12
|
+
axesSpec: AxisSpec[];
|
|
13
|
+
qualifications: AxisQualification[];
|
|
12
14
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
type ConstantAxisFilter = {
|
|
16
|
+
type: "constant";
|
|
17
|
+
axisIndex: number;
|
|
18
|
+
constant: string | number;
|
|
17
19
|
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { AxisQualification, ColumnAxesWithQualifications, ConstantAxisFilter, Logger, PFrameId, PTableId };
|
|
18
22
|
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1,43 +1,47 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
import { ConstantAxisFilter } from "./common.js";
|
|
2
|
+
import { JsonDataInfo, PColumnSpec, PObjectId, PTableRecordFilter } from "@milaboratories/pl-model-common";
|
|
3
|
+
|
|
4
|
+
//#region src/pframe/internal_api/create_table.d.ts
|
|
5
|
+
interface ColumnJoinEntry {
|
|
6
|
+
type: "column";
|
|
7
|
+
columnId: PObjectId;
|
|
8
|
+
}
|
|
9
|
+
interface SlicedColumnJoinEntry {
|
|
10
|
+
readonly type: "slicedColumn";
|
|
11
|
+
readonly columnId: PObjectId;
|
|
12
|
+
readonly newId: PObjectId;
|
|
13
|
+
readonly axisFilters: ConstantAxisFilter[];
|
|
14
|
+
}
|
|
15
|
+
interface ArtificialColumnJoinEntry {
|
|
16
|
+
readonly type: "artificialColumn";
|
|
17
|
+
readonly columnId: PObjectId;
|
|
18
|
+
readonly newId: PObjectId;
|
|
19
|
+
readonly axesIndices: number[];
|
|
20
|
+
}
|
|
21
|
+
interface InlineColumnJoinEntry {
|
|
22
|
+
readonly type: "inlineColumn";
|
|
23
|
+
readonly newId: PObjectId;
|
|
24
|
+
readonly spec: PColumnSpec;
|
|
25
|
+
readonly dataInfo: JsonDataInfo;
|
|
26
|
+
}
|
|
27
|
+
interface InnerJoinV4 {
|
|
28
|
+
type: "inner";
|
|
29
|
+
entries: JoinEntryV4[];
|
|
30
|
+
}
|
|
31
|
+
interface FullJoinV4 {
|
|
32
|
+
type: "full";
|
|
33
|
+
entries: JoinEntryV4[];
|
|
34
|
+
}
|
|
35
|
+
interface OuterJoinV4 {
|
|
36
|
+
type: "outer";
|
|
37
|
+
primary: JoinEntryV4;
|
|
38
|
+
secondary: JoinEntryV4[];
|
|
39
|
+
}
|
|
40
|
+
type JoinEntryV4 = ColumnJoinEntry | SlicedColumnJoinEntry | ArtificialColumnJoinEntry | InlineColumnJoinEntry | InnerJoinV4 | FullJoinV4 | OuterJoinV4;
|
|
41
|
+
interface CreateTableRequestV4 {
|
|
42
|
+
src: JoinEntryV4;
|
|
43
|
+
filters: PTableRecordFilter[];
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { ArtificialColumnJoinEntry, ColumnJoinEntry, CreateTableRequestV4, FullJoinV4, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, OuterJoinV4, SlicedColumnJoinEntry };
|
|
43
47
|
//# sourceMappingURL=create_table.d.ts.map
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { ColumnAxesWithQualifications } from "./common.js";
|
|
2
|
+
|
|
3
|
+
//#region src/pframe/internal_api/delete_column.d.ts
|
|
4
|
+
interface DeleteColumnFromColumnsRequest {
|
|
5
|
+
columns: ColumnAxesWithQualifications[];
|
|
6
|
+
/** Zero based index of the column to delete */
|
|
7
|
+
delete: number;
|
|
6
8
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
interface DeleteColumnFromColumnsResponse {
|
|
10
|
+
columns: ColumnAxesWithQualifications[];
|
|
9
11
|
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse };
|
|
10
14
|
//# sourceMappingURL=delete_column.d.ts.map
|
|
@@ -1,23 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { AxisQualification, ColumnAxesWithQualifications } from "./common.js";
|
|
2
|
+
import { ColumnFilter, PColumnIdAndSpec } from "@milaboratories/pl-model-common";
|
|
3
|
+
|
|
4
|
+
//#region src/pframe/internal_api/find_columns.d.ts
|
|
5
|
+
interface FindColumnsRequest {
|
|
6
|
+
columnFilter: ColumnFilter;
|
|
7
|
+
compatibleWith: ColumnAxesWithQualifications[];
|
|
8
|
+
strictlyCompatible: boolean;
|
|
7
9
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
interface FindColumnResponseQualifications {
|
|
11
|
+
forQueries: AxisQualification[][];
|
|
12
|
+
forHit: AxisQualification[];
|
|
11
13
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
interface FindColumnsMappingVariant {
|
|
15
|
+
qualifications: FindColumnResponseQualifications;
|
|
16
|
+
distinctiveQualifications: FindColumnResponseQualifications;
|
|
15
17
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
interface FindColumnsResponseHit {
|
|
19
|
+
hit: PColumnIdAndSpec;
|
|
20
|
+
mappingVariants: FindColumnsMappingVariant[];
|
|
19
21
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
interface FindColumnsResponse {
|
|
23
|
+
hits: FindColumnsResponseHit[];
|
|
22
24
|
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit };
|
|
23
27
|
//# sourceMappingURL=find_columns.d.ts.map
|
|
@@ -1,34 +1,43 @@
|
|
|
1
|
-
'use strict';
|
|
2
1
|
|
|
2
|
+
//#region src/pframe/internal_api/http_helpers.ts
|
|
3
3
|
/** Parquet file extension */
|
|
4
4
|
const ParquetExtension = ".parquet";
|
|
5
5
|
/** File system abstraction for request handler factory, @see HttpHelpers.createRequestHandler */
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
6
|
+
var BaseObjectStore = class {
|
|
7
|
+
logger;
|
|
8
|
+
constructor(options) {
|
|
9
|
+
this.logger = options.logger ?? (() => {});
|
|
10
|
+
}
|
|
11
|
+
/** Translate HTTP range to file range, @returns null if the range is not satisfiable */
|
|
12
|
+
translate(fileSize, range) {
|
|
13
|
+
if (!range) return {
|
|
14
|
+
start: 0,
|
|
15
|
+
end: fileSize - 1
|
|
16
|
+
};
|
|
17
|
+
switch (range.type) {
|
|
18
|
+
case "bounded":
|
|
19
|
+
if (range.end >= fileSize) return null;
|
|
20
|
+
return {
|
|
21
|
+
start: range.start,
|
|
22
|
+
end: range.end
|
|
23
|
+
};
|
|
24
|
+
case "offset":
|
|
25
|
+
if (range.offset >= fileSize) return null;
|
|
26
|
+
return {
|
|
27
|
+
start: range.offset,
|
|
28
|
+
end: fileSize - 1
|
|
29
|
+
};
|
|
30
|
+
case "suffix":
|
|
31
|
+
if (range.suffix > fileSize) return null;
|
|
32
|
+
return {
|
|
33
|
+
start: fileSize - range.suffix,
|
|
34
|
+
end: fileSize - 1
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
};
|
|
31
39
|
|
|
40
|
+
//#endregion
|
|
32
41
|
exports.BaseObjectStore = BaseObjectStore;
|
|
33
42
|
exports.ParquetExtension = ParquetExtension;
|
|
34
|
-
//# sourceMappingURL=http_helpers.cjs.map
|
|
43
|
+
//# sourceMappingURL=http_helpers.cjs.map
|