@milaboratories/pl-model-middle-layer 1.7.28 → 1.7.30
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/pframe/internal_api/api_read.d.ts +6 -6
- package/dist/pframe/internal_api/api_read.d.ts.map +1 -1
- package/dist/pframe/internal_api/create_table.d.ts +29 -1
- package/dist/pframe/internal_api/create_table.d.ts.map +1 -1
- package/dist/pframe/internal_api/pframe.d.ts +3 -3
- package/dist/pframe/internal_api/table.d.ts +0 -37
- package/dist/pframe/internal_api/table.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/pframe/internal_api/api_read.ts +6 -6
- package/src/pframe/internal_api/create_table.ts +42 -1
- package/src/pframe/internal_api/pframe.ts +3 -3
- package/src/pframe/internal_api/table.ts +0 -44
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
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
|
-
import { CreateTableRequestV2 } from './create_table';
|
|
5
|
-
import {
|
|
4
|
+
import { CreateTableRequestV2, CreateTableRequestV3 } from './create_table';
|
|
5
|
+
import { PTableV4 } from './table';
|
|
6
6
|
/** Read interface exposed by PFrames library */
|
|
7
|
-
export interface
|
|
7
|
+
export interface PFrameReadAPIV5 {
|
|
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,12 +21,12 @@ export interface PFrameReadAPIV4 {
|
|
|
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: CreateTableRequestV2, signal?: AbortSignal): Promise<
|
|
24
|
+
createTable(request: CreateTableRequestV2, signal?: AbortSignal): Promise<PTableV4>;
|
|
25
25
|
/** Calculate set of unique values for a specific axis for the filtered set of records */
|
|
26
26
|
getUniqueValues(request: UniqueValuesRequest, signal?: AbortSignal): Promise<UniqueValuesResponse>;
|
|
27
27
|
}
|
|
28
28
|
/** Read interface exposed by PFrames library */
|
|
29
|
-
export interface
|
|
29
|
+
export interface PFrameReadAPIV6 {
|
|
30
30
|
/**
|
|
31
31
|
* Finds columns given filtering criteria on column name, annotations etc.
|
|
32
32
|
* and a set of qualified axes specs to find only columns with compatible
|
|
@@ -43,7 +43,7 @@ export interface PFrameReadAPIV5 {
|
|
|
43
43
|
/** Retrieve information about all columns currently added to the PFrame */
|
|
44
44
|
listColumns(): Promise<PColumnInfo[]>;
|
|
45
45
|
/** Calculates data for the table and returns an object to access it */
|
|
46
|
-
createTable(request:
|
|
46
|
+
createTable(request: CreateTableRequestV3, signal?: AbortSignal): Promise<PTableV4>;
|
|
47
47
|
/** Calculate set of unique values for a specific axis for the filtered set of records */
|
|
48
48
|
getUniqueValues(request: UniqueValuesRequest, signal?: AbortSignal): Promise<UniqueValuesResponse>;
|
|
49
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api_read.d.ts","sourceRoot":"","sources":["../../../src/pframe/internal_api/api_read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AAClG,OAAO,EACL,WAAW,EACX,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"api_read.d.ts","sourceRoot":"","sources":["../../../src/pframe/internal_api/api_read.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;IAEhG,kCAAkC;IAClC,aAAa,CAAC,QAAQ,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEzD,2EAA2E;IAC3E,WAAW,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAEtC,uEAAuE;IACvE,WAAW,CAAC,OAAO,EAAE,oBAAoB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEpF,yFAAyF;IACzF,eAAe,CAAC,OAAO,EAAE,mBAAmB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;CACpG"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { ConstantAxisFilter } from './common';
|
|
2
|
-
import { PObjectId, PTableRecordFilter } from '@milaboratories/pl-model-common';
|
|
2
|
+
import { JsonDataInfo, PColumnSpec, PObjectId, PTableRecordFilter } from '@milaboratories/pl-model-common';
|
|
3
|
+
export interface ColumnJoinEntry {
|
|
4
|
+
type: 'column';
|
|
5
|
+
columnId: PObjectId;
|
|
6
|
+
}
|
|
3
7
|
export interface ColumnJoinEntryV2 {
|
|
4
8
|
type: 'column';
|
|
5
9
|
columnId: PObjectId;
|
|
@@ -10,6 +14,25 @@ export interface SlicedColumnJoinEntry {
|
|
|
10
14
|
readonly newId: PObjectId;
|
|
11
15
|
readonly axisFilters: ConstantAxisFilter[];
|
|
12
16
|
}
|
|
17
|
+
export interface InlineColumnJoinEntry {
|
|
18
|
+
readonly type: 'inlineColumn';
|
|
19
|
+
readonly newId: PObjectId;
|
|
20
|
+
readonly spec: PColumnSpec;
|
|
21
|
+
readonly dataInfo: JsonDataInfo;
|
|
22
|
+
}
|
|
23
|
+
export interface InnerJoinV3 {
|
|
24
|
+
type: 'inner';
|
|
25
|
+
entries: JoinEntryV3[];
|
|
26
|
+
}
|
|
27
|
+
export interface FullJoinV3 {
|
|
28
|
+
type: 'full';
|
|
29
|
+
entries: JoinEntryV3[];
|
|
30
|
+
}
|
|
31
|
+
export interface OuterJoinV3 {
|
|
32
|
+
type: 'outer';
|
|
33
|
+
primary: JoinEntryV3;
|
|
34
|
+
secondary: JoinEntryV3[];
|
|
35
|
+
}
|
|
13
36
|
export interface InnerJoinV2 {
|
|
14
37
|
type: 'inner';
|
|
15
38
|
entries: JoinEntryV2[];
|
|
@@ -23,9 +46,14 @@ export interface OuterJoinV2 {
|
|
|
23
46
|
primary: JoinEntryV2;
|
|
24
47
|
secondary: JoinEntryV2[];
|
|
25
48
|
}
|
|
49
|
+
export type JoinEntryV3 = ColumnJoinEntry | SlicedColumnJoinEntry | InlineColumnJoinEntry | InnerJoinV3 | FullJoinV3 | OuterJoinV3;
|
|
26
50
|
export type JoinEntryV2 = ColumnJoinEntryV2 | SlicedColumnJoinEntry | InnerJoinV2 | FullJoinV2 | OuterJoinV2;
|
|
27
51
|
export interface CreateTableRequestV2 {
|
|
28
52
|
src: JoinEntryV2;
|
|
29
53
|
filters: PTableRecordFilter[];
|
|
30
54
|
}
|
|
55
|
+
export interface CreateTableRequestV3 {
|
|
56
|
+
src: JoinEntryV3;
|
|
57
|
+
filters: PTableRecordFilter[];
|
|
58
|
+
}
|
|
31
59
|
//# sourceMappingURL=create_table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create_table.d.ts","sourceRoot":"","sources":["../../../src/pframe/internal_api/create_table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"create_table.d.ts","sourceRoot":"","sources":["../../../src/pframe/internal_api/create_table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM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AE,WAAW,EAAE,CAAC;CAC1B;AAED,MAAM,MAAM,WAAW,GACnB,eAAe,GACf,qBAAqB,GACrB,qBAAqB,GACrB,WAAW,GACX,UAAU,GACV,WAAW,CAAC;AAEhB,MAAM,MAAM,WAAW,GACnB,iBAAiB,GACjB,qBAAqB,GACrB,WAAW,GACX,UAAU,GACV,WAAW,CAAC;AAEhB,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,WAAW,CAAC;IACjB,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,WAAW,CAAC;IACjB,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PFrameFactoryAPI } from './api_factory';
|
|
2
|
-
import {
|
|
2
|
+
import { PFrameReadAPIV5, PFrameReadAPIV6 } from './api_read';
|
|
3
3
|
export type Logger = (level: 'info' | 'warn' | 'error', message: string) => void;
|
|
4
|
-
export interface PFrameV4 extends PFrameFactoryAPI, PFrameReadAPIV4 {
|
|
5
|
-
}
|
|
6
4
|
export interface PFrameV5 extends PFrameFactoryAPI, PFrameReadAPIV5 {
|
|
7
5
|
}
|
|
6
|
+
export interface PFrameV6 extends PFrameFactoryAPI, PFrameReadAPIV6 {
|
|
7
|
+
}
|
|
8
8
|
//# sourceMappingURL=pframe.d.ts.map
|
|
@@ -1,41 +1,4 @@
|
|
|
1
1
|
import { PTableColumnId, PTableColumnSpec, PTableRecordFilter, PTableShape, PTableSorting, PTableVector, TableRange } from '@milaboratories/pl-model-common';
|
|
2
|
-
/**
|
|
3
|
-
* Table view returned as a result of create table operation.
|
|
4
|
-
*
|
|
5
|
-
* PTable can be thought as having a composite primary key, consisting of axes,
|
|
6
|
-
* and a set of data columns derived from PColumn values.
|
|
7
|
-
* */
|
|
8
|
-
export interface PTableV3 {
|
|
9
|
-
/** Unified table shape */
|
|
10
|
-
getShape(): PTableShape;
|
|
11
|
-
/**
|
|
12
|
-
* Returns ordered array of table axes specs (primary key "columns" in SQL
|
|
13
|
-
* terms) and data column specs (regular "columns" in SQL terms).
|
|
14
|
-
*
|
|
15
|
-
* Data for a specific table column can be retrieved using unified indexing
|
|
16
|
-
* corresponding to elements in this array.
|
|
17
|
-
*
|
|
18
|
-
* Axes are always listed first.
|
|
19
|
-
* */
|
|
20
|
-
getSpec(): PTableColumnSpec[];
|
|
21
|
-
/** Transforms unified column identifiers into unified indices of columns. */
|
|
22
|
-
getColumnIndices(columnIds: PTableColumnId[]): number[];
|
|
23
|
-
/**
|
|
24
|
-
* Retrieve the data from the table. To retrieve only data required, it can be
|
|
25
|
-
* sliced both horizontally ({@link columnIndices}) and vertically
|
|
26
|
-
* ({@link range}).
|
|
27
|
-
*
|
|
28
|
-
* @param columnIndices unified indices of columns to be retrieved
|
|
29
|
-
* @param range optionally limit the range of records to retrieve
|
|
30
|
-
* */
|
|
31
|
-
getData(columnIndices: number[], range?: TableRange): Promise<PTableVector[]>;
|
|
32
|
-
/** Filters the table and returns new PTable instance */
|
|
33
|
-
filter(request: PTableRecordFilter[], signal?: AbortSignal): Promise<PTableV3>;
|
|
34
|
-
/** Sorts the table and returns new PTable instance. */
|
|
35
|
-
sort(request: PTableSorting[], signal?: AbortSignal): Promise<PTableV3>;
|
|
36
|
-
/** Deallocates all underlying resources */
|
|
37
|
-
dispose(): void;
|
|
38
|
-
}
|
|
39
2
|
/**
|
|
40
3
|
* Table view returned as a result of create table operation.
|
|
41
4
|
*
|
|
@@ -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,0BAA0B;IAC1B,QAAQ,IAAI,WAAW,CAAC;IAExB;;;;;;;;SAQK;IACL,OAAO,IAAI,gBAAgB,EAAE,CAAC;IAE9B,6EAA6E;IAC7E,gBAAgB,CAAC,SAAS,EAAE,cAAc,EAAE,GAAG,MAAM,EAAE,CAAC;IAExD;;;;;;;SAOK;IACL,OAAO,
|
|
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,0BAA0B;IAC1B,QAAQ,IAAI,WAAW,CAAC;IAExB;;;;;;;;SAQK;IACL,OAAO,IAAI,gBAAgB,EAAE,CAAC;IAE9B,6EAA6E;IAC7E,gBAAgB,CAAC,SAAS,EAAE,cAAc,EAAE,GAAG,MAAM,EAAE,CAAC;IAExD;;;;;;;SAOK;IACL,OAAO,CACL,aAAa,EAAE,MAAM,EAAE,EACvB,KAAK,EAAE,UAAU,GAAG,SAAS,EAC7B,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAE3B,wDAAwD;IACxD,MAAM,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAE/E,uDAAuD;IACvD,IAAI,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAExE,2CAA2C;IAC3C,OAAO,IAAI,IAAI,CAAC;CACjB"}
|
package/package.json
CHANGED
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
UniqueValuesRequest,
|
|
8
8
|
UniqueValuesResponse
|
|
9
9
|
} from '@milaboratories/pl-model-common';
|
|
10
|
-
import { CreateTableRequestV2 } from './create_table';
|
|
11
|
-
import {
|
|
10
|
+
import { CreateTableRequestV2, CreateTableRequestV3 } from './create_table';
|
|
11
|
+
import { PTableV4 } from './table';
|
|
12
12
|
|
|
13
13
|
/** Read interface exposed by PFrames library */
|
|
14
|
-
export interface
|
|
14
|
+
export interface PFrameReadAPIV5 {
|
|
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,14 +32,14 @@ export interface PFrameReadAPIV4 {
|
|
|
32
32
|
listColumns(): Promise<PColumnInfo[]>;
|
|
33
33
|
|
|
34
34
|
/** Calculates data for the table and returns an object to access it */
|
|
35
|
-
createTable(request: CreateTableRequestV2, signal?: AbortSignal): Promise<
|
|
35
|
+
createTable(request: CreateTableRequestV2, signal?: AbortSignal): Promise<PTableV4>;
|
|
36
36
|
|
|
37
37
|
/** Calculate set of unique values for a specific axis for the filtered set of records */
|
|
38
38
|
getUniqueValues(request: UniqueValuesRequest, signal?: AbortSignal): Promise<UniqueValuesResponse>;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/** Read interface exposed by PFrames library */
|
|
42
|
-
export interface
|
|
42
|
+
export interface PFrameReadAPIV6 {
|
|
43
43
|
/**
|
|
44
44
|
* Finds columns given filtering criteria on column name, annotations etc.
|
|
45
45
|
* and a set of qualified axes specs to find only columns with compatible
|
|
@@ -60,7 +60,7 @@ export interface PFrameReadAPIV5 {
|
|
|
60
60
|
listColumns(): Promise<PColumnInfo[]>;
|
|
61
61
|
|
|
62
62
|
/** Calculates data for the table and returns an object to access it */
|
|
63
|
-
createTable(request:
|
|
63
|
+
createTable(request: CreateTableRequestV3, signal?: AbortSignal): Promise<PTableV4>;
|
|
64
64
|
|
|
65
65
|
/** Calculate set of unique values for a specific axis for the filtered set of records */
|
|
66
66
|
getUniqueValues(request: UniqueValuesRequest, signal?: AbortSignal): Promise<UniqueValuesResponse>;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { ConstantAxisFilter } from './common';
|
|
2
|
-
import { PObjectId, PTableRecordFilter } from '@milaboratories/pl-model-common';
|
|
2
|
+
import { JsonDataInfo, PColumnSpec, PObjectId, PTableRecordFilter } from '@milaboratories/pl-model-common';
|
|
3
|
+
|
|
4
|
+
export interface ColumnJoinEntry {
|
|
5
|
+
type: 'column';
|
|
6
|
+
columnId: PObjectId;
|
|
7
|
+
}
|
|
3
8
|
|
|
4
9
|
export interface ColumnJoinEntryV2 {
|
|
5
10
|
type: 'column';
|
|
@@ -13,6 +18,29 @@ export interface SlicedColumnJoinEntry {
|
|
|
13
18
|
readonly axisFilters: ConstantAxisFilter[];
|
|
14
19
|
}
|
|
15
20
|
|
|
21
|
+
export interface InlineColumnJoinEntry {
|
|
22
|
+
readonly type: 'inlineColumn';
|
|
23
|
+
readonly newId: PObjectId;
|
|
24
|
+
readonly spec: PColumnSpec;
|
|
25
|
+
readonly dataInfo: JsonDataInfo;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface InnerJoinV3 {
|
|
29
|
+
type: 'inner';
|
|
30
|
+
entries: JoinEntryV3[];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface FullJoinV3 {
|
|
34
|
+
type: 'full';
|
|
35
|
+
entries: JoinEntryV3[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface OuterJoinV3 {
|
|
39
|
+
type: 'outer';
|
|
40
|
+
primary: JoinEntryV3;
|
|
41
|
+
secondary: JoinEntryV3[];
|
|
42
|
+
}
|
|
43
|
+
|
|
16
44
|
export interface InnerJoinV2 {
|
|
17
45
|
type: 'inner';
|
|
18
46
|
entries: JoinEntryV2[];
|
|
@@ -29,6 +57,14 @@ export interface OuterJoinV2 {
|
|
|
29
57
|
secondary: JoinEntryV2[];
|
|
30
58
|
}
|
|
31
59
|
|
|
60
|
+
export type JoinEntryV3 =
|
|
61
|
+
| ColumnJoinEntry
|
|
62
|
+
| SlicedColumnJoinEntry
|
|
63
|
+
| InlineColumnJoinEntry
|
|
64
|
+
| InnerJoinV3
|
|
65
|
+
| FullJoinV3
|
|
66
|
+
| OuterJoinV3;
|
|
67
|
+
|
|
32
68
|
export type JoinEntryV2 =
|
|
33
69
|
| ColumnJoinEntryV2
|
|
34
70
|
| SlicedColumnJoinEntry
|
|
@@ -40,3 +76,8 @@ export interface CreateTableRequestV2 {
|
|
|
40
76
|
src: JoinEntryV2;
|
|
41
77
|
filters: PTableRecordFilter[];
|
|
42
78
|
}
|
|
79
|
+
|
|
80
|
+
export interface CreateTableRequestV3 {
|
|
81
|
+
src: JoinEntryV3;
|
|
82
|
+
filters: PTableRecordFilter[];
|
|
83
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { PFrameFactoryAPI } from './api_factory';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PFrameReadAPIV5, PFrameReadAPIV6 } 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 PFrameV4 extends PFrameFactoryAPI, PFrameReadAPIV4 {}
|
|
10
|
-
|
|
11
9
|
export interface PFrameV5 extends PFrameFactoryAPI, PFrameReadAPIV5 {}
|
|
10
|
+
|
|
11
|
+
export interface PFrameV6 extends PFrameFactoryAPI, PFrameReadAPIV6 {}
|
|
@@ -8,50 +8,6 @@ import {
|
|
|
8
8
|
TableRange
|
|
9
9
|
} from '@milaboratories/pl-model-common';
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* Table view returned as a result of create table operation.
|
|
13
|
-
*
|
|
14
|
-
* PTable can be thought as having a composite primary key, consisting of axes,
|
|
15
|
-
* and a set of data columns derived from PColumn values.
|
|
16
|
-
* */
|
|
17
|
-
export interface PTableV3 {
|
|
18
|
-
/** Unified table shape */
|
|
19
|
-
getShape(): PTableShape;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Returns ordered array of table axes specs (primary key "columns" in SQL
|
|
23
|
-
* terms) and data column specs (regular "columns" in SQL terms).
|
|
24
|
-
*
|
|
25
|
-
* Data for a specific table column can be retrieved using unified indexing
|
|
26
|
-
* corresponding to elements in this array.
|
|
27
|
-
*
|
|
28
|
-
* Axes are always listed first.
|
|
29
|
-
* */
|
|
30
|
-
getSpec(): PTableColumnSpec[];
|
|
31
|
-
|
|
32
|
-
/** Transforms unified column identifiers into unified indices of columns. */
|
|
33
|
-
getColumnIndices(columnIds: PTableColumnId[]): number[];
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Retrieve the data from the table. To retrieve only data required, it can be
|
|
37
|
-
* sliced both horizontally ({@link columnIndices}) and vertically
|
|
38
|
-
* ({@link range}).
|
|
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[], range?: TableRange): Promise<PTableVector[]>;
|
|
44
|
-
|
|
45
|
-
/** Filters the table and returns new PTable instance */
|
|
46
|
-
filter(request: PTableRecordFilter[], signal?: AbortSignal): Promise<PTableV3>;
|
|
47
|
-
|
|
48
|
-
/** Sorts the table and returns new PTable instance. */
|
|
49
|
-
sort(request: PTableSorting[], signal?: AbortSignal): Promise<PTableV3>;
|
|
50
|
-
|
|
51
|
-
/** Deallocates all underlying resources */
|
|
52
|
-
dispose(): void;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
11
|
/**
|
|
56
12
|
* Table view returned as a result of create table operation.
|
|
57
13
|
*
|