@databricks/sql 0.1.8-beta.1 → 1.0.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/CHANGELOG.md +45 -1
- package/NOTICE +35 -0
- package/README.md +41 -20
- package/dist/DBSQLClient.d.ts +34 -39
- package/dist/DBSQLClient.js +137 -98
- package/dist/DBSQLClient.js.map +1 -1
- package/dist/DBSQLLogger.d.ts +12 -0
- package/dist/DBSQLLogger.js +43 -0
- package/dist/DBSQLLogger.js.map +1 -0
- package/dist/DBSQLOperation/CompleteOperationHelper.d.ts +13 -0
- package/dist/DBSQLOperation/CompleteOperationHelper.js +61 -0
- package/dist/DBSQLOperation/CompleteOperationHelper.js.map +1 -0
- package/dist/DBSQLOperation/FetchResultsHelper.d.ts +14 -0
- package/dist/DBSQLOperation/FetchResultsHelper.js +79 -0
- package/dist/DBSQLOperation/FetchResultsHelper.js.map +1 -0
- package/dist/DBSQLOperation/OperationStatusHelper.d.ts +17 -0
- package/dist/DBSQLOperation/OperationStatusHelper.js +115 -0
- package/dist/DBSQLOperation/OperationStatusHelper.js.map +1 -0
- package/dist/DBSQLOperation/SchemaHelper.d.ts +10 -0
- package/dist/DBSQLOperation/SchemaHelper.js +39 -0
- package/dist/DBSQLOperation/SchemaHelper.js.map +1 -0
- package/dist/DBSQLOperation/getResult.d.ts +2 -0
- package/dist/DBSQLOperation/getResult.js +19 -0
- package/dist/DBSQLOperation/getResult.js.map +1 -0
- package/dist/DBSQLOperation/index.d.ts +55 -0
- package/dist/DBSQLOperation/index.js +139 -0
- package/dist/DBSQLOperation/index.js.map +1 -0
- package/dist/DBSQLSession.d.ts +99 -0
- package/dist/DBSQLSession.js +187 -0
- package/dist/DBSQLSession.js.map +1 -0
- package/dist/connection/auth/NoSaslAuthentication.d.ts +2 -2
- package/dist/connection/auth/NoSaslAuthentication.js +9 -9
- package/dist/connection/auth/NoSaslAuthentication.js.map +1 -1
- package/dist/connection/auth/PlainHttpAuthentication.d.ts +2 -2
- package/dist/connection/auth/PlainHttpAuthentication.js +9 -21
- package/dist/connection/auth/PlainHttpAuthentication.js.map +1 -1
- package/dist/connection/auth/helpers/SaslPackageFactory.js +5 -9
- package/dist/connection/auth/helpers/SaslPackageFactory.js.map +1 -1
- package/dist/connection/connections/HttpConnection.d.ts +4 -4
- package/dist/connection/connections/HttpConnection.js +42 -47
- package/dist/connection/connections/HttpConnection.js.map +1 -1
- package/dist/connection/contracts/IAuthentication.d.ts +1 -1
- package/dist/connection/transports/HttpTransport.d.ts +1 -1
- package/dist/connection/transports/HttpTransport.js +16 -31
- package/dist/connection/transports/HttpTransport.js.map +1 -1
- package/dist/contracts/IDBSQLClient.d.ts +21 -0
- package/dist/contracts/{IHiveClient.js → IDBSQLClient.js} +1 -1
- package/dist/contracts/IDBSQLClient.js.map +1 -0
- package/dist/contracts/IDBSQLLogger.d.ts +13 -0
- package/dist/contracts/IDBSQLLogger.js +11 -0
- package/dist/contracts/IDBSQLLogger.js.map +1 -0
- package/dist/contracts/{IHiveSession.d.ts → IDBSQLSession.d.ts} +59 -45
- package/dist/contracts/{IHiveSession.js → IDBSQLSession.js} +1 -1
- package/dist/contracts/IDBSQLSession.js.map +1 -0
- package/dist/contracts/IOperation.d.ts +26 -23
- package/dist/dto/InfoValue.d.ts +5 -3
- package/dist/dto/InfoValue.js +11 -14
- package/dist/dto/InfoValue.js.map +1 -1
- package/dist/dto/Status.js +9 -10
- package/dist/dto/Status.js.map +1 -1
- package/dist/errors/AuthenticationError.d.ts +1 -1
- package/dist/errors/AuthenticationError.js +3 -23
- package/dist/errors/AuthenticationError.js.map +1 -1
- package/dist/errors/HiveDriverError.js +2 -22
- package/dist/errors/HiveDriverError.js.map +1 -1
- package/dist/errors/OperationStateError.d.ts +4 -4
- package/dist/errors/OperationStateError.js +6 -24
- package/dist/errors/OperationStateError.js.map +1 -1
- package/dist/errors/StatusError.d.ts +2 -2
- package/dist/errors/StatusError.js +3 -4
- package/dist/errors/StatusError.js.map +1 -1
- package/dist/factory/StatusFactory.d.ts +2 -4
- package/dist/factory/StatusFactory.js +16 -21
- package/dist/factory/StatusFactory.js.map +1 -1
- package/dist/hive/Commands/BaseCommand.d.ts +3 -4
- package/dist/hive/Commands/BaseCommand.js +10 -12
- package/dist/hive/Commands/BaseCommand.js.map +1 -1
- package/dist/hive/Commands/CancelDelegationTokenCommand.d.ts +3 -10
- package/dist/hive/Commands/CancelDelegationTokenCommand.js +7 -26
- package/dist/hive/Commands/CancelDelegationTokenCommand.js.map +1 -1
- package/dist/hive/Commands/CancelOperationCommand.d.ts +3 -9
- package/dist/hive/Commands/CancelOperationCommand.js +7 -26
- package/dist/hive/Commands/CancelOperationCommand.js.map +1 -1
- package/dist/hive/Commands/CloseOperationCommand.d.ts +3 -9
- package/dist/hive/Commands/CloseOperationCommand.js +7 -26
- package/dist/hive/Commands/CloseOperationCommand.js.map +1 -1
- package/dist/hive/Commands/CloseSessionCommand.d.ts +3 -9
- package/dist/hive/Commands/CloseSessionCommand.js +7 -26
- package/dist/hive/Commands/CloseSessionCommand.js.map +1 -1
- package/dist/hive/Commands/ExecuteStatementCommand.d.ts +3 -15
- package/dist/hive/Commands/ExecuteStatementCommand.js +7 -26
- package/dist/hive/Commands/ExecuteStatementCommand.js.map +1 -1
- package/dist/hive/Commands/FetchResultsCommand.d.ts +4 -16
- package/dist/hive/Commands/FetchResultsCommand.js +10 -26
- package/dist/hive/Commands/FetchResultsCommand.js.map +1 -1
- package/dist/hive/Commands/GetCatalogsCommand.d.ts +3 -10
- package/dist/hive/Commands/GetCatalogsCommand.js +7 -26
- package/dist/hive/Commands/GetCatalogsCommand.js.map +1 -1
- package/dist/hive/Commands/GetColumnsCommand.d.ts +3 -14
- package/dist/hive/Commands/GetColumnsCommand.js +7 -26
- package/dist/hive/Commands/GetColumnsCommand.js.map +1 -1
- package/dist/hive/Commands/GetCrossReferenceCommand.d.ts +3 -16
- package/dist/hive/Commands/GetCrossReferenceCommand.js +7 -26
- package/dist/hive/Commands/GetCrossReferenceCommand.js.map +1 -1
- package/dist/hive/Commands/GetDelegationTokenCommand.d.ts +3 -12
- package/dist/hive/Commands/GetDelegationTokenCommand.js +7 -26
- package/dist/hive/Commands/GetDelegationTokenCommand.js.map +1 -1
- package/dist/hive/Commands/GetFunctionsCommand.d.ts +3 -13
- package/dist/hive/Commands/GetFunctionsCommand.js +7 -26
- package/dist/hive/Commands/GetFunctionsCommand.js.map +1 -1
- package/dist/hive/Commands/GetInfoCommand.d.ts +3 -14
- package/dist/hive/Commands/GetInfoCommand.js +7 -26
- package/dist/hive/Commands/GetInfoCommand.js.map +1 -1
- package/dist/hive/Commands/GetOperationStatusCommand.d.ts +3 -21
- package/dist/hive/Commands/GetOperationStatusCommand.js +7 -26
- package/dist/hive/Commands/GetOperationStatusCommand.js.map +1 -1
- package/dist/hive/Commands/GetPrimaryKeysCommand.d.ts +3 -13
- package/dist/hive/Commands/GetPrimaryKeysCommand.js +7 -26
- package/dist/hive/Commands/GetPrimaryKeysCommand.js.map +1 -1
- package/dist/hive/Commands/GetResultSetMetadataCommand.d.ts +3 -10
- package/dist/hive/Commands/GetResultSetMetadataCommand.js +7 -26
- package/dist/hive/Commands/GetResultSetMetadataCommand.js.map +1 -1
- package/dist/hive/Commands/GetSchemasCommand.d.ts +3 -12
- package/dist/hive/Commands/GetSchemasCommand.js +7 -26
- package/dist/hive/Commands/GetSchemasCommand.js.map +1 -1
- package/dist/hive/Commands/GetTableTypesCommand.d.ts +3 -10
- package/dist/hive/Commands/GetTableTypesCommand.js +7 -26
- package/dist/hive/Commands/GetTableTypesCommand.js.map +1 -1
- package/dist/hive/Commands/GetTablesCommand.d.ts +3 -14
- package/dist/hive/Commands/GetTablesCommand.js +7 -26
- package/dist/hive/Commands/GetTablesCommand.js.map +1 -1
- package/dist/hive/Commands/GetTypeInfoCommand.d.ts +3 -10
- package/dist/hive/Commands/GetTypeInfoCommand.js +7 -26
- package/dist/hive/Commands/GetTypeInfoCommand.js.map +1 -1
- package/dist/hive/Commands/OpenSessionCommand.d.ts +9 -28
- package/dist/hive/Commands/OpenSessionCommand.js +16 -26
- package/dist/hive/Commands/OpenSessionCommand.js.map +1 -1
- package/dist/hive/Commands/RenewDelegationTokenCommand.d.ts +3 -10
- package/dist/hive/Commands/RenewDelegationTokenCommand.js +7 -26
- package/dist/hive/Commands/RenewDelegationTokenCommand.js.map +1 -1
- package/dist/hive/HiveDriver.d.ts +24 -49
- package/dist/hive/HiveDriver.js +87 -99
- package/dist/hive/HiveDriver.js.map +1 -1
- package/dist/hive/Types/index.d.ts +7 -218
- package/dist/hive/Types/index.js +11 -2
- package/dist/hive/Types/index.js.map +1 -1
- package/dist/index.d.ts +16 -16
- package/dist/index.js +19 -51
- package/dist/index.js.map +1 -1
- package/dist/result/IOperationResult.d.ts +0 -2
- package/dist/result/JsonResult.d.ts +5 -8
- package/dist/result/JsonResult.js +81 -99
- package/dist/result/JsonResult.js.map +1 -1
- package/dist/result/NullResult.d.ts +1 -3
- package/dist/result/NullResult.js +4 -8
- package/dist/result/NullResult.js.map +1 -1
- package/dist/utils/buildUserAgentString.d.ts +1 -0
- package/dist/utils/buildUserAgentString.js +25 -0
- package/dist/utils/buildUserAgentString.js.map +1 -0
- package/dist/utils/definedOrError.d.ts +1 -0
- package/dist/utils/definedOrError.js +10 -0
- package/dist/utils/definedOrError.js.map +1 -0
- package/dist/utils/formatProgress.d.ts +9 -0
- package/dist/utils/formatProgress.js +24 -0
- package/dist/utils/formatProgress.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +37 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +28 -7
- package/thrift/TCLIService.d.ts +196 -0
- package/thrift/{gen-nodejs/TCLIService.js → TCLIService.js} +1 -397
- package/thrift/TCLIService_types.d.ts +947 -0
- package/thrift/{gen-nodejs/TCLIService_types.js → TCLIService_types.js} +2830 -516
- package/.gitattributes +0 -32
- package/CONTRIBUTING.md +0 -55
- package/dist/HiveClient.d.ts +0 -35
- package/dist/HiveClient.js +0 -156
- package/dist/HiveClient.js.map +0 -1
- package/dist/HiveOperation.d.ts +0 -65
- package/dist/HiveOperation.js +0 -190
- package/dist/HiveOperation.js.map +0 -1
- package/dist/HiveSession.d.ts +0 -30
- package/dist/HiveSession.js +0 -197
- package/dist/HiveSession.js.map +0 -1
- package/dist/contracts/IHiveClient.d.ts +0 -10
- package/dist/contracts/IHiveClient.js.map +0 -1
- package/dist/contracts/IHiveSession.js.map +0 -1
- package/dist/hive/Commands/GetQueryIdCommand.d.ts +0 -11
- package/dist/hive/Commands/GetQueryIdCommand.js +0 -34
- package/dist/hive/Commands/GetQueryIdCommand.js.map +0 -1
- package/dist/hive/Commands/SetClientInfoCommand.d.ts +0 -12
- package/dist/hive/Commands/SetClientInfoCommand.js +0 -34
- package/dist/hive/Commands/SetClientInfoCommand.js.map +0 -1
- package/dist/utils/GetResult.d.ts +0 -16
- package/dist/utils/GetResult.js +0 -38
- package/dist/utils/GetResult.js.map +0 -1
- package/dist/utils/HiveUtils.d.ts +0 -11
- package/dist/utils/HiveUtils.js +0 -39
- package/dist/utils/HiveUtils.js.map +0 -1
- package/dist/utils/ProgressUpdateTransformer.d.ts +0 -8
- package/dist/utils/ProgressUpdateTransformer.js +0 -33
- package/dist/utils/ProgressUpdateTransformer.js.map +0 -1
- package/dist/utils/WaitUntilReady.d.ts +0 -16
- package/dist/utils/WaitUntilReady.js +0 -120
- package/dist/utils/WaitUntilReady.js.map +0 -1
- package/docs/readme.md +0 -227
- package/docs/troubleshooting.md +0 -84
- package/examples/data_types.js +0 -173
- package/examples/repl +0 -106
- package/examples/session.js +0 -55
- package/examples/usage.js +0 -18
- package/nyc.config.js +0 -8
- package/tests/e2e/data_types.test.js +0 -353
- package/tests/e2e/utils/config.js +0 -20
- package/tests/e2e/utils/logger.js +0 -22
- package/tests/unit/HiveClient.test.js +0 -153
- package/tests/unit/HiveOperation.test.js +0 -340
- package/tests/unit/HiveSession.test.js +0 -146
- package/tests/unit/connection/auth/PlainHttpAuthentication.test.js +0 -44
- package/tests/unit/connection/connections/HttpConnection.test.js +0 -141
- package/tests/unit/dto/InfoValue.test.js +0 -50
- package/tests/unit/factory/StatusFactory.test.js +0 -62
- package/tests/unit/hive/HiveDriver.test.js +0 -115
- package/tests/unit/hive/commands/CancelDelegationTokenCommand.test.js +0 -43
- package/tests/unit/hive/commands/CancelOperationCommand.test.js +0 -45
- package/tests/unit/hive/commands/CloseOperationCommand.test.js +0 -45
- package/tests/unit/hive/commands/CloseSessionCommand.test.js +0 -38
- package/tests/unit/hive/commands/ExecuteStatementCommand.test.js +0 -54
- package/tests/unit/hive/commands/FetchResultsCommand.test.js +0 -59
- package/tests/unit/hive/commands/GetCatalogsCommand.test.js +0 -50
- package/tests/unit/hive/commands/GetColumnsCommand.test.js +0 -50
- package/tests/unit/hive/commands/GetCrossReferenceCommand.test.js +0 -56
- package/tests/unit/hive/commands/GetDelegationTokenCommand.test.js +0 -45
- package/tests/unit/hive/commands/GetFunctionsCommand.test.js +0 -50
- package/tests/unit/hive/commands/GetInfoCommand.test.js +0 -51
- package/tests/unit/hive/commands/GetOperationStatusCommand.test.js +0 -63
- package/tests/unit/hive/commands/GetPrimaryKeysCommand.test.js +0 -50
- package/tests/unit/hive/commands/GetQueryIdCommand.test.js +0 -42
- package/tests/unit/hive/commands/GetResultSetMetadataCommand.test.js +0 -54
- package/tests/unit/hive/commands/GetSchemasCommand.test.js +0 -52
- package/tests/unit/hive/commands/GetTableTypesCommand.test.js +0 -50
- package/tests/unit/hive/commands/GetTablesCommand.test.js +0 -54
- package/tests/unit/hive/commands/GetTypeInfoCommand.test.js +0 -50
- package/tests/unit/hive/commands/OpenSessionCommand.test.js +0 -43
- package/tests/unit/hive/commands/RenewDelegationTokenCommand.test.js +0 -43
- package/tests/unit/hive/commands/SetClientInfoCommand.test.js +0 -45
- package/tests/unit/result/JsonResult.test.js +0 -295
- package/tests/unit/utils/GetResult.test.js +0 -30
- package/tests/unit/utils/HiveUtils.test.js +0 -60
- package/tests/unit/utils/ProgressUpdateTransformer.test.js +0 -28
- package/tests/unit/utils/WaitUntilReady.test.js +0 -105
- package/thrift/TCLIService.thrift +0 -1299
- package/tsconfig.json +0 -13
package/dist/HiveSession.js
DELETED
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
var HiveOperation_1 = __importDefault(require("./HiveOperation"));
|
|
18
|
-
var StatusFactory_1 = __importDefault(require("./factory/StatusFactory"));
|
|
19
|
-
var InfoValue_1 = __importDefault(require("./dto/InfoValue"));
|
|
20
|
-
var HiveSession = /** @class */ (function () {
|
|
21
|
-
function HiveSession(driver, sessionHandle, TCLIService_types) {
|
|
22
|
-
this.driver = driver;
|
|
23
|
-
this.sessionHandle = sessionHandle;
|
|
24
|
-
this.TCLIService_types = TCLIService_types;
|
|
25
|
-
this.statusFactory = new StatusFactory_1.default(TCLIService_types);
|
|
26
|
-
}
|
|
27
|
-
HiveSession.prototype.getInfo = function (infoType) {
|
|
28
|
-
var _this = this;
|
|
29
|
-
return this.driver.getInfo({
|
|
30
|
-
sessionHandle: this.sessionHandle,
|
|
31
|
-
infoType: infoType
|
|
32
|
-
}).then(function (response) {
|
|
33
|
-
_this.assertStatus(response.status);
|
|
34
|
-
return new InfoValue_1.default(response.infoValue);
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
HiveSession.prototype.executeStatement = function (statement, options) {
|
|
38
|
-
var _this = this;
|
|
39
|
-
if (options === void 0) { options = {}; }
|
|
40
|
-
options = __assign({ runAsync: false }, options);
|
|
41
|
-
return this.driver.executeStatement(__assign({ sessionHandle: this.sessionHandle, statement: statement }, options)).then(function (response) {
|
|
42
|
-
_this.assertStatus(response.status);
|
|
43
|
-
return _this.createOperation(response.operationHandle);
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
HiveSession.prototype.getTypeInfo = function () {
|
|
47
|
-
var _this = this;
|
|
48
|
-
return this.driver.getTypeInfo({
|
|
49
|
-
sessionHandle: this.sessionHandle
|
|
50
|
-
}).then(function (response) {
|
|
51
|
-
_this.assertStatus(response.status);
|
|
52
|
-
return _this.createOperation(response.operationHandle);
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
HiveSession.prototype.getCatalogs = function () {
|
|
56
|
-
var _this = this;
|
|
57
|
-
return this.driver.getCatalogs({
|
|
58
|
-
sessionHandle: this.sessionHandle
|
|
59
|
-
}).then(function (response) {
|
|
60
|
-
_this.assertStatus(response.status);
|
|
61
|
-
return _this.createOperation(response.operationHandle);
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
HiveSession.prototype.getSchemas = function (request) {
|
|
65
|
-
var _this = this;
|
|
66
|
-
return this.driver.getSchemas({
|
|
67
|
-
sessionHandle: this.sessionHandle,
|
|
68
|
-
catalogName: request.catalogName,
|
|
69
|
-
schemaName: request.schemaName,
|
|
70
|
-
}).then(function (response) {
|
|
71
|
-
_this.assertStatus(response.status);
|
|
72
|
-
return _this.createOperation(response.operationHandle);
|
|
73
|
-
});
|
|
74
|
-
};
|
|
75
|
-
HiveSession.prototype.getTables = function (request) {
|
|
76
|
-
var _this = this;
|
|
77
|
-
return this.driver.getTables({
|
|
78
|
-
sessionHandle: this.sessionHandle,
|
|
79
|
-
catalogName: request.catalogName,
|
|
80
|
-
schemaName: request.schemaName,
|
|
81
|
-
tableName: request.tableName,
|
|
82
|
-
tableTypes: request.tableTypes,
|
|
83
|
-
}).then(function (response) {
|
|
84
|
-
_this.assertStatus(response.status);
|
|
85
|
-
return _this.createOperation(response.operationHandle);
|
|
86
|
-
});
|
|
87
|
-
};
|
|
88
|
-
HiveSession.prototype.getTableTypes = function () {
|
|
89
|
-
var _this = this;
|
|
90
|
-
return this.driver.getTableTypes({
|
|
91
|
-
sessionHandle: this.sessionHandle,
|
|
92
|
-
}).then(function (response) {
|
|
93
|
-
_this.assertStatus(response.status);
|
|
94
|
-
return _this.createOperation(response.operationHandle);
|
|
95
|
-
});
|
|
96
|
-
};
|
|
97
|
-
HiveSession.prototype.getColumns = function (request) {
|
|
98
|
-
var _this = this;
|
|
99
|
-
return this.driver.getColumns({
|
|
100
|
-
sessionHandle: this.sessionHandle,
|
|
101
|
-
catalogName: request.catalogName,
|
|
102
|
-
schemaName: request.schemaName,
|
|
103
|
-
tableName: request.tableName,
|
|
104
|
-
columnName: request.columnName,
|
|
105
|
-
}).then(function (response) {
|
|
106
|
-
_this.assertStatus(response.status);
|
|
107
|
-
return _this.createOperation(response.operationHandle);
|
|
108
|
-
});
|
|
109
|
-
};
|
|
110
|
-
HiveSession.prototype.getFunctions = function (request) {
|
|
111
|
-
var _this = this;
|
|
112
|
-
return this.driver.getFunctions({
|
|
113
|
-
sessionHandle: this.sessionHandle,
|
|
114
|
-
functionName: request.functionName,
|
|
115
|
-
schemaName: request.schemaName,
|
|
116
|
-
catalogName: request.catalogName,
|
|
117
|
-
}).then(function (response) {
|
|
118
|
-
_this.assertStatus(response.status);
|
|
119
|
-
return _this.createOperation(response.operationHandle);
|
|
120
|
-
});
|
|
121
|
-
};
|
|
122
|
-
HiveSession.prototype.getPrimaryKeys = function (request) {
|
|
123
|
-
var _this = this;
|
|
124
|
-
return this.driver.getPrimaryKeys({
|
|
125
|
-
sessionHandle: this.sessionHandle,
|
|
126
|
-
catalogName: request.catalogName,
|
|
127
|
-
schemaName: request.schemaName,
|
|
128
|
-
tableName: request.tableName,
|
|
129
|
-
}).then(function (response) {
|
|
130
|
-
_this.assertStatus(response.status);
|
|
131
|
-
return _this.createOperation(response.operationHandle);
|
|
132
|
-
});
|
|
133
|
-
};
|
|
134
|
-
HiveSession.prototype.getCrossReference = function (request) {
|
|
135
|
-
var _this = this;
|
|
136
|
-
return this.driver.getCrossReference({
|
|
137
|
-
sessionHandle: this.sessionHandle,
|
|
138
|
-
parentCatalogName: request.parentCatalogName,
|
|
139
|
-
parentSchemaName: request.parentSchemaName,
|
|
140
|
-
parentTableName: request.parentTableName,
|
|
141
|
-
foreignCatalogName: request.foreignCatalogName,
|
|
142
|
-
foreignSchemaName: request.foreignSchemaName,
|
|
143
|
-
foreignTableName: request.foreignTableName,
|
|
144
|
-
}).then(function (response) {
|
|
145
|
-
_this.assertStatus(response.status);
|
|
146
|
-
return _this.createOperation(response.operationHandle);
|
|
147
|
-
});
|
|
148
|
-
};
|
|
149
|
-
HiveSession.prototype.getDelegationToken = function (owner, renewer) {
|
|
150
|
-
var _this = this;
|
|
151
|
-
return this.driver.getDelegationToken({
|
|
152
|
-
sessionHandle: this.sessionHandle,
|
|
153
|
-
owner: owner,
|
|
154
|
-
renewer: renewer
|
|
155
|
-
}).then(function (response) {
|
|
156
|
-
_this.assertStatus(response.status);
|
|
157
|
-
return response.delegationToken || '';
|
|
158
|
-
});
|
|
159
|
-
};
|
|
160
|
-
HiveSession.prototype.renewDelegationToken = function (token) {
|
|
161
|
-
var _this = this;
|
|
162
|
-
return this.driver.renewDelegationToken({
|
|
163
|
-
sessionHandle: this.sessionHandle,
|
|
164
|
-
delegationToken: token
|
|
165
|
-
}).then(function (response) {
|
|
166
|
-
_this.assertStatus(response.status);
|
|
167
|
-
return _this.statusFactory.create(response.status);
|
|
168
|
-
});
|
|
169
|
-
};
|
|
170
|
-
HiveSession.prototype.cancelDelegationToken = function (token) {
|
|
171
|
-
var _this = this;
|
|
172
|
-
return this.driver.cancelDelegationToken({
|
|
173
|
-
sessionHandle: this.sessionHandle,
|
|
174
|
-
delegationToken: token
|
|
175
|
-
}).then(function (response) {
|
|
176
|
-
_this.assertStatus(response.status);
|
|
177
|
-
return _this.statusFactory.create(response.status);
|
|
178
|
-
});
|
|
179
|
-
};
|
|
180
|
-
HiveSession.prototype.close = function () {
|
|
181
|
-
var _this = this;
|
|
182
|
-
return this.driver.closeSession({
|
|
183
|
-
sessionHandle: this.sessionHandle
|
|
184
|
-
}).then(function (response) {
|
|
185
|
-
return _this.statusFactory.create(response.status);
|
|
186
|
-
});
|
|
187
|
-
};
|
|
188
|
-
HiveSession.prototype.createOperation = function (handle) {
|
|
189
|
-
return new HiveOperation_1.default(this.driver, handle, this.TCLIService_types);
|
|
190
|
-
};
|
|
191
|
-
HiveSession.prototype.assertStatus = function (responseStatus) {
|
|
192
|
-
this.statusFactory.create(responseStatus);
|
|
193
|
-
};
|
|
194
|
-
return HiveSession;
|
|
195
|
-
}());
|
|
196
|
-
exports.default = HiveSession;
|
|
197
|
-
//# sourceMappingURL=HiveSession.js.map
|
package/dist/HiveSession.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HiveSession.js","sourceRoot":"","sources":["../lib/HiveSession.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAKA,kEAA4C;AAE5C,0EAAoD;AACpD,8DAAwC;AAExC;IAMI,qBAAY,MAAkB,EAAE,aAA4B,EAAE,iBAAmC;QAC7F,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,aAAa,GAAG,IAAI,uBAAa,CAAC,iBAAiB,CAAC,CAAC;IAC9D,CAAC;IAED,6BAAO,GAAP,UAAQ,QAAgB;QAAxB,iBASC;QARG,OAAO,IAAI,CAAC,MAA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qB,cAAuB;QACxC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IAC9C,CAAC;IACL,kBAAC;AAAD,CAAC,AA9MD,IA8MC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import IHiveSession from "./IHiveSession";
|
|
2
|
-
import { OpenSessionRequest } from "../hive/Commands/OpenSessionCommand";
|
|
3
|
-
import IConnectionOptions from "../connection/contracts/IConnectionOptions";
|
|
4
|
-
import IConnectionProvider from "../connection/contracts/IConnectionProvider";
|
|
5
|
-
import IAuthentication from "../connection/contracts/IAuthentication";
|
|
6
|
-
export default interface IHiveClient {
|
|
7
|
-
connect(options: IConnectionOptions, connectionProvider: IConnectionProvider, authProvider: IAuthentication): Promise<IHiveClient>;
|
|
8
|
-
openSession(request: OpenSessionRequest): Promise<IHiveSession>;
|
|
9
|
-
close(): void;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IHiveClient.js","sourceRoot":"","sources":["../../lib/contracts/IHiveClient.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IHiveSession.js","sourceRoot":"","sources":["../../lib/contracts/IHiveSession.ts"],"names":[],"mappings":""}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import BaseCommand from "./BaseCommand";
|
|
2
|
-
import { OperationHandle } from "../Types";
|
|
3
|
-
export declare type GetQueryIdRequest = {
|
|
4
|
-
operationHandle: OperationHandle;
|
|
5
|
-
};
|
|
6
|
-
export declare type GetQueryIdResponse = {
|
|
7
|
-
queryId: string;
|
|
8
|
-
};
|
|
9
|
-
export default class GetQueryIdCommand extends BaseCommand {
|
|
10
|
-
execute(data: GetQueryIdRequest): Promise<GetQueryIdResponse>;
|
|
11
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
var BaseCommand_1 = __importDefault(require("./BaseCommand"));
|
|
22
|
-
var GetQueryIdCommand = /** @class */ (function (_super) {
|
|
23
|
-
__extends(GetQueryIdCommand, _super);
|
|
24
|
-
function GetQueryIdCommand() {
|
|
25
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
-
}
|
|
27
|
-
GetQueryIdCommand.prototype.execute = function (data) {
|
|
28
|
-
var request = new this.TCLIService_types.TGetQueryIdReq(data);
|
|
29
|
-
return this.executeCommand(request, this.client.GetQueryId);
|
|
30
|
-
};
|
|
31
|
-
return GetQueryIdCommand;
|
|
32
|
-
}(BaseCommand_1.default));
|
|
33
|
-
exports.default = GetQueryIdCommand;
|
|
34
|
-
//# sourceMappingURL=GetQueryIdCommand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GetQueryIdCommand.js","sourceRoot":"","sources":["../../../lib/hive/Commands/GetQueryIdCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,8DAAwC;AAWxC;IAA+C,qCAAW;IAA1D;;IAMA,CAAC;IALG,mCAAO,GAAP,UAAQ,IAAuB;QAC3B,IAAM,OAAO,GAAG,IAAI,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAEhE,OAAO,IAAI,CAAC,cAAc,CAAqB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACpF,CAAC;IACL,wBAAC;AAAD,CAAC,AAND,CAA+C,qBAAW,GAMzD"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import BaseCommand from "./BaseCommand";
|
|
2
|
-
import { SessionHandle, Status } from "../Types";
|
|
3
|
-
export declare type SetClientInfoRequest = {
|
|
4
|
-
sessionHandle: SessionHandle;
|
|
5
|
-
configuration?: Map<string, string>;
|
|
6
|
-
};
|
|
7
|
-
export declare type SetClientInfoResponse = {
|
|
8
|
-
status: Status;
|
|
9
|
-
};
|
|
10
|
-
export default class SetClientInfoCommand extends BaseCommand {
|
|
11
|
-
execute(data: SetClientInfoRequest): Promise<SetClientInfoResponse>;
|
|
12
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
var BaseCommand_1 = __importDefault(require("./BaseCommand"));
|
|
22
|
-
var SetClientInfoCommand = /** @class */ (function (_super) {
|
|
23
|
-
__extends(SetClientInfoCommand, _super);
|
|
24
|
-
function SetClientInfoCommand() {
|
|
25
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
-
}
|
|
27
|
-
SetClientInfoCommand.prototype.execute = function (data) {
|
|
28
|
-
var request = new this.TCLIService_types.TSetClientInfoReq(data);
|
|
29
|
-
return this.executeCommand(request, this.client.SetClientInfo);
|
|
30
|
-
};
|
|
31
|
-
return SetClientInfoCommand;
|
|
32
|
-
}(BaseCommand_1.default));
|
|
33
|
-
exports.default = SetClientInfoCommand;
|
|
34
|
-
//# sourceMappingURL=SetClientInfoCommand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SetClientInfoCommand.js","sourceRoot":"","sources":["../../../lib/hive/Commands/SetClientInfoCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,8DAAwC;AAYxC;IAAkD,wCAAW;IAA7D;;IAMA,CAAC;IALG,sCAAO,GAAP,UAAQ,IAA0B;QAC9B,IAAM,OAAO,GAAG,IAAI,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;QAEnE,OAAO,IAAI,CAAC,cAAc,CAAwB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IAC1F,CAAC;IACL,2BAAC;AAAD,CAAC,AAND,CAAkD,qBAAW,GAM5D"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TCLIServiceTypes } from "../hive/Types";
|
|
2
|
-
import IOperationResult from "../result/IOperationResult";
|
|
3
|
-
import IOperation from '../contracts/IOperation';
|
|
4
|
-
export default class GetResult {
|
|
5
|
-
private TCLIService_types;
|
|
6
|
-
private operation;
|
|
7
|
-
constructor(operation: IOperation, TCLIService_types: TCLIServiceTypes);
|
|
8
|
-
/**
|
|
9
|
-
* Combines operation schema and data
|
|
10
|
-
*
|
|
11
|
-
* @param resultHandler you may specify your own result combiner to implement IOperationResult and pass as paramenter.
|
|
12
|
-
* If resultHandler is not specified, the internal handler will interpret result as Json.
|
|
13
|
-
*/
|
|
14
|
-
execute(resultHandler?: IOperationResult): IOperationResult;
|
|
15
|
-
private getDefaultHandler;
|
|
16
|
-
}
|
package/dist/utils/GetResult.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var NullResult_1 = __importDefault(require("../result/NullResult"));
|
|
7
|
-
var JsonResult_1 = __importDefault(require("../result/JsonResult"));
|
|
8
|
-
var GetResult = /** @class */ (function () {
|
|
9
|
-
function GetResult(operation, TCLIService_types) {
|
|
10
|
-
this.TCLIService_types = TCLIService_types;
|
|
11
|
-
this.operation = operation;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Combines operation schema and data
|
|
15
|
-
*
|
|
16
|
-
* @param resultHandler you may specify your own result combiner to implement IOperationResult and pass as paramenter.
|
|
17
|
-
* If resultHandler is not specified, the internal handler will interpret result as Json.
|
|
18
|
-
*/
|
|
19
|
-
GetResult.prototype.execute = function (resultHandler) {
|
|
20
|
-
if (!resultHandler) {
|
|
21
|
-
resultHandler = this.getDefaultHandler();
|
|
22
|
-
}
|
|
23
|
-
resultHandler.setOperation(this.operation);
|
|
24
|
-
return resultHandler;
|
|
25
|
-
};
|
|
26
|
-
GetResult.prototype.getDefaultHandler = function () {
|
|
27
|
-
var schema = this.operation.getSchema();
|
|
28
|
-
if (schema === null) {
|
|
29
|
-
return new NullResult_1.default();
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
return new JsonResult_1.default(this.TCLIService_types);
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
return GetResult;
|
|
36
|
-
}());
|
|
37
|
-
exports.default = GetResult;
|
|
38
|
-
//# sourceMappingURL=GetResult.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GetResult.js","sourceRoot":"","sources":["../../lib/utils/GetResult.ts"],"names":[],"mappings":";;;;;AAEA,oEAA8C;AAC9C,oEAA8C;AAG9C;IAII,mBAAY,SAAqB,EAAE,iBAAmC;QAClE,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED;;;;;OAKG;IACH,2BAAO,GAAP,UAAQ,aAAgC;QACpC,IAAI,CAAC,aAAa,EAAE;YAChB,aAAa,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;SAC5C;QAED,aAAa,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAE3C,OAAO,aAAa,CAAC;IACzB,CAAC;IAEO,qCAAiB,GAAzB;QACI,IAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC;QAE1C,IAAI,MAAM,KAAK,IAAI,EAAE;YACjB,OAAO,IAAI,oBAAU,EAAE,CAAC;SAC3B;aAAM;YACH,OAAO,IAAI,oBAAU,CACjB,IAAI,CAAC,iBAAiB,CACzB,CAAC;SACL;IACL,CAAC;IACL,gBAAC;AAAD,CAAC,AApCD,IAoCC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TCLIServiceTypes, ProgressUpdateResponse } from "../hive/Types";
|
|
2
|
-
import IOperation from "../contracts/IOperation";
|
|
3
|
-
import IOperationResult from "../result/IOperationResult";
|
|
4
|
-
export default class HiveUtils {
|
|
5
|
-
private TCLIService_types;
|
|
6
|
-
constructor(TCLIService_types: TCLIServiceTypes);
|
|
7
|
-
waitUntilReady(operation: IOperation, progress?: boolean, callback?: Function): Promise<IOperation>;
|
|
8
|
-
getResult(operation: IOperation, resultHandler?: IOperationResult): IOperationResult;
|
|
9
|
-
fetchAll(operation: IOperation): Promise<IOperation>;
|
|
10
|
-
formatProgress(progressUpdate: ProgressUpdateResponse): string;
|
|
11
|
-
}
|
package/dist/utils/HiveUtils.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var WaitUntilReady_1 = __importDefault(require("./WaitUntilReady"));
|
|
7
|
-
var GetResult_1 = __importDefault(require("./GetResult"));
|
|
8
|
-
var ProgressUpdateTransformer_1 = __importDefault(require("./ProgressUpdateTransformer"));
|
|
9
|
-
var HiveUtils = /** @class */ (function () {
|
|
10
|
-
function HiveUtils(TCLIService_types) {
|
|
11
|
-
this.TCLIService_types = TCLIService_types;
|
|
12
|
-
}
|
|
13
|
-
HiveUtils.prototype.waitUntilReady = function (operation, progress, callback) {
|
|
14
|
-
var waitUntilReady = new WaitUntilReady_1.default(operation, this.TCLIService_types);
|
|
15
|
-
return waitUntilReady.execute(progress, callback);
|
|
16
|
-
};
|
|
17
|
-
HiveUtils.prototype.getResult = function (operation, resultHandler) {
|
|
18
|
-
var getResult = new GetResult_1.default(operation, this.TCLIService_types);
|
|
19
|
-
return getResult.execute(resultHandler);
|
|
20
|
-
};
|
|
21
|
-
HiveUtils.prototype.fetchAll = function (operation) {
|
|
22
|
-
var _this = this;
|
|
23
|
-
return operation.fetch()
|
|
24
|
-
.then(function () {
|
|
25
|
-
if (operation.hasMoreRows()) {
|
|
26
|
-
return _this.fetchAll(operation);
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
return operation;
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
HiveUtils.prototype.formatProgress = function (progressUpdate) {
|
|
34
|
-
return String(new ProgressUpdateTransformer_1.default(progressUpdate));
|
|
35
|
-
};
|
|
36
|
-
return HiveUtils;
|
|
37
|
-
}());
|
|
38
|
-
exports.default = HiveUtils;
|
|
39
|
-
//# sourceMappingURL=HiveUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HiveUtils.js","sourceRoot":"","sources":["../../lib/utils/HiveUtils.ts"],"names":[],"mappings":";;;;;AAEA,oEAA8C;AAE9C,0DAAoC;AACpC,0FAAoE;AAEpE;IAGI,mBAAY,iBAAmC;QAC3C,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,CAAC;IAED,kCAAc,GAAd,UAAe,SAAqB,EAAE,QAAkB,EAAE,QAAmB;QACzE,IAAM,cAAc,GAAG,IAAI,wBAAc,CACrC,SAAS,EACT,IAAI,CAAC,iBAAiB,CACzB,CAAC;QAEF,OAAO,cAAc,CAAC,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC;IAED,6BAAS,GAAT,UAAU,SAAqB,EAAE,aAAgC;QAC7D,IAAM,SAAS,GAAG,IAAI,mBAAS,CAC3B,SAAS,EACT,IAAI,CAAC,iBAAiB,CACzB,CAAC;QAEF,OAAO,SAAS,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAC5C,CAAC;IAED,4BAAQ,GAAR,UAAS,SAAqB;QAA9B,iBASC;QARG,OAAO,SAAS,CAAC,KAAK,EAAE;aACnB,IAAI,CAAC;YACF,IAAI,SAAS,CAAC,WAAW,EAAE,EAAE;gBACzB,OAAO,KAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;aACnC;iBAAM;gBACH,OAAO,SAAS,CAAC;aACpB;QACL,CAAC,CAAC,CAAC;IACX,CAAC;IAED,kCAAc,GAAd,UAAe,cAAsC;QACjD,OAAO,MAAM,CAAC,IAAI,mCAAyB,CAAC,cAAc,CAAC,CAAC,CAAC;IACjE,CAAC;IACL,gBAAC;AAAD,CAAC,AAvCD,IAuCC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ProgressUpdateResponse } from "../hive/Types";
|
|
2
|
-
export default class ProgressUpdateTransformer {
|
|
3
|
-
private progressUpdate;
|
|
4
|
-
private rowWidth;
|
|
5
|
-
constructor(progressUpdate: ProgressUpdateResponse);
|
|
6
|
-
formatRow(row: Array<string>): string;
|
|
7
|
-
toString(): string;
|
|
8
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
-
if (ar || !(i in from)) {
|
|
5
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
-
ar[i] = from[i];
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
var ProgressUpdateTransformer = /** @class */ (function () {
|
|
13
|
-
function ProgressUpdateTransformer(progressUpdate) {
|
|
14
|
-
this.rowWidth = 10;
|
|
15
|
-
this.progressUpdate = progressUpdate;
|
|
16
|
-
}
|
|
17
|
-
ProgressUpdateTransformer.prototype.formatRow = function (row) {
|
|
18
|
-
var _this = this;
|
|
19
|
-
return row.map(function (cell) { return cell.padEnd(_this.rowWidth, ' '); }).join('|');
|
|
20
|
-
};
|
|
21
|
-
ProgressUpdateTransformer.prototype.toString = function () {
|
|
22
|
-
var _this = this;
|
|
23
|
-
var header = this.formatRow(this.progressUpdate.headerNames);
|
|
24
|
-
var footer = this.progressUpdate.footerSummary;
|
|
25
|
-
var rows = this.progressUpdate.rows.map(function (row) {
|
|
26
|
-
return _this.formatRow(row);
|
|
27
|
-
});
|
|
28
|
-
return __spreadArray(__spreadArray([header], rows, true), [footer], false).join('\n');
|
|
29
|
-
};
|
|
30
|
-
return ProgressUpdateTransformer;
|
|
31
|
-
}());
|
|
32
|
-
exports.default = ProgressUpdateTransformer;
|
|
33
|
-
//# sourceMappingURL=ProgressUpdateTransformer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressUpdateTransformer.js","sourceRoot":"","sources":["../../lib/utils/ProgressUpdateTransformer.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA;IAII,mCAAY,cAAsC;QAF1C,aAAQ,GAAW,EAAE,CAAC;QAG1B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACzC,CAAC;IAED,6CAAS,GAAT,UAAU,GAAkB;QAA5B,iBAEC;QADG,OAAO,GAAG,CAAC,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,MAAM,CAAC,KAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,EAA/B,CAA+B,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACtE,CAAC;IAED,4CAAQ,GAAR;QAAA,iBAQC;QAPG,IAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;QAC/D,IAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC;QACjD,IAAM,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,UAAC,GAAkB;YACzD,OAAO,KAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;QAEH,OAAO,6BAAE,MAAM,GAAK,IAAI,UAAE,MAAM,UAAG,IAAI,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC;IACL,gCAAC;AAAD,CAAC,AArBD,IAqBC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import IOperation from "../contracts/IOperation";
|
|
2
|
-
import { TCLIServiceTypes } from "../hive/Types";
|
|
3
|
-
export default class WaitUntilReady {
|
|
4
|
-
private operation;
|
|
5
|
-
private TCLIService_types;
|
|
6
|
-
constructor(operation: IOperation, TCLIService_types: TCLIServiceTypes);
|
|
7
|
-
/**
|
|
8
|
-
* Executes until operation has status finished or has one of the invalid states
|
|
9
|
-
*
|
|
10
|
-
* @param progress flag for operation status command. If it sets true, response will include progressUpdateResponse with progress information
|
|
11
|
-
* @param callback if callback specified it will be called each time the operation status response received and it will be passed as first parameter
|
|
12
|
-
*/
|
|
13
|
-
execute(progress?: boolean, callback?: Function): Promise<IOperation>;
|
|
14
|
-
private isReady;
|
|
15
|
-
private executeCallback;
|
|
16
|
-
}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
var OperationStateError_1 = __importDefault(require("../errors/OperationStateError"));
|
|
43
|
-
var WaitUntilReady = /** @class */ (function () {
|
|
44
|
-
function WaitUntilReady(operation, TCLIService_types) {
|
|
45
|
-
this.operation = operation;
|
|
46
|
-
this.TCLIService_types = TCLIService_types;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Executes until operation has status finished or has one of the invalid states
|
|
50
|
-
*
|
|
51
|
-
* @param progress flag for operation status command. If it sets true, response will include progressUpdateResponse with progress information
|
|
52
|
-
* @param callback if callback specified it will be called each time the operation status response received and it will be passed as first parameter
|
|
53
|
-
*/
|
|
54
|
-
WaitUntilReady.prototype.execute = function (progress, callback) {
|
|
55
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
56
|
-
var response, isReady;
|
|
57
|
-
return __generator(this, function (_a) {
|
|
58
|
-
switch (_a.label) {
|
|
59
|
-
case 0: return [4 /*yield*/, this.operation.status(Boolean(progress))];
|
|
60
|
-
case 1:
|
|
61
|
-
response = _a.sent();
|
|
62
|
-
if (!(typeof callback === 'function')) return [3 /*break*/, 3];
|
|
63
|
-
return [4 /*yield*/, this.executeCallback(callback.bind(null, response))];
|
|
64
|
-
case 2:
|
|
65
|
-
_a.sent();
|
|
66
|
-
_a.label = 3;
|
|
67
|
-
case 3:
|
|
68
|
-
try {
|
|
69
|
-
isReady = this.isReady(response);
|
|
70
|
-
if (isReady) {
|
|
71
|
-
return [2 /*return*/, this.operation];
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
return [2 /*return*/, this.execute(progress, callback)];
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
catch (error) {
|
|
78
|
-
throw error;
|
|
79
|
-
}
|
|
80
|
-
return [2 /*return*/];
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
WaitUntilReady.prototype.isReady = function (response) {
|
|
86
|
-
switch (response.operationState) {
|
|
87
|
-
case this.TCLIService_types.TOperationState.INITIALIZED_STATE:
|
|
88
|
-
return false;
|
|
89
|
-
case this.TCLIService_types.TOperationState.RUNNING_STATE:
|
|
90
|
-
return false;
|
|
91
|
-
case this.TCLIService_types.TOperationState.FINISHED_STATE:
|
|
92
|
-
return true;
|
|
93
|
-
case this.TCLIService_types.TOperationState.CANCELED_STATE:
|
|
94
|
-
throw new OperationStateError_1.default('The operation was canceled by a client', response);
|
|
95
|
-
case this.TCLIService_types.TOperationState.CLOSED_STATE:
|
|
96
|
-
throw new OperationStateError_1.default('The operation was closed by a client', response);
|
|
97
|
-
case this.TCLIService_types.TOperationState.ERROR_STATE:
|
|
98
|
-
throw new OperationStateError_1.default('The operation failed due to an error', response);
|
|
99
|
-
case this.TCLIService_types.TOperationState.PENDING_STATE:
|
|
100
|
-
throw new OperationStateError_1.default('The operation is in a pending state', response);
|
|
101
|
-
case this.TCLIService_types.TOperationState.TIMEDOUT_STATE:
|
|
102
|
-
throw new OperationStateError_1.default('The operation is in a timedout state', response);
|
|
103
|
-
case this.TCLIService_types.TOperationState.UKNOWN_STATE:
|
|
104
|
-
default:
|
|
105
|
-
throw new OperationStateError_1.default('The operation is in an unrecognized state', response);
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
WaitUntilReady.prototype.executeCallback = function (callback) {
|
|
109
|
-
var result = callback();
|
|
110
|
-
if (result instanceof Promise) {
|
|
111
|
-
return result;
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
return Promise.resolve(result);
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
return WaitUntilReady;
|
|
118
|
-
}());
|
|
119
|
-
exports.default = WaitUntilReady;
|
|
120
|
-
//# sourceMappingURL=WaitUntilReady.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WaitUntilReady.js","sourceRoot":"","sources":["../../lib/utils/WaitUntilReady.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,sFAAgE;AAEhE;IAII,wBAAY,SAAqB,EAAE,iBAAmC;Q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