@hpcc-js/comms 3.22.1 → 3.23.0
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 +11 -10
- 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 +222 -0
- package/src/services/wsdl/WsSQL2/v1.00/WsSQL2.ts +222 -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.00/WsSQL2.d.ts +164 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { IConnection, IOptions } from "../../../../connection.ts";
|
|
2
|
+
import { Service } from "../../../../espConnection.ts";
|
|
3
|
+
|
|
4
|
+
export namespace WsSQL2 {
|
|
5
|
+
|
|
6
|
+
export type double = number;
|
|
7
|
+
export type unsignedInt = number;
|
|
8
|
+
export type long = number;
|
|
9
|
+
export type uint64 = number;
|
|
10
|
+
|
|
11
|
+
export interface CloseResultSetRequest {
|
|
12
|
+
CursorId?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface Exception {
|
|
16
|
+
Code?: string;
|
|
17
|
+
Audience?: string;
|
|
18
|
+
Source?: string;
|
|
19
|
+
Message?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface Exceptions {
|
|
23
|
+
Source?: string;
|
|
24
|
+
Exception?: Exception[];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface CloseResultSetResponse {
|
|
28
|
+
Exceptions?: Exceptions;
|
|
29
|
+
Closed?: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ExecuteQueryRequest {
|
|
33
|
+
SqlText?: string;
|
|
34
|
+
IncludeRuntimeGraph?: boolean;
|
|
35
|
+
IncludeResultSetMetadata?: boolean;
|
|
36
|
+
IncludeDebug?: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface Column {
|
|
40
|
+
ColumnLabel?: string;
|
|
41
|
+
ColumnTypeName?: string;
|
|
42
|
+
Precision?: unsignedInt;
|
|
43
|
+
Scale?: unsignedInt;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface ResultSetMetadata {
|
|
47
|
+
Column?: Column[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface ExecuteQueryResponse {
|
|
51
|
+
Exceptions?: Exceptions;
|
|
52
|
+
CursorId?: string;
|
|
53
|
+
InitMs?: double;
|
|
54
|
+
PrepareMs?: double;
|
|
55
|
+
ResultSetMetadata?: ResultSetMetadata;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface ExplainQueryRequest {
|
|
59
|
+
SqlText?: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface ExplainQueryResponse {
|
|
63
|
+
Exceptions?: Exceptions;
|
|
64
|
+
Plan?: string;
|
|
65
|
+
PlanJson?: string;
|
|
66
|
+
ResultSetMetadata?: ResultSetMetadata;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface FetchResultSetRequest {
|
|
70
|
+
CursorId?: string;
|
|
71
|
+
FetchSize?: unsignedInt;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface Start {
|
|
75
|
+
DuckDBUsedBytes?: long;
|
|
76
|
+
DuckDBTempBytes?: long;
|
|
77
|
+
HeapInUseBytes?: long;
|
|
78
|
+
ResidentBytes?: long;
|
|
79
|
+
PeakResidentBytes?: long;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface Current {
|
|
83
|
+
DuckDBUsedBytes?: long;
|
|
84
|
+
DuckDBTempBytes?: long;
|
|
85
|
+
HeapInUseBytes?: long;
|
|
86
|
+
ResidentBytes?: long;
|
|
87
|
+
PeakResidentBytes?: long;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface Released {
|
|
91
|
+
DuckDBUsedBytes?: long;
|
|
92
|
+
DuckDBTempBytes?: long;
|
|
93
|
+
HeapInUseBytes?: long;
|
|
94
|
+
ResidentBytes?: long;
|
|
95
|
+
PeakResidentBytes?: long;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface Retained {
|
|
99
|
+
DuckDBUsedBytes?: long;
|
|
100
|
+
DuckDBTempBytes?: long;
|
|
101
|
+
HeapInUseBytes?: long;
|
|
102
|
+
ResidentBytes?: long;
|
|
103
|
+
PeakResidentBytes?: long;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface ScanObjectsCreated {
|
|
107
|
+
BindData?: long;
|
|
108
|
+
GlobalStates?: long;
|
|
109
|
+
LocalStates?: long;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface ScanObjectsLive {
|
|
113
|
+
BindData?: long;
|
|
114
|
+
GlobalStates?: long;
|
|
115
|
+
LocalStates?: long;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface DebugInfo {
|
|
119
|
+
Start?: Start;
|
|
120
|
+
Current?: Current;
|
|
121
|
+
Released?: Released;
|
|
122
|
+
Retained?: Retained;
|
|
123
|
+
ScanObjectsCreated?: ScanObjectsCreated;
|
|
124
|
+
ScanObjectsLive?: ScanObjectsLive;
|
|
125
|
+
LeakCheck?: string;
|
|
126
|
+
LeakCheckDetail?: string;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface FetchResultSetResponse {
|
|
130
|
+
Exceptions?: Exceptions;
|
|
131
|
+
Rows?: string;
|
|
132
|
+
Complete?: boolean;
|
|
133
|
+
ExecuteMs?: double;
|
|
134
|
+
RuntimeGraph?: string;
|
|
135
|
+
RuntimeGraphJson?: string;
|
|
136
|
+
DebugInfo?: DebugInfo;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface LogicalFileMetaRequest {
|
|
140
|
+
LogicalName?: string;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export interface LogicalFileMeta {
|
|
144
|
+
Version?: unsignedInt;
|
|
145
|
+
LogicalName?: string;
|
|
146
|
+
Kind?: string;
|
|
147
|
+
Format?: string;
|
|
148
|
+
Grouped?: boolean;
|
|
149
|
+
FormatCrc?: unsignedInt;
|
|
150
|
+
RecordTranslationMode?: unsignedInt;
|
|
151
|
+
Modified?: long;
|
|
152
|
+
RecordCount?: uint64;
|
|
153
|
+
FormatOptions?: string;
|
|
154
|
+
ProviderOptions?: string;
|
|
155
|
+
EclRecord?: string;
|
|
156
|
+
FileParts?: string;
|
|
157
|
+
SampleSQL?: string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface LogicalFileMetaResponse {
|
|
161
|
+
Exceptions?: Exceptions;
|
|
162
|
+
LogicalFileMeta?: LogicalFileMeta;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface WsSQL2PingRequest {
|
|
166
|
+
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface WsSQL2PingResponse {
|
|
170
|
+
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface SplitQueryRequest {
|
|
174
|
+
SqlText?: string;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export interface Statements {
|
|
178
|
+
Statement?: string[];
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface SplitQueryResponse {
|
|
182
|
+
Exceptions?: Exceptions;
|
|
183
|
+
Statements?: Statements;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export class SQL2ServiceBase extends Service {
|
|
189
|
+
|
|
190
|
+
constructor(optsConnection: IOptions | IConnection) {
|
|
191
|
+
super(optsConnection, "WsSQL2", "1.00");
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
CloseResultSet(request: WsSQL2.CloseResultSetRequest, abortSignal?: AbortSignal): Promise<WsSQL2.CloseResultSetResponse> {
|
|
195
|
+
return this._connection.send("CloseResultSet", request, "json", false, abortSignal, "CloseResultSetResponse");
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
ExecuteQuery(request: WsSQL2.ExecuteQueryRequest, abortSignal?: AbortSignal): Promise<WsSQL2.ExecuteQueryResponse> {
|
|
199
|
+
return this._connection.send("ExecuteQuery", request, "json", false, abortSignal, "ExecuteQueryResponse");
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
ExplainQuery(request: WsSQL2.ExplainQueryRequest, abortSignal?: AbortSignal): Promise<WsSQL2.ExplainQueryResponse> {
|
|
203
|
+
return this._connection.send("ExplainQuery", request, "json", false, abortSignal, "ExplainQueryResponse");
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
FetchResultSet(request: WsSQL2.FetchResultSetRequest, abortSignal?: AbortSignal): Promise<WsSQL2.FetchResultSetResponse> {
|
|
207
|
+
return this._connection.send("FetchResultSet", request, "json", false, abortSignal, "FetchResultSetResponse");
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
LogicalFileMeta(request: WsSQL2.LogicalFileMetaRequest, abortSignal?: AbortSignal): Promise<WsSQL2.LogicalFileMetaResponse> {
|
|
211
|
+
return this._connection.send("LogicalFileMeta", request, "json", false, abortSignal, "LogicalFileMetaResponse");
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
Ping(request: WsSQL2.WsSQL2PingRequest, abortSignal?: AbortSignal): Promise<WsSQL2.WsSQL2PingResponse> {
|
|
215
|
+
return this._connection.send("Ping", request, "json", false, abortSignal, "WsSQL2PingResponse");
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
SplitQuery(request: WsSQL2.SplitQueryRequest, abortSignal?: AbortSignal): Promise<WsSQL2.SplitQueryResponse> {
|
|
219
|
+
return this._connection.send("SplitQuery", request, "json", false, abortSignal, "SplitQueryResponse");
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { IConnection, IOptions } from "../../../../connection.ts";
|
|
2
|
+
import { Service } from "../../../../espConnection.ts";
|
|
3
|
+
|
|
4
|
+
export namespace WsSQL2 {
|
|
5
|
+
|
|
6
|
+
export type double = number;
|
|
7
|
+
export type unsignedInt = number;
|
|
8
|
+
export type long = number;
|
|
9
|
+
export type uint64 = number;
|
|
10
|
+
|
|
11
|
+
export interface CloseResultSetRequest {
|
|
12
|
+
CursorId?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface Exception {
|
|
16
|
+
Code?: string;
|
|
17
|
+
Audience?: string;
|
|
18
|
+
Source?: string;
|
|
19
|
+
Message?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface Exceptions {
|
|
23
|
+
Source?: string;
|
|
24
|
+
Exception?: Exception[];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface CloseResultSetResponse {
|
|
28
|
+
Exceptions?: Exceptions;
|
|
29
|
+
Closed?: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ExecuteQueryRequest {
|
|
33
|
+
SqlText?: string;
|
|
34
|
+
IncludeRuntimeGraph?: boolean;
|
|
35
|
+
IncludeResultSetMetadata?: boolean;
|
|
36
|
+
IncludeDebug?: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface Column {
|
|
40
|
+
ColumnLabel?: string;
|
|
41
|
+
ColumnTypeName?: string;
|
|
42
|
+
Precision?: unsignedInt;
|
|
43
|
+
Scale?: unsignedInt;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface ResultSetMetadata {
|
|
47
|
+
Column?: Column[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface ExecuteQueryResponse {
|
|
51
|
+
Exceptions?: Exceptions;
|
|
52
|
+
CursorId?: string;
|
|
53
|
+
InitMs?: double;
|
|
54
|
+
PrepareMs?: double;
|
|
55
|
+
ResultSetMetadata?: ResultSetMetadata;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface ExplainQueryRequest {
|
|
59
|
+
SqlText?: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface ExplainQueryResponse {
|
|
63
|
+
Exceptions?: Exceptions;
|
|
64
|
+
Plan?: string;
|
|
65
|
+
PlanJson?: string;
|
|
66
|
+
ResultSetMetadata?: ResultSetMetadata;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface FetchResultSetRequest {
|
|
70
|
+
CursorId?: string;
|
|
71
|
+
FetchSize?: unsignedInt;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface Start {
|
|
75
|
+
DuckDBUsedBytes?: long;
|
|
76
|
+
DuckDBTempBytes?: long;
|
|
77
|
+
HeapInUseBytes?: long;
|
|
78
|
+
ResidentBytes?: long;
|
|
79
|
+
PeakResidentBytes?: long;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface Current {
|
|
83
|
+
DuckDBUsedBytes?: long;
|
|
84
|
+
DuckDBTempBytes?: long;
|
|
85
|
+
HeapInUseBytes?: long;
|
|
86
|
+
ResidentBytes?: long;
|
|
87
|
+
PeakResidentBytes?: long;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface Released {
|
|
91
|
+
DuckDBUsedBytes?: long;
|
|
92
|
+
DuckDBTempBytes?: long;
|
|
93
|
+
HeapInUseBytes?: long;
|
|
94
|
+
ResidentBytes?: long;
|
|
95
|
+
PeakResidentBytes?: long;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface Retained {
|
|
99
|
+
DuckDBUsedBytes?: long;
|
|
100
|
+
DuckDBTempBytes?: long;
|
|
101
|
+
HeapInUseBytes?: long;
|
|
102
|
+
ResidentBytes?: long;
|
|
103
|
+
PeakResidentBytes?: long;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface ScanObjectsCreated {
|
|
107
|
+
BindData?: long;
|
|
108
|
+
GlobalStates?: long;
|
|
109
|
+
LocalStates?: long;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface ScanObjectsLive {
|
|
113
|
+
BindData?: long;
|
|
114
|
+
GlobalStates?: long;
|
|
115
|
+
LocalStates?: long;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface DebugInfo {
|
|
119
|
+
Start?: Start;
|
|
120
|
+
Current?: Current;
|
|
121
|
+
Released?: Released;
|
|
122
|
+
Retained?: Retained;
|
|
123
|
+
ScanObjectsCreated?: ScanObjectsCreated;
|
|
124
|
+
ScanObjectsLive?: ScanObjectsLive;
|
|
125
|
+
LeakCheck?: string;
|
|
126
|
+
LeakCheckDetail?: string;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface FetchResultSetResponse {
|
|
130
|
+
Exceptions?: Exceptions;
|
|
131
|
+
Rows?: string;
|
|
132
|
+
Complete?: boolean;
|
|
133
|
+
ExecuteMs?: double;
|
|
134
|
+
RuntimeGraph?: string;
|
|
135
|
+
RuntimeGraphJson?: string;
|
|
136
|
+
DebugInfo?: DebugInfo;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface LogicalFileMetaRequest {
|
|
140
|
+
LogicalName?: string;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export interface LogicalFileMeta {
|
|
144
|
+
Version?: unsignedInt;
|
|
145
|
+
LogicalName?: string;
|
|
146
|
+
Kind?: string;
|
|
147
|
+
Format?: string;
|
|
148
|
+
Grouped?: boolean;
|
|
149
|
+
FormatCrc?: unsignedInt;
|
|
150
|
+
RecordTranslationMode?: unsignedInt;
|
|
151
|
+
Modified?: long;
|
|
152
|
+
RecordCount?: uint64;
|
|
153
|
+
FormatOptions?: string;
|
|
154
|
+
ProviderOptions?: string;
|
|
155
|
+
EclRecord?: string;
|
|
156
|
+
FileParts?: string;
|
|
157
|
+
SampleSQL?: string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface LogicalFileMetaResponse {
|
|
161
|
+
Exceptions?: Exceptions;
|
|
162
|
+
LogicalFileMeta?: LogicalFileMeta;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface WsSQL2PingRequest {
|
|
166
|
+
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface WsSQL2PingResponse {
|
|
170
|
+
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface SplitQueryRequest {
|
|
174
|
+
SqlText?: string;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export interface Statements {
|
|
178
|
+
Statement?: string[];
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface SplitQueryResponse {
|
|
182
|
+
Exceptions?: Exceptions;
|
|
183
|
+
Statements?: Statements;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export class SQL2ServiceBase extends Service {
|
|
189
|
+
|
|
190
|
+
constructor(optsConnection: IOptions | IConnection) {
|
|
191
|
+
super(optsConnection, "WsSQL2", "1.00");
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
CloseResultSet(request: WsSQL2.CloseResultSetRequest, abortSignal?: AbortSignal): Promise<WsSQL2.CloseResultSetResponse> {
|
|
195
|
+
return this._connection.send("CloseResultSet", request, "json", false, abortSignal, "CloseResultSetResponse");
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
ExecuteQuery(request: WsSQL2.ExecuteQueryRequest, abortSignal?: AbortSignal): Promise<WsSQL2.ExecuteQueryResponse> {
|
|
199
|
+
return this._connection.send("ExecuteQuery", request, "json", false, abortSignal, "ExecuteQueryResponse");
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
ExplainQuery(request: WsSQL2.ExplainQueryRequest, abortSignal?: AbortSignal): Promise<WsSQL2.ExplainQueryResponse> {
|
|
203
|
+
return this._connection.send("ExplainQuery", request, "json", false, abortSignal, "ExplainQueryResponse");
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
FetchResultSet(request: WsSQL2.FetchResultSetRequest, abortSignal?: AbortSignal): Promise<WsSQL2.FetchResultSetResponse> {
|
|
207
|
+
return this._connection.send("FetchResultSet", request, "json", false, abortSignal, "FetchResultSetResponse");
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
LogicalFileMeta(request: WsSQL2.LogicalFileMetaRequest, abortSignal?: AbortSignal): Promise<WsSQL2.LogicalFileMetaResponse> {
|
|
211
|
+
return this._connection.send("LogicalFileMeta", request, "json", false, abortSignal, "LogicalFileMetaResponse");
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
Ping(request: WsSQL2.WsSQL2PingRequest, abortSignal?: AbortSignal): Promise<WsSQL2.WsSQL2PingResponse> {
|
|
215
|
+
return this._connection.send("Ping", request, "json", false, abortSignal, "WsSQL2PingResponse");
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
SplitQuery(request: WsSQL2.SplitQueryRequest, abortSignal?: AbortSignal): Promise<WsSQL2.SplitQueryResponse> {
|
|
219
|
+
return this._connection.send("SplitQuery", request, "json", false, abortSignal, "SplitQueryResponse");
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
}
|
|
@@ -76,6 +76,9 @@ export declare class DFUWorkunit extends StateObject<UDFUWorkunitState, IDFUWork
|
|
|
76
76
|
get FileAccessCost(): number;
|
|
77
77
|
get KbPerSecAve(): number;
|
|
78
78
|
get KbPerSec(): number;
|
|
79
|
+
get SubTaskCount(): number;
|
|
80
|
+
get SubTasksFinished(): number;
|
|
81
|
+
get SubTasksFailed(): number;
|
|
79
82
|
static create(optsConnection: IOptions | IConnection, dfuServerQueue: string): Promise<DFUWorkunit>;
|
|
80
83
|
static attach(optsConnection: IOptions | IConnection, wuid: string, state?: IDFUWorkunitState): DFUWorkunit;
|
|
81
84
|
static sprayFixed(server: IOptions | IConnection, request: Partial<FileSpray.SprayFixed>): Promise<DFUWorkunit>;
|
|
@@ -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.LogicalFileMeta | 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;
|