@databricks/sql 0.1.8-beta.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/.gitattributes +32 -0
- package/CHANGELOG.md +1 -0
- package/CONTRIBUTING.md +55 -0
- package/LICENSE +201 -0
- package/README.md +78 -0
- package/dist/DBSQLClient.d.ts +42 -0
- package/dist/DBSQLClient.js +111 -0
- package/dist/DBSQLClient.js.map +1 -0
- package/dist/HiveClient.d.ts +35 -0
- package/dist/HiveClient.js +156 -0
- package/dist/HiveClient.js.map +1 -0
- package/dist/HiveOperation.d.ts +65 -0
- package/dist/HiveOperation.js +190 -0
- package/dist/HiveOperation.js.map +1 -0
- package/dist/HiveSession.d.ts +30 -0
- package/dist/HiveSession.js +197 -0
- package/dist/HiveSession.js.map +1 -0
- package/dist/connection/auth/NoSaslAuthentication.d.ts +5 -0
- package/dist/connection/auth/NoSaslAuthentication.js +15 -0
- package/dist/connection/auth/NoSaslAuthentication.js.map +1 -0
- package/dist/connection/auth/PlainHttpAuthentication.d.ts +15 -0
- package/dist/connection/auth/PlainHttpAuthentication.js +30 -0
- package/dist/connection/auth/PlainHttpAuthentication.js.map +1 -0
- package/dist/connection/auth/helpers/SaslPackageFactory.d.ts +11 -0
- package/dist/connection/auth/helpers/SaslPackageFactory.js +24 -0
- package/dist/connection/auth/helpers/SaslPackageFactory.js.map +1 -0
- package/dist/connection/connections/HttpConnection.d.ts +13 -0
- package/dist/connection/connections/HttpConnection.js +77 -0
- package/dist/connection/connections/HttpConnection.js.map +1 -0
- package/dist/connection/contracts/IAuthentication.d.ts +4 -0
- package/dist/connection/contracts/IAuthentication.js +3 -0
- package/dist/connection/contracts/IAuthentication.js.map +1 -0
- package/dist/connection/contracts/IConnectionOptions.d.ts +23 -0
- package/dist/connection/contracts/IConnectionOptions.js +3 -0
- package/dist/connection/contracts/IConnectionOptions.js.map +1 -0
- package/dist/connection/contracts/IConnectionProvider.d.ts +6 -0
- package/dist/connection/contracts/IConnectionProvider.js +3 -0
- package/dist/connection/contracts/IConnectionProvider.js.map +1 -0
- package/dist/connection/contracts/IThriftConnection.d.ts +4 -0
- package/dist/connection/contracts/IThriftConnection.js +3 -0
- package/dist/connection/contracts/IThriftConnection.js.map +1 -0
- package/dist/connection/contracts/ITransport.d.ts +13 -0
- package/dist/connection/contracts/ITransport.js +3 -0
- package/dist/connection/contracts/ITransport.js.map +1 -0
- package/dist/connection/transports/HttpTransport.d.ts +14 -0
- package/dist/connection/transports/HttpTransport.js +39 -0
- package/dist/connection/transports/HttpTransport.js.map +1 -0
- package/dist/connection/types/AuthOptions.d.ts +4 -0
- package/dist/connection/types/AuthOptions.js +3 -0
- package/dist/connection/types/AuthOptions.js.map +1 -0
- package/dist/contracts/IHiveClient.d.ts +10 -0
- package/dist/contracts/IHiveClient.js +3 -0
- package/dist/contracts/IHiveClient.js.map +1 -0
- package/dist/contracts/IHiveSession.d.ts +126 -0
- package/dist/contracts/IHiveSession.js +3 -0
- package/dist/contracts/IHiveSession.js.map +1 -0
- package/dist/contracts/IOperation.d.ts +47 -0
- package/dist/contracts/IOperation.js +3 -0
- package/dist/contracts/IOperation.js.map +1 -0
- package/dist/dto/InfoValue.d.ts +9 -0
- package/dist/dto/InfoValue.js +31 -0
- package/dist/dto/InfoValue.js.map +1 -0
- package/dist/dto/Status.d.ts +15 -0
- package/dist/dto/Status.js +21 -0
- package/dist/dto/Status.js.map +1 -0
- package/dist/errors/AuthenticationError.d.ts +3 -0
- package/dist/errors/AuthenticationError.js +30 -0
- package/dist/errors/AuthenticationError.js.map +1 -0
- package/dist/errors/HiveDriverError.d.ts +2 -0
- package/dist/errors/HiveDriverError.js +26 -0
- package/dist/errors/HiveDriverError.js.map +1 -0
- package/dist/errors/OperationStateError.d.ts +6 -0
- package/dist/errors/OperationStateError.js +32 -0
- package/dist/errors/OperationStateError.js.map +1 -0
- package/dist/errors/StatusError.d.ts +8 -0
- package/dist/errors/StatusError.js +15 -0
- package/dist/errors/StatusError.js.map +1 -0
- package/dist/factory/StatusFactory.d.ts +14 -0
- package/dist/factory/StatusFactory.js +40 -0
- package/dist/factory/StatusFactory.js.map +1 -0
- package/dist/hive/Commands/BaseCommand.d.ts +7 -0
- package/dist/hive/Commands/BaseCommand.js +36 -0
- package/dist/hive/Commands/BaseCommand.js.map +1 -0
- package/dist/hive/Commands/CancelDelegationTokenCommand.d.ts +12 -0
- package/dist/hive/Commands/CancelDelegationTokenCommand.js +34 -0
- package/dist/hive/Commands/CancelDelegationTokenCommand.js.map +1 -0
- package/dist/hive/Commands/CancelOperationCommand.d.ts +11 -0
- package/dist/hive/Commands/CancelOperationCommand.js +34 -0
- package/dist/hive/Commands/CancelOperationCommand.js.map +1 -0
- package/dist/hive/Commands/CloseOperationCommand.d.ts +11 -0
- package/dist/hive/Commands/CloseOperationCommand.js +34 -0
- package/dist/hive/Commands/CloseOperationCommand.js.map +1 -0
- package/dist/hive/Commands/CloseSessionCommand.d.ts +11 -0
- package/dist/hive/Commands/CloseSessionCommand.js +34 -0
- package/dist/hive/Commands/CloseSessionCommand.js.map +1 -0
- package/dist/hive/Commands/ExecuteStatementCommand.d.ts +17 -0
- package/dist/hive/Commands/ExecuteStatementCommand.js +34 -0
- package/dist/hive/Commands/ExecuteStatementCommand.js.map +1 -0
- package/dist/hive/Commands/FetchResultsCommand.d.ts +20 -0
- package/dist/hive/Commands/FetchResultsCommand.js +34 -0
- package/dist/hive/Commands/FetchResultsCommand.js.map +1 -0
- package/dist/hive/Commands/GetCatalogsCommand.d.ts +12 -0
- package/dist/hive/Commands/GetCatalogsCommand.js +34 -0
- package/dist/hive/Commands/GetCatalogsCommand.js.map +1 -0
- package/dist/hive/Commands/GetColumnsCommand.d.ts +16 -0
- package/dist/hive/Commands/GetColumnsCommand.js +34 -0
- package/dist/hive/Commands/GetColumnsCommand.js.map +1 -0
- package/dist/hive/Commands/GetCrossReferenceCommand.d.ts +18 -0
- package/dist/hive/Commands/GetCrossReferenceCommand.js +34 -0
- package/dist/hive/Commands/GetCrossReferenceCommand.js.map +1 -0
- package/dist/hive/Commands/GetDelegationTokenCommand.d.ts +14 -0
- package/dist/hive/Commands/GetDelegationTokenCommand.js +34 -0
- package/dist/hive/Commands/GetDelegationTokenCommand.js.map +1 -0
- package/dist/hive/Commands/GetFunctionsCommand.d.ts +15 -0
- package/dist/hive/Commands/GetFunctionsCommand.js +34 -0
- package/dist/hive/Commands/GetFunctionsCommand.js.map +1 -0
- package/dist/hive/Commands/GetInfoCommand.d.ts +16 -0
- package/dist/hive/Commands/GetInfoCommand.js +34 -0
- package/dist/hive/Commands/GetInfoCommand.js.map +1 -0
- package/dist/hive/Commands/GetOperationStatusCommand.d.ts +23 -0
- package/dist/hive/Commands/GetOperationStatusCommand.js +34 -0
- package/dist/hive/Commands/GetOperationStatusCommand.js.map +1 -0
- package/dist/hive/Commands/GetPrimaryKeysCommand.d.ts +15 -0
- package/dist/hive/Commands/GetPrimaryKeysCommand.js +34 -0
- package/dist/hive/Commands/GetPrimaryKeysCommand.js.map +1 -0
- package/dist/hive/Commands/GetQueryIdCommand.d.ts +11 -0
- package/dist/hive/Commands/GetQueryIdCommand.js +34 -0
- package/dist/hive/Commands/GetQueryIdCommand.js.map +1 -0
- package/dist/hive/Commands/GetResultSetMetadataCommand.d.ts +12 -0
- package/dist/hive/Commands/GetResultSetMetadataCommand.js +34 -0
- package/dist/hive/Commands/GetResultSetMetadataCommand.js.map +1 -0
- package/dist/hive/Commands/GetSchemasCommand.d.ts +14 -0
- package/dist/hive/Commands/GetSchemasCommand.js +34 -0
- package/dist/hive/Commands/GetSchemasCommand.js.map +1 -0
- package/dist/hive/Commands/GetTableTypesCommand.d.ts +12 -0
- package/dist/hive/Commands/GetTableTypesCommand.js +34 -0
- package/dist/hive/Commands/GetTableTypesCommand.js.map +1 -0
- package/dist/hive/Commands/GetTablesCommand.d.ts +16 -0
- package/dist/hive/Commands/GetTablesCommand.js +34 -0
- package/dist/hive/Commands/GetTablesCommand.js.map +1 -0
- package/dist/hive/Commands/GetTypeInfoCommand.d.ts +12 -0
- package/dist/hive/Commands/GetTypeInfoCommand.js +34 -0
- package/dist/hive/Commands/GetTypeInfoCommand.js.map +1 -0
- package/dist/hive/Commands/OpenSessionCommand.d.ts +33 -0
- package/dist/hive/Commands/OpenSessionCommand.js +34 -0
- package/dist/hive/Commands/OpenSessionCommand.js.map +1 -0
- package/dist/hive/Commands/RenewDelegationTokenCommand.d.ts +12 -0
- package/dist/hive/Commands/RenewDelegationTokenCommand.js +34 -0
- package/dist/hive/Commands/RenewDelegationTokenCommand.js.map +1 -0
- package/dist/hive/Commands/SetClientInfoCommand.d.ts +12 -0
- package/dist/hive/Commands/SetClientInfoCommand.js +34 -0
- package/dist/hive/Commands/SetClientInfoCommand.js.map +1 -0
- package/dist/hive/HiveDriver.d.ts +52 -0
- package/dist/hive/HiveDriver.js +129 -0
- package/dist/hive/HiveDriver.js.map +1 -0
- package/dist/hive/Types/index.d.ts +229 -0
- package/dist/hive/Types/index.js +16 -0
- package/dist/hive/Types/index.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +67 -0
- package/dist/index.js.map +1 -0
- package/dist/result/IOperationResult.d.ts +5 -0
- package/dist/result/IOperationResult.js +3 -0
- package/dist/result/IOperationResult.js.map +1 -0
- package/dist/result/JsonResult.d.ts +20 -0
- package/dist/result/JsonResult.js +137 -0
- package/dist/result/JsonResult.js.map +1 -0
- package/dist/result/NullResult.d.ts +6 -0
- package/dist/result/NullResult.js +13 -0
- package/dist/result/NullResult.js.map +1 -0
- package/dist/utils/GetResult.d.ts +16 -0
- package/dist/utils/GetResult.js +38 -0
- package/dist/utils/GetResult.js.map +1 -0
- package/dist/utils/HiveUtils.d.ts +11 -0
- package/dist/utils/HiveUtils.js +39 -0
- package/dist/utils/HiveUtils.js.map +1 -0
- package/dist/utils/ProgressUpdateTransformer.d.ts +8 -0
- package/dist/utils/ProgressUpdateTransformer.js +33 -0
- package/dist/utils/ProgressUpdateTransformer.js.map +1 -0
- package/dist/utils/WaitUntilReady.d.ts +16 -0
- package/dist/utils/WaitUntilReady.js +120 -0
- package/dist/utils/WaitUntilReady.js.map +1 -0
- package/docs/readme.md +227 -0
- package/docs/troubleshooting.md +84 -0
- package/examples/data_types.js +173 -0
- package/examples/repl +106 -0
- package/examples/session.js +55 -0
- package/examples/usage.js +18 -0
- package/nyc.config.js +8 -0
- package/package.json +56 -0
- package/tests/e2e/data_types.test.js +353 -0
- package/tests/e2e/utils/config.js +20 -0
- package/tests/e2e/utils/logger.js +22 -0
- package/tests/unit/HiveClient.test.js +153 -0
- package/tests/unit/HiveOperation.test.js +340 -0
- package/tests/unit/HiveSession.test.js +146 -0
- package/tests/unit/connection/auth/PlainHttpAuthentication.test.js +44 -0
- package/tests/unit/connection/connections/HttpConnection.test.js +141 -0
- package/tests/unit/dto/InfoValue.test.js +50 -0
- package/tests/unit/factory/StatusFactory.test.js +62 -0
- package/tests/unit/hive/HiveDriver.test.js +115 -0
- package/tests/unit/hive/commands/CancelDelegationTokenCommand.test.js +43 -0
- package/tests/unit/hive/commands/CancelOperationCommand.test.js +45 -0
- package/tests/unit/hive/commands/CloseOperationCommand.test.js +45 -0
- package/tests/unit/hive/commands/CloseSessionCommand.test.js +38 -0
- package/tests/unit/hive/commands/ExecuteStatementCommand.test.js +54 -0
- package/tests/unit/hive/commands/FetchResultsCommand.test.js +59 -0
- package/tests/unit/hive/commands/GetCatalogsCommand.test.js +50 -0
- package/tests/unit/hive/commands/GetColumnsCommand.test.js +50 -0
- package/tests/unit/hive/commands/GetCrossReferenceCommand.test.js +56 -0
- package/tests/unit/hive/commands/GetDelegationTokenCommand.test.js +45 -0
- package/tests/unit/hive/commands/GetFunctionsCommand.test.js +50 -0
- package/tests/unit/hive/commands/GetInfoCommand.test.js +51 -0
- package/tests/unit/hive/commands/GetOperationStatusCommand.test.js +63 -0
- package/tests/unit/hive/commands/GetPrimaryKeysCommand.test.js +50 -0
- package/tests/unit/hive/commands/GetQueryIdCommand.test.js +42 -0
- package/tests/unit/hive/commands/GetResultSetMetadataCommand.test.js +54 -0
- package/tests/unit/hive/commands/GetSchemasCommand.test.js +52 -0
- package/tests/unit/hive/commands/GetTableTypesCommand.test.js +50 -0
- package/tests/unit/hive/commands/GetTablesCommand.test.js +54 -0
- package/tests/unit/hive/commands/GetTypeInfoCommand.test.js +50 -0
- package/tests/unit/hive/commands/OpenSessionCommand.test.js +43 -0
- package/tests/unit/hive/commands/RenewDelegationTokenCommand.test.js +43 -0
- package/tests/unit/hive/commands/SetClientInfoCommand.test.js +45 -0
- package/tests/unit/result/JsonResult.test.js +295 -0
- package/tests/unit/utils/GetResult.test.js +30 -0
- package/tests/unit/utils/HiveUtils.test.js +60 -0
- package/tests/unit/utils/ProgressUpdateTransformer.test.js +28 -0
- package/tests/unit/utils/WaitUntilReady.test.js +105 -0
- package/thrift/TCLIService.thrift +1299 -0
- package/thrift/gen-nodejs/TCLIService.js +4596 -0
- package/thrift/gen-nodejs/TCLIService_types.js +6794 -0
- package/tsconfig.json +13 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var InfoValue = /** @class */ (function () {
|
|
4
|
+
function InfoValue(value) {
|
|
5
|
+
this.value = value;
|
|
6
|
+
}
|
|
7
|
+
InfoValue.prototype.getValue = function () {
|
|
8
|
+
var infoValue = this.value;
|
|
9
|
+
if (infoValue.stringValue) {
|
|
10
|
+
return infoValue.stringValue;
|
|
11
|
+
}
|
|
12
|
+
else if (infoValue.smallIntValue) {
|
|
13
|
+
return infoValue.smallIntValue;
|
|
14
|
+
}
|
|
15
|
+
else if (infoValue.integerBitmask) {
|
|
16
|
+
return infoValue.integerBitmask;
|
|
17
|
+
}
|
|
18
|
+
else if (infoValue.integerFlag) {
|
|
19
|
+
return infoValue.integerFlag;
|
|
20
|
+
}
|
|
21
|
+
else if (infoValue.lenValue) {
|
|
22
|
+
return infoValue.lenValue;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
return InfoValue;
|
|
29
|
+
}());
|
|
30
|
+
exports.default = InfoValue;
|
|
31
|
+
//# sourceMappingURL=InfoValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoValue.js","sourceRoot":"","sources":["../../lib/dto/InfoValue.ts"],"names":[],"mappings":";;AAIA;IAGI,mBAAY,KAAmB;QAC3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,4BAAQ,GAAR;QACI,IAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC;QAE7B,IAAI,SAAS,CAAC,WAAW,EAAE;YACvB,OAAO,SAAS,CAAC,WAAW,CAAC;SAChC;aAAM,IAAI,SAAS,CAAC,aAAa,EAAE;YAChC,OAAO,SAAS,CAAC,aAAa,CAAC;SAClC;aAAM,IAAI,SAAS,CAAC,cAAc,EAAE;YACjC,OAAO,SAAS,CAAC,cAAc,CAAC;SACnC;aAAM,IAAI,SAAS,CAAC,WAAW,EAAE;YAC9B,OAAO,SAAS,CAAC,WAAW,CAAC;SAChC;aAAM,IAAI,SAAS,CAAC,QAAQ,EAAE;YAC3B,OAAO,SAAS,CAAC,QAAQ,CAAC;SAC7B;aAAM;YACH,OAAO,IAAI,CAAC;SACf;IACL,CAAC;IACL,gBAAC;AAAD,CAAC,AAxBD,IAwBC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare type StatusData = {
|
|
2
|
+
success: boolean;
|
|
3
|
+
executing: boolean;
|
|
4
|
+
infoMessages: Array<string>;
|
|
5
|
+
};
|
|
6
|
+
export default class Status {
|
|
7
|
+
private isSuccess;
|
|
8
|
+
private isExecuting;
|
|
9
|
+
private infoMessages;
|
|
10
|
+
constructor(data: StatusData);
|
|
11
|
+
success(): boolean;
|
|
12
|
+
executing(): boolean;
|
|
13
|
+
getInfo(): Array<string>;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var Status = /** @class */ (function () {
|
|
4
|
+
function Status(data) {
|
|
5
|
+
this.isSuccess = data.success;
|
|
6
|
+
this.isExecuting = data.executing;
|
|
7
|
+
this.infoMessages = data.infoMessages;
|
|
8
|
+
}
|
|
9
|
+
Status.prototype.success = function () {
|
|
10
|
+
return this.isSuccess;
|
|
11
|
+
};
|
|
12
|
+
Status.prototype.executing = function () {
|
|
13
|
+
return this.isExecuting;
|
|
14
|
+
};
|
|
15
|
+
Status.prototype.getInfo = function () {
|
|
16
|
+
return this.infoMessages;
|
|
17
|
+
};
|
|
18
|
+
return Status;
|
|
19
|
+
}());
|
|
20
|
+
exports.default = Status;
|
|
21
|
+
//# sourceMappingURL=Status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Status.js","sourceRoot":"","sources":["../../lib/dto/Status.ts"],"names":[],"mappings":";;AAMA;IAKI,gBAAY,IAAgB;QACxB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;IAC1C,CAAC;IAED,wBAAO,GAAP;QACI,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,0BAAS,GAAT;QACI,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,wBAAO,GAAP;QACI,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IACL,aAAC;AAAD,CAAC,AAtBD,IAsBC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 HiveDriverError_1 = __importDefault(require("./HiveDriverError"));
|
|
22
|
+
var AuthenticationError = /** @class */ (function (_super) {
|
|
23
|
+
__extends(AuthenticationError, _super);
|
|
24
|
+
function AuthenticationError() {
|
|
25
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
+
}
|
|
27
|
+
return AuthenticationError;
|
|
28
|
+
}(HiveDriverError_1.default));
|
|
29
|
+
exports.default = AuthenticationError;
|
|
30
|
+
//# sourceMappingURL=AuthenticationError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthenticationError.js","sourceRoot":"","sources":["../../lib/errors/AuthenticationError.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,sEAAgD;AAEhD;IAAiD,uCAAe;IAAhE;;IAAkE,CAAC;IAAD,0BAAC;AAAD,CAAC,AAAnE,CAAiD,yBAAe,GAAG"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
var HiveDriverError = /** @class */ (function (_super) {
|
|
19
|
+
__extends(HiveDriverError, _super);
|
|
20
|
+
function HiveDriverError() {
|
|
21
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
22
|
+
}
|
|
23
|
+
return HiveDriverError;
|
|
24
|
+
}(Error));
|
|
25
|
+
exports.default = HiveDriverError;
|
|
26
|
+
//# sourceMappingURL=HiveDriverError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HiveDriverError.js","sourceRoot":"","sources":["../../lib/errors/HiveDriverError.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;IAA6C,mCAAK;IAAlD;;IAAoD,CAAC;IAAD,sBAAC;AAAD,CAAC,AAArD,CAA6C,KAAK,GAAG"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import HiveDriverError from "./HiveDriverError";
|
|
2
|
+
import { GetOperationStatusResponse } from "../hive/Commands/GetOperationStatusCommand";
|
|
3
|
+
export default class OperationStateError extends HiveDriverError {
|
|
4
|
+
response: GetOperationStatusResponse;
|
|
5
|
+
constructor(message: string, response: GetOperationStatusResponse);
|
|
6
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 HiveDriverError_1 = __importDefault(require("./HiveDriverError"));
|
|
22
|
+
var OperationStateError = /** @class */ (function (_super) {
|
|
23
|
+
__extends(OperationStateError, _super);
|
|
24
|
+
function OperationStateError(message, response) {
|
|
25
|
+
var _this = _super.call(this, message) || this;
|
|
26
|
+
_this.response = response;
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
return OperationStateError;
|
|
30
|
+
}(HiveDriverError_1.default));
|
|
31
|
+
exports.default = OperationStateError;
|
|
32
|
+
//# sourceMappingURL=OperationStateError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationStateError.js","sourceRoot":"","sources":["../../lib/errors/OperationStateError.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,sEAAgD;AAGhD;IAAiD,uCAAe;IAG5D,6BAAY,OAAe,EAAE,QAAoC;QAAjE,YACI,kBAAM,OAAO,CAAC,SAGjB;QADG,KAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;;IAC7B,CAAC;IACL,0BAAC;AAAD,CAAC,AARD,CAAiD,yBAAe,GAQ/D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var StatusError = /** @class */ (function () {
|
|
4
|
+
function StatusError(status) {
|
|
5
|
+
this.name = 'Status Error';
|
|
6
|
+
this.message = status.errorMessage || '';
|
|
7
|
+
this.code = status.errorCode || -1;
|
|
8
|
+
if (Array.isArray(status.infoMessages)) {
|
|
9
|
+
this.stack = status.infoMessages.join('\n');
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return StatusError;
|
|
13
|
+
}());
|
|
14
|
+
exports.default = StatusError;
|
|
15
|
+
//# sourceMappingURL=StatusError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusError.js","sourceRoot":"","sources":["../../lib/errors/StatusError.ts"],"names":[],"mappings":";;AAEA;IAMI,qBAAY,MAAc;QACtB,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,YAAY,IAAI,EAAE,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC;QAEnC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE;YACpC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC/C;IACL,CAAC;IACL,kBAAC;AAAD,CAAC,AAfD,IAeC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TCLIServiceTypes, Status as TStatus } from "../hive/Types";
|
|
2
|
+
import Status from "../dto/Status";
|
|
3
|
+
export default class StatusFactory {
|
|
4
|
+
private TCLIService_types;
|
|
5
|
+
constructor(TCLIService_types: TCLIServiceTypes);
|
|
6
|
+
/**
|
|
7
|
+
* @param status thrift status object from API responses
|
|
8
|
+
* @throws {StatusError}
|
|
9
|
+
*/
|
|
10
|
+
create(status: TStatus): Status;
|
|
11
|
+
private isSuccess;
|
|
12
|
+
private isError;
|
|
13
|
+
private isExecuting;
|
|
14
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 Status_1 = __importDefault(require("../dto/Status"));
|
|
7
|
+
var StatusError_1 = __importDefault(require("../errors/StatusError"));
|
|
8
|
+
var StatusFactory = /** @class */ (function () {
|
|
9
|
+
function StatusFactory(TCLIService_types) {
|
|
10
|
+
this.TCLIService_types = TCLIService_types;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @param status thrift status object from API responses
|
|
14
|
+
* @throws {StatusError}
|
|
15
|
+
*/
|
|
16
|
+
StatusFactory.prototype.create = function (status) {
|
|
17
|
+
if (this.isError(status)) {
|
|
18
|
+
throw new StatusError_1.default(status);
|
|
19
|
+
}
|
|
20
|
+
return new Status_1.default({
|
|
21
|
+
success: this.isSuccess(status),
|
|
22
|
+
executing: this.isExecuting(status),
|
|
23
|
+
infoMessages: status.infoMessages || [],
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
StatusFactory.prototype.isSuccess = function (status) {
|
|
27
|
+
return (status.statusCode === this.TCLIService_types.TStatusCode.SUCCESS_STATUS
|
|
28
|
+
|| status.statusCode === this.TCLIService_types.TStatusCode.SUCCESS_WITH_INFO_STATUS);
|
|
29
|
+
};
|
|
30
|
+
StatusFactory.prototype.isError = function (status) {
|
|
31
|
+
return (status.statusCode === this.TCLIService_types.TStatusCode.ERROR_STATUS
|
|
32
|
+
|| status.statusCode === this.TCLIService_types.TStatusCode.INVALID_HANDLE_STATUS);
|
|
33
|
+
};
|
|
34
|
+
StatusFactory.prototype.isExecuting = function (status) {
|
|
35
|
+
return status.statusCode === this.TCLIService_types.TStatusCode.STILL_EXECUTING_STATUS;
|
|
36
|
+
};
|
|
37
|
+
return StatusFactory;
|
|
38
|
+
}());
|
|
39
|
+
exports.default = StatusFactory;
|
|
40
|
+
//# sourceMappingURL=StatusFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusFactory.js","sourceRoot":"","sources":["../../lib/factory/StatusFactory.ts"],"names":[],"mappings":";;;;;AACA,yDAAmC;AACnC,sEAAgD;AAEhD;IAGI,uBAAY,iBAAmC;QAC3C,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,CAAC;IAED;;;OAGG;IACH,8BAAM,GAAN,UAAO,MAAe;QAClB,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YACtB,MAAM,IAAI,qBAAW,CAAC,MAAM,CAAC,CAAC;SACjC;QAED,OAAO,IAAI,gBAAM,CAAC;YACd,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;YAC/B,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;YACnC,YAAY,EAAE,MAAM,CAAC,YAAY,IAAI,EAAE;SAC1C,CAAC,CAAC;IACP,CAAC;IAEO,iCAAS,GAAjB,UAAkB,MAAe;QAC7B,OAAO,CACH,MAAM,CAAC,UAAU,KAAK,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,cAAc;eACpE,MAAM,CAAC,UAAU,KAAK,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,wBAAwB,CACvF,CAAC;IACN,CAAC;IAEO,+BAAO,GAAf,UAAgB,MAAe;QAC3B,OAAO,CACH,MAAM,CAAC,UAAU,KAAK,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,YAAY;eAClE,MAAM,CAAC,UAAU,KAAK,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,qBAAqB,CACpF,CAAC;IACN,CAAC;IAEO,mCAAW,GAAnB,UAAoB,MAAe;QAC/B,OAAO,MAAM,CAAC,UAAU,KAAK,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,sBAAsB,CAAC;IAC3F,CAAC;IACL,oBAAC;AAAD,CAAC,AAxCD,IAwCC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ThriftClient, TCLIServiceTypes } from "../Types";
|
|
2
|
+
export default abstract class BaseCommand {
|
|
3
|
+
protected client: ThriftClient;
|
|
4
|
+
protected TCLIService_types: TCLIServiceTypes;
|
|
5
|
+
constructor(client: ThriftClient, TCLIService_types: TCLIServiceTypes);
|
|
6
|
+
executeCommand<Response>(request: object, command: Function | void): Promise<Response>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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 HiveDriverError_1 = __importDefault(require("../../errors/HiveDriverError"));
|
|
7
|
+
var BaseCommand = /** @class */ (function () {
|
|
8
|
+
function BaseCommand(client, TCLIService_types) {
|
|
9
|
+
this.client = client;
|
|
10
|
+
this.TCLIService_types = TCLIService_types;
|
|
11
|
+
}
|
|
12
|
+
BaseCommand.prototype.executeCommand = function (request, command) {
|
|
13
|
+
var _this = this;
|
|
14
|
+
return new Promise(function (resolve, reject) {
|
|
15
|
+
if (typeof command !== 'function') {
|
|
16
|
+
return reject(new HiveDriverError_1.default('Hive driver: the operation does not exist, try to choose another Thrift file.'));
|
|
17
|
+
}
|
|
18
|
+
try {
|
|
19
|
+
command.call(_this.client, request, function (err, response) {
|
|
20
|
+
if (err) {
|
|
21
|
+
reject(err);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
resolve(response);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
reject(error);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
return BaseCommand;
|
|
34
|
+
}());
|
|
35
|
+
exports.default = BaseCommand;
|
|
36
|
+
//# sourceMappingURL=BaseCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseCommand.js","sourceRoot":"","sources":["../../../lib/hive/Commands/BaseCommand.ts"],"names":[],"mappings":";;;;;AACA,iFAA2D;AAE3D;IAII,qBAAY,MAAoB,EAAE,iBAAmC;QACjE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,CAAC;IAED,oCAAc,GAAd,UAAyB,OAAe,EAAE,OAAwB;QAAlE,iBAkBC;QAjBG,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;YAC/B,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;gBAC/B,OAAO,MAAM,CAAC,IAAI,yBAAe,CAAC,+EAA+E,CAAC,CAAC,CAAC;aACvH;YAED,IAAI;gBACA,OAAO,CAAC,IAAI,CAAC,KAAI,CAAC,MAAM,EAAE,OAAO,EAAE,UAAC,GAAU,EAAE,QAAkB;oBAC9D,IAAI,GAAG,EAAE;wBACL,MAAM,CAAC,GAAG,CAAC,CAAC;qBACf;yBAAM;wBACH,OAAO,CAAC,QAAQ,CAAC,CAAC;qBACrB;gBACL,CAAC,CAAC,CAAC;aACN;YAAC,OAAO,KAAK,EAAE;gBACZ,MAAM,CAAC,KAAK,CAAC,CAAC;aACjB;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IACL,kBAAC;AAAD,CAAC,AA5BD,IA4BC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import BaseCommand from "./BaseCommand";
|
|
2
|
+
import { Status, SessionHandle } from "../Types";
|
|
3
|
+
export declare type CancelDelegationTokenRequest = {
|
|
4
|
+
sessionHandle: SessionHandle;
|
|
5
|
+
delegationToken: string;
|
|
6
|
+
};
|
|
7
|
+
export declare type CancelDelegationTokenResponse = {
|
|
8
|
+
status: Status;
|
|
9
|
+
};
|
|
10
|
+
export default class CancelDelegationTokenCommand extends BaseCommand {
|
|
11
|
+
execute(data: CancelDelegationTokenRequest): Promise<CancelDelegationTokenResponse>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 CancelDelegationTokenCommand = /** @class */ (function (_super) {
|
|
23
|
+
__extends(CancelDelegationTokenCommand, _super);
|
|
24
|
+
function CancelDelegationTokenCommand() {
|
|
25
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
+
}
|
|
27
|
+
CancelDelegationTokenCommand.prototype.execute = function (data) {
|
|
28
|
+
var request = new this.TCLIService_types.TCancelDelegationTokenReq(data);
|
|
29
|
+
return this.executeCommand(request, this.client.CancelDelegationToken);
|
|
30
|
+
};
|
|
31
|
+
return CancelDelegationTokenCommand;
|
|
32
|
+
}(BaseCommand_1.default));
|
|
33
|
+
exports.default = CancelDelegationTokenCommand;
|
|
34
|
+
//# sourceMappingURL=CancelDelegationTokenCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CancelDelegationTokenCommand.js","sourceRoot":"","sources":["../../../lib/hive/Commands/CancelDelegationTokenCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,8DAAwC;AAYxC;IAA0D,gDAAW;IAArE;;IAMA,CAAC;IALG,8CAAO,GAAP,UAAQ,IAAkC;QACtC,IAAM,OAAO,GAAG,IAAI,IAAI,CAAC,iBAAiB,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC;QAE3E,OAAO,IAAI,CAAC,cAAc,CAAgC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;IAC1G,CAAC;IACL,mCAAC;AAAD,CAAC,AAND,CAA0D,qBAAW,GAMpE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import BaseCommand from "./BaseCommand";
|
|
2
|
+
import { Status, OperationHandle } from "../Types";
|
|
3
|
+
export declare type CancelOperationRequest = {
|
|
4
|
+
operationHandle: OperationHandle;
|
|
5
|
+
};
|
|
6
|
+
export declare type CancelOperationResponse = {
|
|
7
|
+
status: Status;
|
|
8
|
+
};
|
|
9
|
+
export default class CancelOperationCommand extends BaseCommand {
|
|
10
|
+
execute(data: CancelOperationRequest): Promise<CancelOperationResponse>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 CancelOperationCommand = /** @class */ (function (_super) {
|
|
23
|
+
__extends(CancelOperationCommand, _super);
|
|
24
|
+
function CancelOperationCommand() {
|
|
25
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
+
}
|
|
27
|
+
CancelOperationCommand.prototype.execute = function (data) {
|
|
28
|
+
var request = new this.TCLIService_types.TCancelOperationReq(data);
|
|
29
|
+
return this.executeCommand(request, this.client.CancelOperation);
|
|
30
|
+
};
|
|
31
|
+
return CancelOperationCommand;
|
|
32
|
+
}(BaseCommand_1.default));
|
|
33
|
+
exports.default = CancelOperationCommand;
|
|
34
|
+
//# sourceMappingURL=CancelOperationCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CancelOperationCommand.js","sourceRoot":"","sources":["../../../lib/hive/Commands/CancelOperationCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,8DAAwC;AAWxC;IAAoD,0CAAW;IAA/D;;IAMA,CAAC;IALG,wCAAO,GAAP,UAAQ,IAA4B;QAChC,IAAM,OAAO,GAAG,IAAI,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAErE,OAAO,IAAI,CAAC,cAAc,CAA0B,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IAC9F,CAAC;IACL,6BAAC;AAAD,CAAC,AAND,CAAoD,qBAAW,GAM9D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import BaseCommand from "./BaseCommand";
|
|
2
|
+
import { Status, OperationHandle } from "../Types";
|
|
3
|
+
export declare type CloseOperationRequest = {
|
|
4
|
+
operationHandle: OperationHandle;
|
|
5
|
+
};
|
|
6
|
+
export declare type CloseOperationResponse = {
|
|
7
|
+
status: Status;
|
|
8
|
+
};
|
|
9
|
+
export default class CloseOperationCommand extends BaseCommand {
|
|
10
|
+
execute(data: CloseOperationRequest): Promise<CloseOperationResponse>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 CloseOperationCommand = /** @class */ (function (_super) {
|
|
23
|
+
__extends(CloseOperationCommand, _super);
|
|
24
|
+
function CloseOperationCommand() {
|
|
25
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
+
}
|
|
27
|
+
CloseOperationCommand.prototype.execute = function (data) {
|
|
28
|
+
var request = new this.TCLIService_types.TCloseOperationReq(data);
|
|
29
|
+
return this.executeCommand(request, this.client.CloseOperation);
|
|
30
|
+
};
|
|
31
|
+
return CloseOperationCommand;
|
|
32
|
+
}(BaseCommand_1.default));
|
|
33
|
+
exports.default = CloseOperationCommand;
|
|
34
|
+
//# sourceMappingURL=CloseOperationCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloseOperationCommand.js","sourceRoot":"","sources":["../../../lib/hive/Commands/CloseOperationCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,8DAAwC;AAWxC;IAAmD,yCAAW;IAA9D;;IAMA,CAAC;IALG,uCAAO,GAAP,UAAQ,IAA2B;QAC/B,IAAM,OAAO,GAAG,IAAI,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAEpE,OAAO,IAAI,CAAC,cAAc,CAAyB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IAC5F,CAAC;IACL,4BAAC;AAAD,CAAC,AAND,CAAmD,qBAAW,GAM7D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SessionHandle, Status } from "../Types";
|
|
2
|
+
import BaseCommand from "./BaseCommand";
|
|
3
|
+
export declare type CloseSessionRequest = {
|
|
4
|
+
sessionHandle: SessionHandle;
|
|
5
|
+
};
|
|
6
|
+
export declare type CloseSessionResponse = {
|
|
7
|
+
status: Status;
|
|
8
|
+
};
|
|
9
|
+
export default class CloseSessionCommand extends BaseCommand {
|
|
10
|
+
execute(openSessionRequest: CloseSessionRequest): Promise<CloseSessionResponse>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 CloseSessionCommand = /** @class */ (function (_super) {
|
|
23
|
+
__extends(CloseSessionCommand, _super);
|
|
24
|
+
function CloseSessionCommand() {
|
|
25
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
+
}
|
|
27
|
+
CloseSessionCommand.prototype.execute = function (openSessionRequest) {
|
|
28
|
+
var request = new this.TCLIService_types.TCloseSessionReq(openSessionRequest);
|
|
29
|
+
return this.executeCommand(request, this.client.CloseSession);
|
|
30
|
+
};
|
|
31
|
+
return CloseSessionCommand;
|
|
32
|
+
}(BaseCommand_1.default));
|
|
33
|
+
exports.default = CloseSessionCommand;
|
|
34
|
+
//# sourceMappingURL=CloseSessionCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloseSessionCommand.js","sourceRoot":"","sources":["../../../lib/hive/Commands/CloseSessionCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,8DAAwC;AAUxC;IAAiD,uCAAW;IAA5D;;IAMA,CAAC;IALG,qCAAO,GAAP,UAAQ,kBAAuC;QAC3C,IAAM,OAAO,GAAG,IAAI,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;QAEhF,OAAO,IAAI,CAAC,cAAc,CAAuB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IACxF,CAAC;IACL,0BAAC;AAAD,CAAC,AAND,CAAiD,qBAAW,GAM3D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { SessionHandle, Status, OperationHandle } from "../Types";
|
|
3
|
+
import BaseCommand from "./BaseCommand";
|
|
4
|
+
export declare type ExecuteStatementRequest = {
|
|
5
|
+
sessionHandle: SessionHandle;
|
|
6
|
+
statement: string;
|
|
7
|
+
confOverlay?: Map<string, string>;
|
|
8
|
+
runAsync?: boolean;
|
|
9
|
+
queryTimeout?: Buffer;
|
|
10
|
+
};
|
|
11
|
+
export declare type ExecuteStatementResponse = {
|
|
12
|
+
status: Status;
|
|
13
|
+
operationHandle: OperationHandle;
|
|
14
|
+
};
|
|
15
|
+
export default class ExecuteStatementCommand extends BaseCommand {
|
|
16
|
+
execute(executeStatementRequest: ExecuteStatementRequest): Promise<ExecuteStatementResponse>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 ExecuteStatementCommand = /** @class */ (function (_super) {
|
|
23
|
+
__extends(ExecuteStatementCommand, _super);
|
|
24
|
+
function ExecuteStatementCommand() {
|
|
25
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
+
}
|
|
27
|
+
ExecuteStatementCommand.prototype.execute = function (executeStatementRequest) {
|
|
28
|
+
var request = new this.TCLIService_types.TExecuteStatementReq(executeStatementRequest);
|
|
29
|
+
return this.executeCommand(request, this.client.ExecuteStatement);
|
|
30
|
+
};
|
|
31
|
+
return ExecuteStatementCommand;
|
|
32
|
+
}(BaseCommand_1.default));
|
|
33
|
+
exports.default = ExecuteStatementCommand;
|
|
34
|
+
//# sourceMappingURL=ExecuteStatementCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExecuteStatementCommand.js","sourceRoot":"","sources":["../../../lib/hive/Commands/ExecuteStatementCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,8DAAwC;AAexC;IAAqD,2CAAW;IAAhE;;IAMA,CAAC;IALG,yCAAO,GAAP,UAAQ,uBAAgD;QACpD,IAAM,OAAO,GAAG,IAAI,IAAI,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,CAAC;QAEzF,OAAO,IAAI,CAAC,cAAc,CAA2B,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAChG,CAAC;IACL,8BAAC;AAAD,CAAC,AAND,CAAqD,qBAAW,GAM/D"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import BaseCommand from "./BaseCommand";
|
|
2
|
+
import { OperationHandle, Status, RowSet } from "../Types";
|
|
3
|
+
/**
|
|
4
|
+
* @param orientation - TCLIService_types.TFetchOrientation
|
|
5
|
+
* @param fetchType - 0 represents Query output. 1 represents Log
|
|
6
|
+
*/
|
|
7
|
+
export declare type FetchResultsRequest = {
|
|
8
|
+
operationHandle: OperationHandle;
|
|
9
|
+
orientation: number;
|
|
10
|
+
maxRows: number;
|
|
11
|
+
fetchType?: number;
|
|
12
|
+
};
|
|
13
|
+
export declare type FetchResultsResponse = {
|
|
14
|
+
status: Status;
|
|
15
|
+
hasMoreRows?: boolean;
|
|
16
|
+
results?: RowSet;
|
|
17
|
+
};
|
|
18
|
+
export default class FetchResultsCommand extends BaseCommand {
|
|
19
|
+
execute(data: FetchResultsRequest): Promise<FetchResultsResponse>;
|
|
20
|
+
}
|