@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpTransport.js","sourceRoot":"","sources":["../../../lib/connection/transports/HttpTransport.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HttpTransport.js","sourceRoot":"","sources":["../../../lib/connection/transports/HttpTransport.ts"],"names":[],"mappings":";;AAEA,MAAqB,aAAa;IAGhC,YAAY,cAAsB,EAAE;QAClC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,UAAU,CAAC,MAAc,EAAE,KAAU;QACnC,IAAI,CAAC,WAAW,mCACX,IAAI,CAAC,WAAW,KACnB,CAAC,MAAM,CAAC,EAAE,KAAK,GAChB,CAAC;IACJ,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,OAAO,KAAI,CAAC;IAEZ,WAAW,KAAI,CAAC;IAEhB,cAAc,KAAI,CAAC;IAEnB,KAAK,KAAI,CAAC;IAEV,GAAG,KAAI,CAAC;IAER,IAAI,KAAI,CAAC;CACV;AAjCD,gCAiCC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import IDBSQLLogger from './IDBSQLLogger';
|
|
2
|
+
import IDBSQLSession from './IDBSQLSession';
|
|
3
|
+
export interface ClientOptions {
|
|
4
|
+
logger?: IDBSQLLogger;
|
|
5
|
+
}
|
|
6
|
+
export interface ConnectionOptions {
|
|
7
|
+
host: string;
|
|
8
|
+
port?: number;
|
|
9
|
+
path: string;
|
|
10
|
+
token: string;
|
|
11
|
+
clientId?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface OpenSessionRequest {
|
|
14
|
+
initialCatalog?: string;
|
|
15
|
+
initialSchema?: string;
|
|
16
|
+
}
|
|
17
|
+
export default interface IDBSQLClient {
|
|
18
|
+
connect(options: ConnectionOptions): Promise<IDBSQLClient>;
|
|
19
|
+
openSession(request?: OpenSessionRequest): Promise<IDBSQLSession>;
|
|
20
|
+
close(): Promise<void>;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IDBSQLClient.js","sourceRoot":"","sources":["../../lib/contracts/IDBSQLClient.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface LoggerOptions {
|
|
2
|
+
filepath?: string;
|
|
3
|
+
level?: LogLevel;
|
|
4
|
+
}
|
|
5
|
+
export default interface IDBSQLLogger {
|
|
6
|
+
log(level: LogLevel, message: string): void;
|
|
7
|
+
}
|
|
8
|
+
export declare enum LogLevel {
|
|
9
|
+
error = "error",
|
|
10
|
+
warn = "warn",
|
|
11
|
+
info = "info",
|
|
12
|
+
debug = "debug"
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogLevel = void 0;
|
|
4
|
+
var LogLevel;
|
|
5
|
+
(function (LogLevel) {
|
|
6
|
+
LogLevel["error"] = "error";
|
|
7
|
+
LogLevel["warn"] = "warn";
|
|
8
|
+
LogLevel["info"] = "info";
|
|
9
|
+
LogLevel["debug"] = "debug";
|
|
10
|
+
})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));
|
|
11
|
+
//# sourceMappingURL=IDBSQLLogger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IDBSQLLogger.js","sourceRoot":"","sources":["../../lib/contracts/IDBSQLLogger.ts"],"names":[],"mappings":";;;AASA,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,2BAAe,CAAA;IACf,yBAAa,CAAA;IACb,yBAAa,CAAA;IACb,2BAAe,CAAA;AACjB,CAAC,EALW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAKnB"}
|
|
@@ -1,47 +1,72 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import IOperation from
|
|
3
|
-
import Status from
|
|
4
|
-
import InfoValue from
|
|
5
|
-
|
|
6
|
-
parentCatalogName: string;
|
|
7
|
-
parentSchemaName: string;
|
|
8
|
-
parentTableName: string;
|
|
9
|
-
foreignCatalogName: string;
|
|
10
|
-
foreignSchemaName: string;
|
|
11
|
-
foreignTableName: string;
|
|
12
|
-
};
|
|
1
|
+
/// <reference types="node-int64" />
|
|
2
|
+
import IOperation from './IOperation';
|
|
3
|
+
import Status from '../dto/Status';
|
|
4
|
+
import InfoValue from '../dto/InfoValue';
|
|
5
|
+
import { Int64 } from '../hive/Types';
|
|
13
6
|
export declare type ExecuteStatementOptions = {
|
|
7
|
+
queryTimeout?: Int64;
|
|
8
|
+
runAsync?: boolean;
|
|
9
|
+
maxRows?: number | null;
|
|
10
|
+
};
|
|
11
|
+
export declare type TypeInfoRequest = {
|
|
12
|
+
runAsync?: boolean;
|
|
13
|
+
maxRows?: number | null;
|
|
14
|
+
};
|
|
15
|
+
export declare type CatalogsRequest = {
|
|
14
16
|
runAsync?: boolean;
|
|
15
|
-
|
|
16
|
-
queryTimeout?: Buffer;
|
|
17
|
+
maxRows?: number | null;
|
|
17
18
|
};
|
|
18
19
|
export declare type SchemasRequest = {
|
|
19
|
-
schemaName?: string;
|
|
20
20
|
catalogName?: string;
|
|
21
|
+
schemaName?: string;
|
|
22
|
+
runAsync?: boolean;
|
|
23
|
+
maxRows?: number | null;
|
|
21
24
|
};
|
|
22
25
|
export declare type TablesRequest = {
|
|
23
26
|
catalogName?: string;
|
|
24
27
|
schemaName?: string;
|
|
25
28
|
tableName?: string;
|
|
26
29
|
tableTypes?: Array<string>;
|
|
30
|
+
runAsync?: boolean;
|
|
31
|
+
maxRows?: number | null;
|
|
32
|
+
};
|
|
33
|
+
export declare type TableTypesRequest = {
|
|
34
|
+
runAsync?: boolean;
|
|
35
|
+
maxRows?: number | null;
|
|
27
36
|
};
|
|
28
|
-
export declare type
|
|
37
|
+
export declare type ColumnsRequest = {
|
|
29
38
|
catalogName?: string;
|
|
30
39
|
schemaName?: string;
|
|
31
40
|
tableName?: string;
|
|
32
41
|
columnName?: string;
|
|
42
|
+
runAsync?: boolean;
|
|
43
|
+
maxRows?: number | null;
|
|
33
44
|
};
|
|
34
|
-
export declare type
|
|
35
|
-
functionName: string;
|
|
45
|
+
export declare type FunctionsRequest = {
|
|
36
46
|
catalogName?: string;
|
|
37
47
|
schemaName?: string;
|
|
48
|
+
functionName: string;
|
|
49
|
+
runAsync?: boolean;
|
|
50
|
+
maxRows?: number | null;
|
|
38
51
|
};
|
|
39
52
|
export declare type PrimaryKeysRequest = {
|
|
53
|
+
catalogName?: string;
|
|
40
54
|
schemaName: string;
|
|
41
55
|
tableName: string;
|
|
42
|
-
|
|
56
|
+
runAsync?: boolean;
|
|
57
|
+
maxRows?: number | null;
|
|
58
|
+
};
|
|
59
|
+
export declare type CrossReferenceRequest = {
|
|
60
|
+
parentCatalogName: string;
|
|
61
|
+
parentSchemaName: string;
|
|
62
|
+
parentTableName: string;
|
|
63
|
+
foreignCatalogName: string;
|
|
64
|
+
foreignSchemaName: string;
|
|
65
|
+
foreignTableName: string;
|
|
66
|
+
runAsync?: boolean;
|
|
67
|
+
maxRows?: number | null;
|
|
43
68
|
};
|
|
44
|
-
export default interface
|
|
69
|
+
export default interface IDBSQLSession {
|
|
45
70
|
/**
|
|
46
71
|
* Returns general information about the data source
|
|
47
72
|
*
|
|
@@ -56,41 +81,47 @@ export default interface IHiveSession {
|
|
|
56
81
|
*/
|
|
57
82
|
executeStatement(statement: string, options?: ExecuteStatementOptions): Promise<IOperation>;
|
|
58
83
|
/**
|
|
59
|
-
*
|
|
84
|
+
* Information about supported data types
|
|
85
|
+
*
|
|
86
|
+
* @param request
|
|
60
87
|
*/
|
|
61
|
-
getTypeInfo(): Promise<IOperation>;
|
|
88
|
+
getTypeInfo(request?: TypeInfoRequest): Promise<IOperation>;
|
|
62
89
|
/**
|
|
63
90
|
* Get list of catalogs
|
|
91
|
+
*
|
|
92
|
+
* @param request
|
|
64
93
|
*/
|
|
65
|
-
getCatalogs(): Promise<IOperation>;
|
|
94
|
+
getCatalogs(request?: CatalogsRequest): Promise<IOperation>;
|
|
66
95
|
/**
|
|
67
96
|
* Get list of databases
|
|
68
97
|
*
|
|
69
98
|
* @param request
|
|
70
99
|
*/
|
|
71
|
-
getSchemas(request
|
|
100
|
+
getSchemas(request?: SchemasRequest): Promise<IOperation>;
|
|
72
101
|
/**
|
|
73
102
|
* Get list of tables
|
|
74
103
|
*
|
|
75
104
|
* @param request
|
|
76
105
|
*/
|
|
77
|
-
getTables(request
|
|
106
|
+
getTables(request?: TablesRequest): Promise<IOperation>;
|
|
78
107
|
/**
|
|
79
108
|
* Get list of supported table types
|
|
109
|
+
*
|
|
110
|
+
* @param request
|
|
80
111
|
*/
|
|
81
|
-
getTableTypes(): Promise<IOperation>;
|
|
112
|
+
getTableTypes(request?: TableTypesRequest): Promise<IOperation>;
|
|
82
113
|
/**
|
|
83
114
|
* Get full information about columns of the table
|
|
84
115
|
*
|
|
85
116
|
* @param request
|
|
86
117
|
*/
|
|
87
|
-
getColumns(request
|
|
118
|
+
getColumns(request?: ColumnsRequest): Promise<IOperation>;
|
|
88
119
|
/**
|
|
89
120
|
* Get information about function
|
|
90
121
|
*
|
|
91
122
|
* @param request
|
|
92
123
|
*/
|
|
93
|
-
getFunctions(request:
|
|
124
|
+
getFunctions(request: FunctionsRequest): Promise<IOperation>;
|
|
94
125
|
/**
|
|
95
126
|
* Get primary keys of table
|
|
96
127
|
*
|
|
@@ -102,23 +133,6 @@ export default interface IHiveSession {
|
|
|
102
133
|
* @param request
|
|
103
134
|
*/
|
|
104
135
|
getCrossReference(request: CrossReferenceRequest): Promise<IOperation>;
|
|
105
|
-
/**
|
|
106
|
-
* Get delegation token. For kerberos auth only
|
|
107
|
-
*
|
|
108
|
-
* @param owner
|
|
109
|
-
* @param renewer
|
|
110
|
-
*/
|
|
111
|
-
getDelegationToken(owner: string, renewer: string): Promise<string>;
|
|
112
|
-
/**
|
|
113
|
-
* Renew delegation token/ For kerberos auth only
|
|
114
|
-
* @param token
|
|
115
|
-
*/
|
|
116
|
-
renewDelegationToken(token: string): Promise<Status>;
|
|
117
|
-
/**
|
|
118
|
-
* Cancel delegation token. For kerberos auth only
|
|
119
|
-
* @param token
|
|
120
|
-
*/
|
|
121
|
-
cancelDelegationToken(token: string): Promise<Status>;
|
|
122
136
|
/**
|
|
123
137
|
* closes the session
|
|
124
138
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IDBSQLSession.js","sourceRoot":"","sources":["../../lib/contracts/IDBSQLSession.ts"],"names":[],"mappings":""}
|
|
@@ -1,17 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import Status from
|
|
3
|
-
|
|
1
|
+
import { TGetOperationStatusResp, TTableSchema } from '../../thrift/TCLIService_types';
|
|
2
|
+
import Status from '../dto/Status';
|
|
3
|
+
export declare type OperationStatusCallback = (progress: TGetOperationStatusResp) => unknown;
|
|
4
|
+
export interface WaitUntilReadyOptions {
|
|
5
|
+
progress?: boolean;
|
|
6
|
+
callback?: OperationStatusCallback;
|
|
7
|
+
}
|
|
8
|
+
export interface FinishedOptions extends WaitUntilReadyOptions {
|
|
9
|
+
}
|
|
10
|
+
export interface FetchOptions extends WaitUntilReadyOptions {
|
|
11
|
+
maxRows?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface GetSchemaOptions extends WaitUntilReadyOptions {
|
|
14
|
+
}
|
|
4
15
|
export default interface IOperation {
|
|
5
16
|
/**
|
|
6
|
-
* Fetch
|
|
17
|
+
* Fetch a portion of data
|
|
18
|
+
*/
|
|
19
|
+
fetchChunk(options?: FetchOptions): Promise<Array<object>>;
|
|
20
|
+
/**
|
|
21
|
+
* Fetch all the data
|
|
7
22
|
*/
|
|
8
|
-
|
|
23
|
+
fetchAll(options?: FetchOptions): Promise<Array<object>>;
|
|
9
24
|
/**
|
|
10
25
|
* Request status of operation
|
|
11
26
|
*
|
|
12
27
|
* @param progress
|
|
13
28
|
*/
|
|
14
|
-
status(progress
|
|
29
|
+
status(progress?: boolean): Promise<TGetOperationStatusResp>;
|
|
15
30
|
/**
|
|
16
31
|
* Cancel operation
|
|
17
32
|
*/
|
|
@@ -21,27 +36,15 @@ export default interface IOperation {
|
|
|
21
36
|
*/
|
|
22
37
|
close(): Promise<Status>;
|
|
23
38
|
/**
|
|
24
|
-
*
|
|
39
|
+
* Waits until operation is finished
|
|
25
40
|
*/
|
|
26
|
-
finished():
|
|
41
|
+
finished(options?: FinishedOptions): Promise<void>;
|
|
27
42
|
/**
|
|
28
43
|
* Check if operation hasMoreRows
|
|
29
44
|
*/
|
|
30
|
-
hasMoreRows(): boolean
|
|
31
|
-
/**
|
|
32
|
-
* Set the max fetch size
|
|
33
|
-
*/
|
|
34
|
-
setMaxRows(maxRows: number): void;
|
|
35
|
-
/**
|
|
36
|
-
* Return retrieved schema
|
|
37
|
-
*/
|
|
38
|
-
getSchema(): TableSchema | null;
|
|
39
|
-
/**
|
|
40
|
-
* Return retrieved data
|
|
41
|
-
*/
|
|
42
|
-
getData(): Array<RowSet>;
|
|
45
|
+
hasMoreRows(): Promise<boolean>;
|
|
43
46
|
/**
|
|
44
|
-
*
|
|
47
|
+
* Fetch schema
|
|
45
48
|
*/
|
|
46
|
-
|
|
49
|
+
getSchema(options?: GetSchemaOptions): Promise<TTableSchema | null>;
|
|
47
50
|
}
|
package/dist/dto/InfoValue.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/// <reference types="node-int64" />
|
|
3
|
+
import { TGetInfoValue } from '../../thrift/TCLIService_types';
|
|
4
|
+
import { Int64 } from '../hive/Types';
|
|
5
|
+
declare type InfoResultType = string | number | Buffer | Int64 | null;
|
|
4
6
|
export default class InfoValue {
|
|
5
7
|
private value;
|
|
6
|
-
constructor(value:
|
|
8
|
+
constructor(value: TGetInfoValue);
|
|
7
9
|
getValue(): InfoResultType;
|
|
8
10
|
}
|
|
9
11
|
export {};
|
package/dist/dto/InfoValue.js
CHANGED
|
@@ -1,31 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
class InfoValue {
|
|
4
|
+
constructor(value) {
|
|
5
5
|
this.value = value;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
getValue() {
|
|
8
|
+
const infoValue = this.value;
|
|
9
9
|
if (infoValue.stringValue) {
|
|
10
10
|
return infoValue.stringValue;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
if (infoValue.smallIntValue) {
|
|
13
13
|
return infoValue.smallIntValue;
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
if (infoValue.integerBitmask) {
|
|
16
16
|
return infoValue.integerBitmask;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
if (infoValue.integerFlag) {
|
|
19
19
|
return infoValue.integerFlag;
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
if (infoValue.lenValue) {
|
|
22
22
|
return infoValue.lenValue;
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
28
|
-
return InfoValue;
|
|
29
|
-
}());
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
30
27
|
exports.default = InfoValue;
|
|
31
28
|
//# sourceMappingURL=InfoValue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfoValue.js","sourceRoot":"","sources":["../../lib/dto/InfoValue.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"InfoValue.js","sourceRoot":"","sources":["../../lib/dto/InfoValue.ts"],"names":[],"mappings":";;AAKA,MAAqB,SAAS;IAG5B,YAAY,KAAoB;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,QAAQ;QACN,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC;QAE7B,IAAI,SAAS,CAAC,WAAW,EAAE;YACzB,OAAO,SAAS,CAAC,WAAW,CAAC;SAC9B;QACD,IAAI,SAAS,CAAC,aAAa,EAAE;YAC3B,OAAO,SAAS,CAAC,aAAa,CAAC;SAChC;QACD,IAAI,SAAS,CAAC,cAAc,EAAE;YAC5B,OAAO,SAAS,CAAC,cAAc,CAAC;SACjC;QACD,IAAI,SAAS,CAAC,WAAW,EAAE;YACzB,OAAO,SAAS,CAAC,WAAW,CAAC;SAC9B;QACD,IAAI,SAAS,CAAC,QAAQ,EAAE;YACtB,OAAO,SAAS,CAAC,QAAQ,CAAC;SAC3B;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA3BD,4BA2BC"}
|
package/dist/dto/Status.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
class Status {
|
|
4
|
+
constructor(data) {
|
|
5
5
|
this.isSuccess = data.success;
|
|
6
6
|
this.isExecuting = data.executing;
|
|
7
7
|
this.infoMessages = data.infoMessages;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
success() {
|
|
10
10
|
return this.isSuccess;
|
|
11
|
-
}
|
|
12
|
-
|
|
11
|
+
}
|
|
12
|
+
executing() {
|
|
13
13
|
return this.isExecuting;
|
|
14
|
-
}
|
|
15
|
-
|
|
14
|
+
}
|
|
15
|
+
getInfo() {
|
|
16
16
|
return this.infoMessages;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
}());
|
|
17
|
+
}
|
|
18
|
+
}
|
|
20
19
|
exports.default = Status;
|
|
21
20
|
//# sourceMappingURL=Status.js.map
|
package/dist/dto/Status.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Status.js","sourceRoot":"","sources":["../../lib/dto/Status.ts"],"names":[],"mappings":";;AAMA;
|
|
1
|
+
{"version":3,"file":"Status.js","sourceRoot":"","sources":["../../lib/dto/Status.ts"],"names":[],"mappings":";;AAMA,MAAqB,MAAM;IAOzB,YAAY,IAAgB;QAC1B,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;IACxC,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;CACF;AAxBD,yBAwBC"}
|
|
@@ -1,30 +1,10 @@
|
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
4
|
};
|
|
20
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
function AuthenticationError() {
|
|
25
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
-
}
|
|
27
|
-
return AuthenticationError;
|
|
28
|
-
}(HiveDriverError_1.default));
|
|
6
|
+
const HiveDriverError_1 = __importDefault(require("./HiveDriverError"));
|
|
7
|
+
class AuthenticationError extends HiveDriverError_1.default {
|
|
8
|
+
}
|
|
29
9
|
exports.default = AuthenticationError;
|
|
30
10
|
//# sourceMappingURL=AuthenticationError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationError.js","sourceRoot":"","sources":["../../lib/errors/AuthenticationError.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuthenticationError.js","sourceRoot":"","sources":["../../lib/errors/AuthenticationError.ts"],"names":[],"mappings":";;;;;AAAA,wEAAgD;AAEhD,MAAqB,mBAAoB,SAAQ,yBAAe;CAAG;AAAnE,sCAAmE"}
|
|
@@ -1,26 +1,6 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function HiveDriverError() {
|
|
21
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
22
|
-
}
|
|
23
|
-
return HiveDriverError;
|
|
24
|
-
}(Error));
|
|
3
|
+
class HiveDriverError extends Error {
|
|
4
|
+
}
|
|
25
5
|
exports.default = HiveDriverError;
|
|
26
6
|
//# sourceMappingURL=HiveDriverError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HiveDriverError.js","sourceRoot":"","sources":["../../lib/errors/HiveDriverError.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HiveDriverError.js","sourceRoot":"","sources":["../../lib/errors/HiveDriverError.ts"],"names":[],"mappings":";;AAAA,MAAqB,eAAgB,SAAQ,KAAK;CAAG;AAArD,kCAAqD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import HiveDriverError from
|
|
2
|
-
import {
|
|
1
|
+
import HiveDriverError from './HiveDriverError';
|
|
2
|
+
import { TGetOperationStatusResp } from '../../thrift/TCLIService_types';
|
|
3
3
|
export default class OperationStateError extends HiveDriverError {
|
|
4
|
-
response:
|
|
5
|
-
constructor(message: string, response:
|
|
4
|
+
response: TGetOperationStatusResp;
|
|
5
|
+
constructor(message: string, response: TGetOperationStatusResp);
|
|
6
6
|
}
|
|
@@ -1,32 +1,14 @@
|
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
4
|
};
|
|
20
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
_this.response = response;
|
|
27
|
-
return _this;
|
|
6
|
+
const HiveDriverError_1 = __importDefault(require("./HiveDriverError"));
|
|
7
|
+
class OperationStateError extends HiveDriverError_1.default {
|
|
8
|
+
constructor(message, response) {
|
|
9
|
+
super(message);
|
|
10
|
+
this.response = response;
|
|
28
11
|
}
|
|
29
|
-
|
|
30
|
-
}(HiveDriverError_1.default));
|
|
12
|
+
}
|
|
31
13
|
exports.default = OperationStateError;
|
|
32
14
|
//# sourceMappingURL=OperationStateError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationStateError.js","sourceRoot":"","sources":["../../lib/errors/OperationStateError.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OperationStateError.js","sourceRoot":"","sources":["../../lib/errors/OperationStateError.ts"],"names":[],"mappings":";;;;;AAAA,wEAAgD;AAGhD,MAAqB,mBAAoB,SAAQ,yBAAe;IAG9D,YAAY,OAAe,EAAE,QAAiC;QAC5D,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CACF;AARD,sCAQC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TStatus } from '../../thrift/TCLIService_types';
|
|
2
2
|
export default class StatusError implements Error {
|
|
3
3
|
name: string;
|
|
4
4
|
message: string;
|
|
5
5
|
code: number;
|
|
6
6
|
stack?: string;
|
|
7
|
-
constructor(status:
|
|
7
|
+
constructor(status: TStatus);
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
class StatusError {
|
|
4
|
+
constructor(status) {
|
|
5
5
|
this.name = 'Status Error';
|
|
6
6
|
this.message = status.errorMessage || '';
|
|
7
7
|
this.code = status.errorCode || -1;
|
|
@@ -9,7 +9,6 @@ var StatusError = /** @class */ (function () {
|
|
|
9
9
|
this.stack = status.infoMessages.join('\n');
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
}());
|
|
12
|
+
}
|
|
14
13
|
exports.default = StatusError;
|
|
15
14
|
//# sourceMappingURL=StatusError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusError.js","sourceRoot":"","sources":["../../lib/errors/StatusError.ts"],"names":[],"mappings":";;AAEA;
|
|
1
|
+
{"version":3,"file":"StatusError.js","sourceRoot":"","sources":["../../lib/errors/StatusError.ts"],"names":[],"mappings":";;AAEA,MAAqB,WAAW;IAS9B,YAAY,MAAe;QACzB,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;YACtC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC7C;IACH,CAAC;CACF;AAlBD,8BAkBC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import Status from
|
|
1
|
+
import { TStatus } from '../../thrift/TCLIService_types';
|
|
2
|
+
import Status from '../dto/Status';
|
|
3
3
|
export default class StatusFactory {
|
|
4
|
-
private TCLIService_types;
|
|
5
|
-
constructor(TCLIService_types: TCLIServiceTypes);
|
|
6
4
|
/**
|
|
7
5
|
* @param status thrift status object from API responses
|
|
8
6
|
* @throws {StatusError}
|