@milaboratories/pl-model-middle-layer 1.7.44 → 1.7.46

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.
@@ -2,9 +2,9 @@ import { FindColumnsRequest, FindColumnsResponse } from './find_columns';
2
2
  import { DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse } from './delete_column';
3
3
  import { PColumnInfo, PColumnSpec, PObjectId, UniqueValuesRequest, UniqueValuesResponse } from '@milaboratories/pl-model-common';
4
4
  import { CreateTableRequestV3 } from './create_table';
5
- import { PTableV5 } from './table';
5
+ import { PTableV6 } from './table';
6
6
  /** Read interface exposed by PFrames library */
7
- export interface PFrameReadAPIV7 {
7
+ export interface PFrameReadAPIV8 {
8
8
  /**
9
9
  * Finds columns given filtering criteria on column name, annotations etc.
10
10
  * and a set of qualified axes specs to find only columns with compatible
@@ -21,7 +21,7 @@ export interface PFrameReadAPIV7 {
21
21
  /** Retrieve information about all columns currently added to the PFrame */
22
22
  listColumns(): Promise<PColumnInfo[]>;
23
23
  /** Calculates data for the table and returns an object to access it */
24
- createTable(request: CreateTableRequestV3): PTableV5;
24
+ createTable(request: CreateTableRequestV3): PTableV6;
25
25
  /** Calculate set of unique values for a specific axis for the filtered set of records */
26
26
  getUniqueValues(request: UniqueValuesRequest, ops?: {
27
27
  signal?: AbortSignal;
@@ -1,6 +1,6 @@
1
1
  import { PFrameFactoryAPI } from './api_factory';
2
- import { PFrameReadAPIV7 } from './api_read';
2
+ import { PFrameReadAPIV8 } from './api_read';
3
3
  export type Logger = (level: 'info' | 'warn' | 'error', message: string) => void;
4
- export interface PFrameV7 extends PFrameFactoryAPI, PFrameReadAPIV7 {
4
+ export interface PFrameV8 extends PFrameFactoryAPI, PFrameReadAPIV8 {
5
5
  }
6
6
  //# sourceMappingURL=pframe.d.ts.map
@@ -5,7 +5,7 @@ import { PTableColumnId, PTableColumnSpec, PTableRecordFilter, PTableShape, PTab
5
5
  * PTable can be thought as having a composite primary key, consisting of axes,
6
6
  * and a set of data columns derived from PColumn values.
7
7
  * */
8
- export interface PTableV5 {
8
+ export interface PTableV6 {
9
9
  /**
10
10
  * Returns ordered array of table axes specs (primary key "columns" in SQL
11
11
  * terms) and data column specs (regular "columns" in SQL terms).
@@ -18,6 +18,14 @@ export interface PTableV5 {
18
18
  getSpec(): PTableColumnSpec[];
19
19
  /** Transforms unified column identifiers into unified indices of columns. */
20
20
  getColumnIndices(columnIds: PTableColumnId[]): number[];
21
+ /**
22
+ * Get PTable disk footprint in bytes
23
+ * Warning: This call materializes the join.
24
+ */
25
+ getFootprint(ops?: {
26
+ withPredecessors?: boolean;
27
+ signal?: AbortSignal;
28
+ }): Promise<number>;
21
29
  /**
22
30
  * Unified table shape
23
31
  * Warning: This call materializes the join.
@@ -39,9 +47,9 @@ export interface PTableV5 {
39
47
  signal?: AbortSignal;
40
48
  }): Promise<PTableVector[]>;
41
49
  /** Filters the table and returns new PTable instance */
42
- filter(request: PTableRecordFilter[]): PTableV5;
50
+ filter(request: PTableRecordFilter[]): PTableV6;
43
51
  /** Sorts the table and returns new PTable instance. */
44
- sort(request: PTableSorting[]): PTableV5;
52
+ sort(request: PTableSorting[]): PTableV6;
45
53
  /** Deallocates all underlying resources */
46
54
  dispose(): void;
47
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/pframe/internal_api/table.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,UAAU,EACX,MAAM,iCAAiC,CAAC;AAEzC;;;;;KAKK;AACL,MAAM,WAAW,QAAQ;IACvB;;;;;;;;SAQK;IACL,OAAO,IAAI,gBAAgB,EAAE,CAAC;IAE9B,6EAA6E;IAC7E,gBAAgB,CAAC,SAAS,EAAE,cAAc,EAAE,GAAG,MAAM,EAAE,CAAC;IAExD;;;OAGG;IACH,QAAQ,CAAC,GAAG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AAE,MAAM,EAAE,EACvB,GAAG,CAAC,EAAE;QACJ,KAAK,CAAC,EAAE,UAAU,CAAC;QACnB,MAAM,CAAC,EAAE,WAAW,CAAC;KACtB,GACA,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAE3B,wDAAwD;IACxD,MAAM,CAAC,OAAO,EAAE,kBAAkB,EAAE,GAAG,QAAQ,CAAC;IAEhD,uDAAuD;IACvD,IAAI,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,QAAQ,CAAC;IAEzC,2CAA2C;IAC3C,OAAO,IAAI,IAAI,CAAC;CACjB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milaboratories/pl-model-middle-layer",
3
- "version": "1.7.44",
3
+ "version": "1.7.46",
4
4
  "description": "Common model between middle layer and non-block UI code",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",
@@ -8,10 +8,10 @@ import {
8
8
  UniqueValuesResponse
9
9
  } from '@milaboratories/pl-model-common';
10
10
  import { CreateTableRequestV3 } from './create_table';
11
- import { PTableV5 } from './table';
11
+ import { PTableV6 } from './table';
12
12
 
13
13
  /** Read interface exposed by PFrames library */
14
- export interface PFrameReadAPIV7 {
14
+ export interface PFrameReadAPIV8 {
15
15
  /**
16
16
  * Finds columns given filtering criteria on column name, annotations etc.
17
17
  * and a set of qualified axes specs to find only columns with compatible
@@ -32,7 +32,7 @@ export interface PFrameReadAPIV7 {
32
32
  listColumns(): Promise<PColumnInfo[]>;
33
33
 
34
34
  /** Calculates data for the table and returns an object to access it */
35
- createTable(request: CreateTableRequestV3): PTableV5;
35
+ createTable(request: CreateTableRequestV3): PTableV6;
36
36
 
37
37
  /** Calculate set of unique values for a specific axis for the filtered set of records */
38
38
  getUniqueValues(
@@ -1,9 +1,9 @@
1
1
  import type { PFrameFactoryAPI } from './api_factory';
2
- import type { PFrameReadAPIV7 } from './api_read';
2
+ import type { PFrameReadAPIV8 } from './api_read';
3
3
 
4
4
  export type Logger = (
5
5
  level: 'info' | 'warn' | 'error',
6
6
  message: string
7
7
  ) => void;
8
8
 
9
- export interface PFrameV7 extends PFrameFactoryAPI, PFrameReadAPIV7 {}
9
+ export interface PFrameV8 extends PFrameFactoryAPI, PFrameReadAPIV8 {}
@@ -14,7 +14,7 @@ import {
14
14
  * PTable can be thought as having a composite primary key, consisting of axes,
15
15
  * and a set of data columns derived from PColumn values.
16
16
  * */
17
- export interface PTableV5 {
17
+ export interface PTableV6 {
18
18
  /**
19
19
  * Returns ordered array of table axes specs (primary key "columns" in SQL
20
20
  * terms) and data column specs (regular "columns" in SQL terms).
@@ -29,6 +29,15 @@ export interface PTableV5 {
29
29
  /** Transforms unified column identifiers into unified indices of columns. */
30
30
  getColumnIndices(columnIds: PTableColumnId[]): number[];
31
31
 
32
+ /**
33
+ * Get PTable disk footprint in bytes
34
+ * Warning: This call materializes the join.
35
+ */
36
+ getFootprint(ops?: {
37
+ withPredecessors?: boolean,
38
+ signal?: AbortSignal,
39
+ }): Promise<number>;
40
+
32
41
  /**
33
42
  * Unified table shape
34
43
  * Warning: This call materializes the join.
@@ -55,10 +64,10 @@ export interface PTableV5 {
55
64
  ): Promise<PTableVector[]>;
56
65
 
57
66
  /** Filters the table and returns new PTable instance */
58
- filter(request: PTableRecordFilter[]): PTableV5;
67
+ filter(request: PTableRecordFilter[]): PTableV6;
59
68
 
60
69
  /** Sorts the table and returns new PTable instance. */
61
- sort(request: PTableSorting[]): PTableV5;
70
+ sort(request: PTableSorting[]): PTableV6;
62
71
 
63
72
  /** Deallocates all underlying resources */
64
73
  dispose(): void;