@hpcc-js/comms 3.22.1 → 3.23.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/README.md +66 -0
- package/dist/browser/index.js +349 -32
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.umd.cjs +2 -2
- package/dist/browser/index.umd.cjs.map +1 -1
- package/dist/node/index.cjs +14 -14
- package/dist/node/index.cjs.map +1 -7
- package/dist/node/index.js +7151 -923
- package/dist/node/index.js.map +1 -7
- package/package.json +31 -30
- package/src/connection.ts +11 -2
- package/src/ecl/dfuWorkunit.ts +3 -0
- package/src/ecl/sql2.ts +376 -0
- package/src/index.common.ts +2 -0
- package/src/services/fileSpray.ts +1 -1
- package/src/services/wsCloud.ts +4 -2
- package/src/services/wsEcl.ts +14 -2
- package/src/services/wsLogaccess.ts +13 -12
- package/src/services/wsSQL2.ts +8 -0
- package/src/services/wsdl/FileSpray/current/FileSpray.ts +959 -0
- package/src/services/wsdl/FileSpray/v1.30/FileSpray.ts +959 -0
- package/src/services/wsdl/WsSQL2/current/WsSQL2.ts +223 -0
- package/src/services/wsdl/WsSQL2/v1.00/WsSQL2.ts +222 -0
- package/src/services/wsdl/WsSQL2/v1.01/WsSQL2.ts +223 -0
- package/types/ecl/dfuWorkunit.d.ts +3 -0
- package/types/ecl/sql2.d.ts +74 -0
- package/types/index.common.d.ts +2 -0
- package/types/services/fileSpray.d.ts +1 -1
- package/types/services/wsSQL2.d.ts +4 -0
- package/types/services/wsdl/FileSpray/{v1.29 → v1.30}/FileSpray.d.ts +10 -0
- package/types/services/wsdl/WsSQL2/v1.01/WsSQL2.d.ts +165 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { IConnection, IOptions } from "../connection.ts";
|
|
2
|
+
import { SQL2Service, WsSQL2 } from "../services/wsSQL2.ts";
|
|
3
|
+
export type SQLValue = string | number | boolean | null | SQLValue[] | {
|
|
4
|
+
[key: string]: SQLValue;
|
|
5
|
+
};
|
|
6
|
+
export type SQLRow = Record<string, SQLValue>;
|
|
7
|
+
export declare class SQLCleanupError extends Error {
|
|
8
|
+
readonly cause: unknown;
|
|
9
|
+
readonly cleanupErrors: unknown[];
|
|
10
|
+
constructor(message: string, cause: unknown, cleanupErrors: unknown[]);
|
|
11
|
+
}
|
|
12
|
+
export declare class SQLConnection {
|
|
13
|
+
protected readonly service: SQL2Service;
|
|
14
|
+
protected readonly statements: Set<SQLStatement>;
|
|
15
|
+
protected closed: boolean;
|
|
16
|
+
protected closing?: Promise<void>;
|
|
17
|
+
constructor(options: IOptions | IConnection | SQL2Service);
|
|
18
|
+
createStatement(): SQLStatement;
|
|
19
|
+
queryRows(sql: string, fetchSize?: number): Promise<SQLRow[]>;
|
|
20
|
+
explainQuery(sql: string): Promise<WsSQL2.ExplainQueryResponse>;
|
|
21
|
+
logicalFileMeta(logicalName: string): Promise<WsSQL2.LogicalFileMetadata | undefined>;
|
|
22
|
+
ping(): Promise<boolean>;
|
|
23
|
+
splitQuery(sql: string): Promise<string[]>;
|
|
24
|
+
close(): Promise<void>;
|
|
25
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
26
|
+
checkOpen(): void;
|
|
27
|
+
}
|
|
28
|
+
export declare class SQLStatement {
|
|
29
|
+
protected readonly service: SQL2Service;
|
|
30
|
+
protected readonly onClose: () => void;
|
|
31
|
+
protected result?: SQLResultSet;
|
|
32
|
+
protected closed: boolean;
|
|
33
|
+
protected fetchSize: number;
|
|
34
|
+
protected executing?: Promise<SQLResultSet>;
|
|
35
|
+
protected closing?: Promise<void>;
|
|
36
|
+
constructor(service: SQL2Service, onClose: () => void);
|
|
37
|
+
setFetchSize(size: number): void;
|
|
38
|
+
cancel(): Promise<void>;
|
|
39
|
+
executeQuery(sql: string): Promise<SQLResultSet>;
|
|
40
|
+
protected execute(sql: string): Promise<SQLResultSet>;
|
|
41
|
+
protected runQuery(sql: string): Promise<SQLResultSet>;
|
|
42
|
+
close(): Promise<void>;
|
|
43
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
44
|
+
protected checkOpen(): void;
|
|
45
|
+
}
|
|
46
|
+
export declare class SQLResultSet {
|
|
47
|
+
protected readonly service: SQL2Service;
|
|
48
|
+
protected readonly columns: WsSQL2.Column[];
|
|
49
|
+
protected cursor: string | undefined;
|
|
50
|
+
protected readonly fetchSize: number;
|
|
51
|
+
protected index: number;
|
|
52
|
+
protected row?: SQLValue[];
|
|
53
|
+
protected wasNullValue: boolean;
|
|
54
|
+
protected closed: boolean;
|
|
55
|
+
protected advancing?: Promise<boolean>;
|
|
56
|
+
protected closing?: Promise<void>;
|
|
57
|
+
constructor(service: SQL2Service, columns: WsSQL2.Column[], cursor: string | undefined, fetchSize: number);
|
|
58
|
+
protected rows: SQLValue[][];
|
|
59
|
+
protected complete: boolean;
|
|
60
|
+
getMetaData(): readonly WsSQL2.Column[];
|
|
61
|
+
findColumn(label: string): number;
|
|
62
|
+
next(): Promise<boolean>;
|
|
63
|
+
private advance;
|
|
64
|
+
private advancePage;
|
|
65
|
+
getObject(column: number | string): SQLValue;
|
|
66
|
+
getString(column: number | string): string | null;
|
|
67
|
+
getRow(): SQLRow;
|
|
68
|
+
wasNull(): boolean;
|
|
69
|
+
close(): Promise<void>;
|
|
70
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
71
|
+
cancel(): Promise<void>;
|
|
72
|
+
protected closeCursor(): Promise<void>;
|
|
73
|
+
protected checkOpen(): void;
|
|
74
|
+
}
|
package/types/index.common.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export * from "./services/wsPackageProcess.ts";
|
|
|
15
15
|
export * from "./services/wsResources.ts";
|
|
16
16
|
export * from "./services/wsSasha.ts";
|
|
17
17
|
export * from "./services/wsSMC.ts";
|
|
18
|
+
export * from "./services/wsSQL2.ts";
|
|
18
19
|
export * from "./services/wsStore.ts";
|
|
19
20
|
export * from "./services/wsTopology.ts";
|
|
20
21
|
export * from "./services/wsWorkunits.ts";
|
|
@@ -26,6 +27,7 @@ export * from "./ecl/query.ts";
|
|
|
26
27
|
export * from "./ecl/resource.ts";
|
|
27
28
|
export * from "./ecl/result.ts";
|
|
28
29
|
export * from "./ecl/scope.ts";
|
|
30
|
+
export * from "./ecl/sql2.ts";
|
|
29
31
|
export * from "./ecl/sourceFile.ts";
|
|
30
32
|
export * from "./ecl/store.ts";
|
|
31
33
|
export * from "./ecl/timer.ts";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FileSprayServiceBase, FileSpray } from "./wsdl/FileSpray/v1.
|
|
1
|
+
import { FileSprayServiceBase, FileSpray } from "./wsdl/FileSpray/v1.30/FileSpray.ts";
|
|
2
2
|
export { FileSpray };
|
|
3
3
|
type UpdateDFUWorkunitMinusWU = Omit<FileSpray.UpdateDFUWorkunit, "wu">;
|
|
4
4
|
type UpdateDFUWorkunitWU = FileSpray.UpdateDFUWorkunit["wu"];
|
|
@@ -145,6 +145,9 @@ export declare namespace FileSpray {
|
|
|
145
145
|
FileAccessCost?: double;
|
|
146
146
|
KbPerSecAve?: int;
|
|
147
147
|
KbPerSec?: int;
|
|
148
|
+
SubTaskCount?: int;
|
|
149
|
+
SubTasksFinished?: int;
|
|
150
|
+
SubTasksFailed?: int;
|
|
148
151
|
}
|
|
149
152
|
interface CreateDFUPublisherWorkunitResponse {
|
|
150
153
|
Exceptions?: Exceptions;
|
|
@@ -459,6 +462,9 @@ export declare namespace FileSpray {
|
|
|
459
462
|
FileAccessCost?: double;
|
|
460
463
|
KbPerSecAve?: int;
|
|
461
464
|
KbPerSec?: int;
|
|
465
|
+
SubTaskCount?: int;
|
|
466
|
+
SubTasksFinished?: int;
|
|
467
|
+
SubTasksFailed?: int;
|
|
462
468
|
}
|
|
463
469
|
interface results {
|
|
464
470
|
DFUWorkunit?: DFUWorkunit[];
|
|
@@ -467,6 +473,7 @@ export declare namespace FileSpray {
|
|
|
467
473
|
Exceptions?: Exceptions;
|
|
468
474
|
results?: results;
|
|
469
475
|
Command?: DFUCommand;
|
|
476
|
+
Archived?: boolean;
|
|
470
477
|
Owner?: string;
|
|
471
478
|
Cluster?: string;
|
|
472
479
|
StateReq?: string;
|
|
@@ -705,6 +712,9 @@ export declare namespace FileSpray {
|
|
|
705
712
|
FileAccessCost?: double;
|
|
706
713
|
KbPerSecAve?: int;
|
|
707
714
|
KbPerSec?: int;
|
|
715
|
+
SubTaskCount?: int;
|
|
716
|
+
SubTasksFinished?: int;
|
|
717
|
+
SubTasksFailed?: int;
|
|
708
718
|
}
|
|
709
719
|
interface UpdateDFUWorkunit {
|
|
710
720
|
wu?: wu;
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { IConnection, IOptions } from "../../../../connection.ts";
|
|
2
|
+
import { Service } from "../../../../espConnection.ts";
|
|
3
|
+
export declare namespace WsSQL2 {
|
|
4
|
+
type double = number;
|
|
5
|
+
type unsignedInt = number;
|
|
6
|
+
type long = number;
|
|
7
|
+
type uint64 = number;
|
|
8
|
+
interface CloseResultSetRequest {
|
|
9
|
+
CursorId?: string;
|
|
10
|
+
}
|
|
11
|
+
interface Exception {
|
|
12
|
+
Code?: string;
|
|
13
|
+
Audience?: string;
|
|
14
|
+
Source?: string;
|
|
15
|
+
Message?: string;
|
|
16
|
+
}
|
|
17
|
+
interface Exceptions {
|
|
18
|
+
Source?: string;
|
|
19
|
+
Exception?: Exception[];
|
|
20
|
+
}
|
|
21
|
+
interface CloseResultSetResponse {
|
|
22
|
+
Exceptions?: Exceptions;
|
|
23
|
+
Closed?: boolean;
|
|
24
|
+
}
|
|
25
|
+
interface ExecuteQueryRequest {
|
|
26
|
+
SQLText?: string;
|
|
27
|
+
IncludeRuntimeGraph?: boolean;
|
|
28
|
+
IncludeResultSetMetadata?: boolean;
|
|
29
|
+
IncludeDebug?: boolean;
|
|
30
|
+
}
|
|
31
|
+
interface Column {
|
|
32
|
+
ColumnLabel?: string;
|
|
33
|
+
ColumnTypeName?: string;
|
|
34
|
+
Precision?: unsignedInt;
|
|
35
|
+
Scale?: unsignedInt;
|
|
36
|
+
}
|
|
37
|
+
interface ResultSetMetadata {
|
|
38
|
+
Column?: Column[];
|
|
39
|
+
}
|
|
40
|
+
interface ExecuteQueryResponse {
|
|
41
|
+
Exceptions?: Exceptions;
|
|
42
|
+
CursorId?: string;
|
|
43
|
+
InitMs?: double;
|
|
44
|
+
PrepareMs?: double;
|
|
45
|
+
ResultSetMetadata?: ResultSetMetadata;
|
|
46
|
+
}
|
|
47
|
+
interface ExplainQueryRequest {
|
|
48
|
+
SQLText?: string;
|
|
49
|
+
}
|
|
50
|
+
interface ExplainQueryResponse {
|
|
51
|
+
Exceptions?: Exceptions;
|
|
52
|
+
Plan?: string;
|
|
53
|
+
PlanJSON?: string;
|
|
54
|
+
ResultSetMetadata?: ResultSetMetadata;
|
|
55
|
+
}
|
|
56
|
+
interface FetchResultSetRequest {
|
|
57
|
+
CursorId?: string;
|
|
58
|
+
RowCount?: unsignedInt;
|
|
59
|
+
}
|
|
60
|
+
interface Start {
|
|
61
|
+
DuckDBUsedBytes?: long;
|
|
62
|
+
DuckDBTempBytes?: long;
|
|
63
|
+
HeapInUseBytes?: long;
|
|
64
|
+
ResidentBytes?: long;
|
|
65
|
+
PeakResidentBytes?: long;
|
|
66
|
+
}
|
|
67
|
+
interface Current {
|
|
68
|
+
DuckDBUsedBytes?: long;
|
|
69
|
+
DuckDBTempBytes?: long;
|
|
70
|
+
HeapInUseBytes?: long;
|
|
71
|
+
ResidentBytes?: long;
|
|
72
|
+
PeakResidentBytes?: long;
|
|
73
|
+
}
|
|
74
|
+
interface Released {
|
|
75
|
+
DuckDBUsedBytes?: long;
|
|
76
|
+
DuckDBTempBytes?: long;
|
|
77
|
+
HeapInUseBytes?: long;
|
|
78
|
+
ResidentBytes?: long;
|
|
79
|
+
PeakResidentBytes?: long;
|
|
80
|
+
}
|
|
81
|
+
interface Retained {
|
|
82
|
+
DuckDBUsedBytes?: long;
|
|
83
|
+
DuckDBTempBytes?: long;
|
|
84
|
+
HeapInUseBytes?: long;
|
|
85
|
+
ResidentBytes?: long;
|
|
86
|
+
PeakResidentBytes?: long;
|
|
87
|
+
}
|
|
88
|
+
interface ScanObjectsCreated {
|
|
89
|
+
BindData?: long;
|
|
90
|
+
GlobalStates?: long;
|
|
91
|
+
LocalStates?: long;
|
|
92
|
+
}
|
|
93
|
+
interface ScanObjectsLive {
|
|
94
|
+
BindData?: long;
|
|
95
|
+
GlobalStates?: long;
|
|
96
|
+
LocalStates?: long;
|
|
97
|
+
}
|
|
98
|
+
interface DebugInfo {
|
|
99
|
+
Start?: Start;
|
|
100
|
+
Current?: Current;
|
|
101
|
+
Released?: Released;
|
|
102
|
+
Retained?: Retained;
|
|
103
|
+
ScanObjectsCreated?: ScanObjectsCreated;
|
|
104
|
+
ScanObjectsLive?: ScanObjectsLive;
|
|
105
|
+
LeakCheck?: string;
|
|
106
|
+
LeakCheckDetail?: string;
|
|
107
|
+
}
|
|
108
|
+
interface FetchResultSetResponse {
|
|
109
|
+
Exceptions?: Exceptions;
|
|
110
|
+
RowsJSON?: string;
|
|
111
|
+
RowCount?: unsignedInt;
|
|
112
|
+
Complete?: boolean;
|
|
113
|
+
ExecuteMs?: double;
|
|
114
|
+
RuntimeGraph?: string;
|
|
115
|
+
RuntimeGraphJSON?: string;
|
|
116
|
+
DebugInfo?: DebugInfo;
|
|
117
|
+
}
|
|
118
|
+
interface LogicalFileMetadataRequest {
|
|
119
|
+
LogicalName?: string;
|
|
120
|
+
}
|
|
121
|
+
interface LogicalFileMetadata {
|
|
122
|
+
Version?: unsignedInt;
|
|
123
|
+
LogicalName?: string;
|
|
124
|
+
Kind?: string;
|
|
125
|
+
Format?: string;
|
|
126
|
+
Grouped?: boolean;
|
|
127
|
+
FormatCrc?: unsignedInt;
|
|
128
|
+
RecordTranslationMode?: unsignedInt;
|
|
129
|
+
Modified?: long;
|
|
130
|
+
RecordCount?: uint64;
|
|
131
|
+
FormatOptions?: string;
|
|
132
|
+
ProviderOptions?: string;
|
|
133
|
+
EclRecord?: string;
|
|
134
|
+
FileParts?: string;
|
|
135
|
+
SampleSQL?: string;
|
|
136
|
+
}
|
|
137
|
+
interface LogicalFileMetadataResponse {
|
|
138
|
+
Exceptions?: Exceptions;
|
|
139
|
+
LogicalFileMetadata?: LogicalFileMetadata;
|
|
140
|
+
}
|
|
141
|
+
interface WsSQL2PingRequest {
|
|
142
|
+
}
|
|
143
|
+
interface WsSQL2PingResponse {
|
|
144
|
+
}
|
|
145
|
+
interface SplitQueryRequest {
|
|
146
|
+
SQLText?: string;
|
|
147
|
+
}
|
|
148
|
+
interface Statements {
|
|
149
|
+
Statement?: string[];
|
|
150
|
+
}
|
|
151
|
+
interface SplitQueryResponse {
|
|
152
|
+
Exceptions?: Exceptions;
|
|
153
|
+
Statements?: Statements;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
export declare class SQL2ServiceBase extends Service {
|
|
157
|
+
constructor(optsConnection: IOptions | IConnection);
|
|
158
|
+
CloseResultSet(request: WsSQL2.CloseResultSetRequest, abortSignal?: AbortSignal): Promise<WsSQL2.CloseResultSetResponse>;
|
|
159
|
+
ExecuteQuery(request: WsSQL2.ExecuteQueryRequest, abortSignal?: AbortSignal): Promise<WsSQL2.ExecuteQueryResponse>;
|
|
160
|
+
ExplainQuery(request: WsSQL2.ExplainQueryRequest, abortSignal?: AbortSignal): Promise<WsSQL2.ExplainQueryResponse>;
|
|
161
|
+
FetchResultSet(request: WsSQL2.FetchResultSetRequest, abortSignal?: AbortSignal): Promise<WsSQL2.FetchResultSetResponse>;
|
|
162
|
+
LogicalFileMetadata(request: WsSQL2.LogicalFileMetadataRequest, abortSignal?: AbortSignal): Promise<WsSQL2.LogicalFileMetadataResponse>;
|
|
163
|
+
Ping(request: WsSQL2.WsSQL2PingRequest, abortSignal?: AbortSignal): Promise<WsSQL2.WsSQL2PingResponse>;
|
|
164
|
+
SplitQuery(request: WsSQL2.SplitQueryRequest, abortSignal?: AbortSignal): Promise<WsSQL2.SplitQueryResponse>;
|
|
165
|
+
}
|