@databricks/sql 0.1.8-beta.1 → 0.1.8-beta.2
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 +29 -1
- package/NOTICE +35 -0
- package/README.md +42 -19
- package/dist/DBSQLClient.d.ts +23 -39
- package/dist/DBSQLClient.js +110 -98
- package/dist/DBSQLClient.js.map +1 -1
- 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 +34 -0
- package/dist/DBSQLOperation/index.js +100 -0
- package/dist/DBSQLOperation/index.js.map +1 -0
- package/dist/{HiveSession.d.ts → DBSQLSession.d.ts} +8 -9
- package/dist/DBSQLSession.js +185 -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 +39 -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 +14 -0
- package/dist/contracts/{IHiveClient.js → IDBSQLClient.js} +1 -1
- package/dist/contracts/IDBSQLClient.js.map +1 -0
- package/dist/contracts/{IHiveSession.d.ts → IDBSQLSession.d.ts} +9 -7
- package/dist/contracts/{IHiveSession.js → IDBSQLSession.js} +1 -1
- package/dist/contracts/IDBSQLSession.js.map +1 -0
- package/dist/contracts/IOperation.d.ts +21 -21
- package/dist/contracts/IOperation.js +4 -0
- package/dist/contracts/IOperation.js.map +1 -1
- 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 +14 -16
- package/dist/index.js +15 -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 +24 -6
- 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.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
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Autogenerated by Thrift Compiler (0.16.0)
|
|
3
|
+
//
|
|
4
|
+
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
5
|
+
//
|
|
6
|
+
|
|
7
|
+
import thrift = require('thrift');
|
|
8
|
+
import Thrift = thrift.Thrift;
|
|
9
|
+
import Q = thrift.Q;
|
|
10
|
+
import Int64 = require('node-int64');
|
|
11
|
+
|
|
12
|
+
import ttypes = require('./TCLIService_types');
|
|
13
|
+
import TProtocolVersion = ttypes.TProtocolVersion
|
|
14
|
+
import TTypeId = ttypes.TTypeId
|
|
15
|
+
import TSparkRowSetType = ttypes.TSparkRowSetType
|
|
16
|
+
import TOperationIdempotencyType = ttypes.TOperationIdempotencyType
|
|
17
|
+
import TStatusCode = ttypes.TStatusCode
|
|
18
|
+
import TOperationState = ttypes.TOperationState
|
|
19
|
+
import TOperationType = ttypes.TOperationType
|
|
20
|
+
import TGetInfoType = ttypes.TGetInfoType
|
|
21
|
+
import TCacheLookupResult = ttypes.TCacheLookupResult
|
|
22
|
+
import TFetchOrientation = ttypes.TFetchOrientation
|
|
23
|
+
import TJobExecutionStatus = ttypes.TJobExecutionStatus
|
|
24
|
+
import PRIMITIVE_TYPES = ttypes.PRIMITIVE_TYPES
|
|
25
|
+
import COMPLEX_TYPES = ttypes.COMPLEX_TYPES
|
|
26
|
+
import COLLECTION_TYPES = ttypes.COLLECTION_TYPES
|
|
27
|
+
import TYPE_NAMES = ttypes.TYPE_NAMES
|
|
28
|
+
import CHARACTER_MAXIMUM_LENGTH = ttypes.CHARACTER_MAXIMUM_LENGTH
|
|
29
|
+
import PRECISION = ttypes.PRECISION
|
|
30
|
+
import SCALE = ttypes.SCALE
|
|
31
|
+
import TTypeQualifierValue = ttypes.TTypeQualifierValue
|
|
32
|
+
import TTypeQualifiers = ttypes.TTypeQualifiers
|
|
33
|
+
import TPrimitiveTypeEntry = ttypes.TPrimitiveTypeEntry
|
|
34
|
+
import TArrayTypeEntry = ttypes.TArrayTypeEntry
|
|
35
|
+
import TMapTypeEntry = ttypes.TMapTypeEntry
|
|
36
|
+
import TStructTypeEntry = ttypes.TStructTypeEntry
|
|
37
|
+
import TUnionTypeEntry = ttypes.TUnionTypeEntry
|
|
38
|
+
import TUserDefinedTypeEntry = ttypes.TUserDefinedTypeEntry
|
|
39
|
+
import TTypeEntry = ttypes.TTypeEntry
|
|
40
|
+
import TTypeDesc = ttypes.TTypeDesc
|
|
41
|
+
import TColumnDesc = ttypes.TColumnDesc
|
|
42
|
+
import TTableSchema = ttypes.TTableSchema
|
|
43
|
+
import TBoolValue = ttypes.TBoolValue
|
|
44
|
+
import TByteValue = ttypes.TByteValue
|
|
45
|
+
import TI16Value = ttypes.TI16Value
|
|
46
|
+
import TI32Value = ttypes.TI32Value
|
|
47
|
+
import TI64Value = ttypes.TI64Value
|
|
48
|
+
import TDoubleValue = ttypes.TDoubleValue
|
|
49
|
+
import TStringValue = ttypes.TStringValue
|
|
50
|
+
import TColumnValue = ttypes.TColumnValue
|
|
51
|
+
import TRow = ttypes.TRow
|
|
52
|
+
import TBoolColumn = ttypes.TBoolColumn
|
|
53
|
+
import TByteColumn = ttypes.TByteColumn
|
|
54
|
+
import TI16Column = ttypes.TI16Column
|
|
55
|
+
import TI32Column = ttypes.TI32Column
|
|
56
|
+
import TI64Column = ttypes.TI64Column
|
|
57
|
+
import TDoubleColumn = ttypes.TDoubleColumn
|
|
58
|
+
import TStringColumn = ttypes.TStringColumn
|
|
59
|
+
import TBinaryColumn = ttypes.TBinaryColumn
|
|
60
|
+
import TColumn = ttypes.TColumn
|
|
61
|
+
import TSparkArrowBatch = ttypes.TSparkArrowBatch
|
|
62
|
+
import TSparkArrowResultLink = ttypes.TSparkArrowResultLink
|
|
63
|
+
import TRowSet = ttypes.TRowSet
|
|
64
|
+
import TDBSqlTempView = ttypes.TDBSqlTempView
|
|
65
|
+
import TDBSqlSessionCapabilities = ttypes.TDBSqlSessionCapabilities
|
|
66
|
+
import TDBSqlSessionConf = ttypes.TDBSqlSessionConf
|
|
67
|
+
import TStatus = ttypes.TStatus
|
|
68
|
+
import TNamespace = ttypes.TNamespace
|
|
69
|
+
import THandleIdentifier = ttypes.THandleIdentifier
|
|
70
|
+
import TSessionHandle = ttypes.TSessionHandle
|
|
71
|
+
import TOperationHandle = ttypes.TOperationHandle
|
|
72
|
+
import TOpenSessionReq = ttypes.TOpenSessionReq
|
|
73
|
+
import TOpenSessionResp = ttypes.TOpenSessionResp
|
|
74
|
+
import TCloseSessionReq = ttypes.TCloseSessionReq
|
|
75
|
+
import TCloseSessionResp = ttypes.TCloseSessionResp
|
|
76
|
+
import TGetInfoValue = ttypes.TGetInfoValue
|
|
77
|
+
import TGetInfoReq = ttypes.TGetInfoReq
|
|
78
|
+
import TGetInfoResp = ttypes.TGetInfoResp
|
|
79
|
+
import TSparkGetDirectResults = ttypes.TSparkGetDirectResults
|
|
80
|
+
import TSparkDirectResults = ttypes.TSparkDirectResults
|
|
81
|
+
import TSparkArrowTypes = ttypes.TSparkArrowTypes
|
|
82
|
+
import TExecuteStatementReq = ttypes.TExecuteStatementReq
|
|
83
|
+
import TExecuteStatementResp = ttypes.TExecuteStatementResp
|
|
84
|
+
import TGetTypeInfoReq = ttypes.TGetTypeInfoReq
|
|
85
|
+
import TGetTypeInfoResp = ttypes.TGetTypeInfoResp
|
|
86
|
+
import TGetCatalogsReq = ttypes.TGetCatalogsReq
|
|
87
|
+
import TGetCatalogsResp = ttypes.TGetCatalogsResp
|
|
88
|
+
import TGetSchemasReq = ttypes.TGetSchemasReq
|
|
89
|
+
import TGetSchemasResp = ttypes.TGetSchemasResp
|
|
90
|
+
import TGetTablesReq = ttypes.TGetTablesReq
|
|
91
|
+
import TGetTablesResp = ttypes.TGetTablesResp
|
|
92
|
+
import TGetTableTypesReq = ttypes.TGetTableTypesReq
|
|
93
|
+
import TGetTableTypesResp = ttypes.TGetTableTypesResp
|
|
94
|
+
import TGetColumnsReq = ttypes.TGetColumnsReq
|
|
95
|
+
import TGetColumnsResp = ttypes.TGetColumnsResp
|
|
96
|
+
import TGetFunctionsReq = ttypes.TGetFunctionsReq
|
|
97
|
+
import TGetFunctionsResp = ttypes.TGetFunctionsResp
|
|
98
|
+
import TGetPrimaryKeysReq = ttypes.TGetPrimaryKeysReq
|
|
99
|
+
import TGetPrimaryKeysResp = ttypes.TGetPrimaryKeysResp
|
|
100
|
+
import TGetCrossReferenceReq = ttypes.TGetCrossReferenceReq
|
|
101
|
+
import TGetCrossReferenceResp = ttypes.TGetCrossReferenceResp
|
|
102
|
+
import TGetOperationStatusReq = ttypes.TGetOperationStatusReq
|
|
103
|
+
import TGetOperationStatusResp = ttypes.TGetOperationStatusResp
|
|
104
|
+
import TCancelOperationReq = ttypes.TCancelOperationReq
|
|
105
|
+
import TCancelOperationResp = ttypes.TCancelOperationResp
|
|
106
|
+
import TCloseOperationReq = ttypes.TCloseOperationReq
|
|
107
|
+
import TCloseOperationResp = ttypes.TCloseOperationResp
|
|
108
|
+
import TGetResultSetMetadataReq = ttypes.TGetResultSetMetadataReq
|
|
109
|
+
import TGetResultSetMetadataResp = ttypes.TGetResultSetMetadataResp
|
|
110
|
+
import TFetchResultsReq = ttypes.TFetchResultsReq
|
|
111
|
+
import TFetchResultsResp = ttypes.TFetchResultsResp
|
|
112
|
+
import TGetDelegationTokenReq = ttypes.TGetDelegationTokenReq
|
|
113
|
+
import TGetDelegationTokenResp = ttypes.TGetDelegationTokenResp
|
|
114
|
+
import TCancelDelegationTokenReq = ttypes.TCancelDelegationTokenReq
|
|
115
|
+
import TCancelDelegationTokenResp = ttypes.TCancelDelegationTokenResp
|
|
116
|
+
import TRenewDelegationTokenReq = ttypes.TRenewDelegationTokenReq
|
|
117
|
+
import TRenewDelegationTokenResp = ttypes.TRenewDelegationTokenResp
|
|
118
|
+
import TProgressUpdateResp = ttypes.TProgressUpdateResp
|
|
119
|
+
|
|
120
|
+
declare class Client {
|
|
121
|
+
private output: thrift.TTransport;
|
|
122
|
+
private pClass: thrift.TProtocol;
|
|
123
|
+
private _seqid: number;
|
|
124
|
+
|
|
125
|
+
constructor(output: thrift.TTransport, pClass: { new(trans: thrift.TTransport): thrift.TProtocol });
|
|
126
|
+
|
|
127
|
+
OpenSession(req: TOpenSessionReq, callback?: (error: void, response: TOpenSessionResp)=>void): void;
|
|
128
|
+
|
|
129
|
+
CloseSession(req: TCloseSessionReq, callback?: (error: void, response: TCloseSessionResp)=>void): void;
|
|
130
|
+
|
|
131
|
+
GetInfo(req: TGetInfoReq, callback?: (error: void, response: TGetInfoResp)=>void): void;
|
|
132
|
+
|
|
133
|
+
ExecuteStatement(req: TExecuteStatementReq, callback?: (error: void, response: TExecuteStatementResp)=>void): void;
|
|
134
|
+
|
|
135
|
+
GetTypeInfo(req: TGetTypeInfoReq, callback?: (error: void, response: TGetTypeInfoResp)=>void): void;
|
|
136
|
+
|
|
137
|
+
GetCatalogs(req: TGetCatalogsReq, callback?: (error: void, response: TGetCatalogsResp)=>void): void;
|
|
138
|
+
|
|
139
|
+
GetSchemas(req: TGetSchemasReq, callback?: (error: void, response: TGetSchemasResp)=>void): void;
|
|
140
|
+
|
|
141
|
+
GetTables(req: TGetTablesReq, callback?: (error: void, response: TGetTablesResp)=>void): void;
|
|
142
|
+
|
|
143
|
+
GetTableTypes(req: TGetTableTypesReq, callback?: (error: void, response: TGetTableTypesResp)=>void): void;
|
|
144
|
+
|
|
145
|
+
GetColumns(req: TGetColumnsReq, callback?: (error: void, response: TGetColumnsResp)=>void): void;
|
|
146
|
+
|
|
147
|
+
GetFunctions(req: TGetFunctionsReq, callback?: (error: void, response: TGetFunctionsResp)=>void): void;
|
|
148
|
+
|
|
149
|
+
GetPrimaryKeys(req: TGetPrimaryKeysReq, callback?: (error: void, response: TGetPrimaryKeysResp)=>void): void;
|
|
150
|
+
|
|
151
|
+
GetCrossReference(req: TGetCrossReferenceReq, callback?: (error: void, response: TGetCrossReferenceResp)=>void): void;
|
|
152
|
+
|
|
153
|
+
GetOperationStatus(req: TGetOperationStatusReq, callback?: (error: void, response: TGetOperationStatusResp)=>void): void;
|
|
154
|
+
|
|
155
|
+
CancelOperation(req: TCancelOperationReq, callback?: (error: void, response: TCancelOperationResp)=>void): void;
|
|
156
|
+
|
|
157
|
+
CloseOperation(req: TCloseOperationReq, callback?: (error: void, response: TCloseOperationResp)=>void): void;
|
|
158
|
+
|
|
159
|
+
GetResultSetMetadata(req: TGetResultSetMetadataReq, callback?: (error: void, response: TGetResultSetMetadataResp)=>void): void;
|
|
160
|
+
|
|
161
|
+
FetchResults(req: TFetchResultsReq, callback?: (error: void, response: TFetchResultsResp)=>void): void;
|
|
162
|
+
|
|
163
|
+
GetDelegationToken(req: TGetDelegationTokenReq, callback?: (error: void, response: TGetDelegationTokenResp)=>void): void;
|
|
164
|
+
|
|
165
|
+
CancelDelegationToken(req: TCancelDelegationTokenReq, callback?: (error: void, response: TCancelDelegationTokenResp)=>void): void;
|
|
166
|
+
|
|
167
|
+
RenewDelegationToken(req: TRenewDelegationTokenReq, callback?: (error: void, response: TRenewDelegationTokenResp)=>void): void;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
declare class Processor {
|
|
171
|
+
private _handler: object;
|
|
172
|
+
|
|
173
|
+
constructor(handler: object);
|
|
174
|
+
process(input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
175
|
+
process_OpenSession(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
176
|
+
process_CloseSession(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
177
|
+
process_GetInfo(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
178
|
+
process_ExecuteStatement(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
179
|
+
process_GetTypeInfo(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
180
|
+
process_GetCatalogs(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
181
|
+
process_GetSchemas(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
182
|
+
process_GetTables(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
183
|
+
process_GetTableTypes(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
184
|
+
process_GetColumns(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
185
|
+
process_GetFunctions(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
186
|
+
process_GetPrimaryKeys(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
187
|
+
process_GetCrossReference(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
188
|
+
process_GetOperationStatus(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
189
|
+
process_CancelOperation(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
190
|
+
process_CloseOperation(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
191
|
+
process_GetResultSetMetadata(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
192
|
+
process_FetchResults(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
193
|
+
process_GetDelegationToken(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
194
|
+
process_CancelDelegationToken(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
195
|
+
process_RenewDelegationToken(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void;
|
|
196
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//
|
|
2
|
-
// Autogenerated by Thrift Compiler (0.
|
|
2
|
+
// Autogenerated by Thrift Compiler (0.16.0)
|
|
3
3
|
//
|
|
4
4
|
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
5
5
|
//
|
|
@@ -2156,210 +2156,6 @@ TCLIService_RenewDelegationToken_result.prototype.write = function(output) {
|
|
|
2156
2156
|
return;
|
|
2157
2157
|
};
|
|
2158
2158
|
|
|
2159
|
-
var TCLIService_GetQueryId_args = function(args) {
|
|
2160
|
-
this.req = null;
|
|
2161
|
-
if (args) {
|
|
2162
|
-
if (args.req !== undefined && args.req !== null) {
|
|
2163
|
-
this.req = new ttypes.TGetQueryIdReq(args.req);
|
|
2164
|
-
}
|
|
2165
|
-
}
|
|
2166
|
-
};
|
|
2167
|
-
TCLIService_GetQueryId_args.prototype = {};
|
|
2168
|
-
TCLIService_GetQueryId_args.prototype.read = function(input) {
|
|
2169
|
-
input.readStructBegin();
|
|
2170
|
-
while (true) {
|
|
2171
|
-
var ret = input.readFieldBegin();
|
|
2172
|
-
var ftype = ret.ftype;
|
|
2173
|
-
var fid = ret.fid;
|
|
2174
|
-
if (ftype == Thrift.Type.STOP) {
|
|
2175
|
-
break;
|
|
2176
|
-
}
|
|
2177
|
-
switch (fid) {
|
|
2178
|
-
case 1:
|
|
2179
|
-
if (ftype == Thrift.Type.STRUCT) {
|
|
2180
|
-
this.req = new ttypes.TGetQueryIdReq();
|
|
2181
|
-
this.req.read(input);
|
|
2182
|
-
} else {
|
|
2183
|
-
input.skip(ftype);
|
|
2184
|
-
}
|
|
2185
|
-
break;
|
|
2186
|
-
case 0:
|
|
2187
|
-
input.skip(ftype);
|
|
2188
|
-
break;
|
|
2189
|
-
default:
|
|
2190
|
-
input.skip(ftype);
|
|
2191
|
-
}
|
|
2192
|
-
input.readFieldEnd();
|
|
2193
|
-
}
|
|
2194
|
-
input.readStructEnd();
|
|
2195
|
-
return;
|
|
2196
|
-
};
|
|
2197
|
-
|
|
2198
|
-
TCLIService_GetQueryId_args.prototype.write = function(output) {
|
|
2199
|
-
output.writeStructBegin('TCLIService_GetQueryId_args');
|
|
2200
|
-
if (this.req !== null && this.req !== undefined) {
|
|
2201
|
-
output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
|
|
2202
|
-
this.req.write(output);
|
|
2203
|
-
output.writeFieldEnd();
|
|
2204
|
-
}
|
|
2205
|
-
output.writeFieldStop();
|
|
2206
|
-
output.writeStructEnd();
|
|
2207
|
-
return;
|
|
2208
|
-
};
|
|
2209
|
-
|
|
2210
|
-
var TCLIService_GetQueryId_result = function(args) {
|
|
2211
|
-
this.success = null;
|
|
2212
|
-
if (args) {
|
|
2213
|
-
if (args.success !== undefined && args.success !== null) {
|
|
2214
|
-
this.success = new ttypes.TGetQueryIdResp(args.success);
|
|
2215
|
-
}
|
|
2216
|
-
}
|
|
2217
|
-
};
|
|
2218
|
-
TCLIService_GetQueryId_result.prototype = {};
|
|
2219
|
-
TCLIService_GetQueryId_result.prototype.read = function(input) {
|
|
2220
|
-
input.readStructBegin();
|
|
2221
|
-
while (true) {
|
|
2222
|
-
var ret = input.readFieldBegin();
|
|
2223
|
-
var ftype = ret.ftype;
|
|
2224
|
-
var fid = ret.fid;
|
|
2225
|
-
if (ftype == Thrift.Type.STOP) {
|
|
2226
|
-
break;
|
|
2227
|
-
}
|
|
2228
|
-
switch (fid) {
|
|
2229
|
-
case 0:
|
|
2230
|
-
if (ftype == Thrift.Type.STRUCT) {
|
|
2231
|
-
this.success = new ttypes.TGetQueryIdResp();
|
|
2232
|
-
this.success.read(input);
|
|
2233
|
-
} else {
|
|
2234
|
-
input.skip(ftype);
|
|
2235
|
-
}
|
|
2236
|
-
break;
|
|
2237
|
-
case 0:
|
|
2238
|
-
input.skip(ftype);
|
|
2239
|
-
break;
|
|
2240
|
-
default:
|
|
2241
|
-
input.skip(ftype);
|
|
2242
|
-
}
|
|
2243
|
-
input.readFieldEnd();
|
|
2244
|
-
}
|
|
2245
|
-
input.readStructEnd();
|
|
2246
|
-
return;
|
|
2247
|
-
};
|
|
2248
|
-
|
|
2249
|
-
TCLIService_GetQueryId_result.prototype.write = function(output) {
|
|
2250
|
-
output.writeStructBegin('TCLIService_GetQueryId_result');
|
|
2251
|
-
if (this.success !== null && this.success !== undefined) {
|
|
2252
|
-
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
|
|
2253
|
-
this.success.write(output);
|
|
2254
|
-
output.writeFieldEnd();
|
|
2255
|
-
}
|
|
2256
|
-
output.writeFieldStop();
|
|
2257
|
-
output.writeStructEnd();
|
|
2258
|
-
return;
|
|
2259
|
-
};
|
|
2260
|
-
|
|
2261
|
-
var TCLIService_SetClientInfo_args = function(args) {
|
|
2262
|
-
this.req = null;
|
|
2263
|
-
if (args) {
|
|
2264
|
-
if (args.req !== undefined && args.req !== null) {
|
|
2265
|
-
this.req = new ttypes.TSetClientInfoReq(args.req);
|
|
2266
|
-
}
|
|
2267
|
-
}
|
|
2268
|
-
};
|
|
2269
|
-
TCLIService_SetClientInfo_args.prototype = {};
|
|
2270
|
-
TCLIService_SetClientInfo_args.prototype.read = function(input) {
|
|
2271
|
-
input.readStructBegin();
|
|
2272
|
-
while (true) {
|
|
2273
|
-
var ret = input.readFieldBegin();
|
|
2274
|
-
var ftype = ret.ftype;
|
|
2275
|
-
var fid = ret.fid;
|
|
2276
|
-
if (ftype == Thrift.Type.STOP) {
|
|
2277
|
-
break;
|
|
2278
|
-
}
|
|
2279
|
-
switch (fid) {
|
|
2280
|
-
case 1:
|
|
2281
|
-
if (ftype == Thrift.Type.STRUCT) {
|
|
2282
|
-
this.req = new ttypes.TSetClientInfoReq();
|
|
2283
|
-
this.req.read(input);
|
|
2284
|
-
} else {
|
|
2285
|
-
input.skip(ftype);
|
|
2286
|
-
}
|
|
2287
|
-
break;
|
|
2288
|
-
case 0:
|
|
2289
|
-
input.skip(ftype);
|
|
2290
|
-
break;
|
|
2291
|
-
default:
|
|
2292
|
-
input.skip(ftype);
|
|
2293
|
-
}
|
|
2294
|
-
input.readFieldEnd();
|
|
2295
|
-
}
|
|
2296
|
-
input.readStructEnd();
|
|
2297
|
-
return;
|
|
2298
|
-
};
|
|
2299
|
-
|
|
2300
|
-
TCLIService_SetClientInfo_args.prototype.write = function(output) {
|
|
2301
|
-
output.writeStructBegin('TCLIService_SetClientInfo_args');
|
|
2302
|
-
if (this.req !== null && this.req !== undefined) {
|
|
2303
|
-
output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
|
|
2304
|
-
this.req.write(output);
|
|
2305
|
-
output.writeFieldEnd();
|
|
2306
|
-
}
|
|
2307
|
-
output.writeFieldStop();
|
|
2308
|
-
output.writeStructEnd();
|
|
2309
|
-
return;
|
|
2310
|
-
};
|
|
2311
|
-
|
|
2312
|
-
var TCLIService_SetClientInfo_result = function(args) {
|
|
2313
|
-
this.success = null;
|
|
2314
|
-
if (args) {
|
|
2315
|
-
if (args.success !== undefined && args.success !== null) {
|
|
2316
|
-
this.success = new ttypes.TSetClientInfoResp(args.success);
|
|
2317
|
-
}
|
|
2318
|
-
}
|
|
2319
|
-
};
|
|
2320
|
-
TCLIService_SetClientInfo_result.prototype = {};
|
|
2321
|
-
TCLIService_SetClientInfo_result.prototype.read = function(input) {
|
|
2322
|
-
input.readStructBegin();
|
|
2323
|
-
while (true) {
|
|
2324
|
-
var ret = input.readFieldBegin();
|
|
2325
|
-
var ftype = ret.ftype;
|
|
2326
|
-
var fid = ret.fid;
|
|
2327
|
-
if (ftype == Thrift.Type.STOP) {
|
|
2328
|
-
break;
|
|
2329
|
-
}
|
|
2330
|
-
switch (fid) {
|
|
2331
|
-
case 0:
|
|
2332
|
-
if (ftype == Thrift.Type.STRUCT) {
|
|
2333
|
-
this.success = new ttypes.TSetClientInfoResp();
|
|
2334
|
-
this.success.read(input);
|
|
2335
|
-
} else {
|
|
2336
|
-
input.skip(ftype);
|
|
2337
|
-
}
|
|
2338
|
-
break;
|
|
2339
|
-
case 0:
|
|
2340
|
-
input.skip(ftype);
|
|
2341
|
-
break;
|
|
2342
|
-
default:
|
|
2343
|
-
input.skip(ftype);
|
|
2344
|
-
}
|
|
2345
|
-
input.readFieldEnd();
|
|
2346
|
-
}
|
|
2347
|
-
input.readStructEnd();
|
|
2348
|
-
return;
|
|
2349
|
-
};
|
|
2350
|
-
|
|
2351
|
-
TCLIService_SetClientInfo_result.prototype.write = function(output) {
|
|
2352
|
-
output.writeStructBegin('TCLIService_SetClientInfo_result');
|
|
2353
|
-
if (this.success !== null && this.success !== undefined) {
|
|
2354
|
-
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
|
|
2355
|
-
this.success.write(output);
|
|
2356
|
-
output.writeFieldEnd();
|
|
2357
|
-
}
|
|
2358
|
-
output.writeFieldStop();
|
|
2359
|
-
output.writeStructEnd();
|
|
2360
|
-
return;
|
|
2361
|
-
};
|
|
2362
|
-
|
|
2363
2159
|
var TCLIServiceClient = exports.Client = function(output, pClass) {
|
|
2364
2160
|
this.output = output;
|
|
2365
2161
|
this.pClass = pClass;
|
|
@@ -3608,124 +3404,6 @@ TCLIServiceClient.prototype.recv_RenewDelegationToken = function(input,mtype,rse
|
|
|
3608
3404
|
}
|
|
3609
3405
|
return callback('RenewDelegationToken failed: unknown result');
|
|
3610
3406
|
};
|
|
3611
|
-
|
|
3612
|
-
TCLIServiceClient.prototype.GetQueryId = function(req, callback) {
|
|
3613
|
-
this._seqid = this.new_seqid();
|
|
3614
|
-
if (callback === undefined) {
|
|
3615
|
-
var _defer = Q.defer();
|
|
3616
|
-
this._reqs[this.seqid()] = function(error, result) {
|
|
3617
|
-
if (error) {
|
|
3618
|
-
_defer.reject(error);
|
|
3619
|
-
} else {
|
|
3620
|
-
_defer.resolve(result);
|
|
3621
|
-
}
|
|
3622
|
-
};
|
|
3623
|
-
this.send_GetQueryId(req);
|
|
3624
|
-
return _defer.promise;
|
|
3625
|
-
} else {
|
|
3626
|
-
this._reqs[this.seqid()] = callback;
|
|
3627
|
-
this.send_GetQueryId(req);
|
|
3628
|
-
}
|
|
3629
|
-
};
|
|
3630
|
-
|
|
3631
|
-
TCLIServiceClient.prototype.send_GetQueryId = function(req) {
|
|
3632
|
-
var output = new this.pClass(this.output);
|
|
3633
|
-
var params = {
|
|
3634
|
-
req: req
|
|
3635
|
-
};
|
|
3636
|
-
var args = new TCLIService_GetQueryId_args(params);
|
|
3637
|
-
try {
|
|
3638
|
-
output.writeMessageBegin('GetQueryId', Thrift.MessageType.CALL, this.seqid());
|
|
3639
|
-
args.write(output);
|
|
3640
|
-
output.writeMessageEnd();
|
|
3641
|
-
return this.output.flush();
|
|
3642
|
-
}
|
|
3643
|
-
catch (e) {
|
|
3644
|
-
delete this._reqs[this.seqid()];
|
|
3645
|
-
if (typeof output.reset === 'function') {
|
|
3646
|
-
output.reset();
|
|
3647
|
-
}
|
|
3648
|
-
throw e;
|
|
3649
|
-
}
|
|
3650
|
-
};
|
|
3651
|
-
|
|
3652
|
-
TCLIServiceClient.prototype.recv_GetQueryId = function(input,mtype,rseqid) {
|
|
3653
|
-
var callback = this._reqs[rseqid] || function() {};
|
|
3654
|
-
delete this._reqs[rseqid];
|
|
3655
|
-
if (mtype == Thrift.MessageType.EXCEPTION) {
|
|
3656
|
-
var x = new Thrift.TApplicationException();
|
|
3657
|
-
x.read(input);
|
|
3658
|
-
input.readMessageEnd();
|
|
3659
|
-
return callback(x);
|
|
3660
|
-
}
|
|
3661
|
-
var result = new TCLIService_GetQueryId_result();
|
|
3662
|
-
result.read(input);
|
|
3663
|
-
input.readMessageEnd();
|
|
3664
|
-
|
|
3665
|
-
if (null !== result.success) {
|
|
3666
|
-
return callback(null, result.success);
|
|
3667
|
-
}
|
|
3668
|
-
return callback('GetQueryId failed: unknown result');
|
|
3669
|
-
};
|
|
3670
|
-
|
|
3671
|
-
TCLIServiceClient.prototype.SetClientInfo = function(req, callback) {
|
|
3672
|
-
this._seqid = this.new_seqid();
|
|
3673
|
-
if (callback === undefined) {
|
|
3674
|
-
var _defer = Q.defer();
|
|
3675
|
-
this._reqs[this.seqid()] = function(error, result) {
|
|
3676
|
-
if (error) {
|
|
3677
|
-
_defer.reject(error);
|
|
3678
|
-
} else {
|
|
3679
|
-
_defer.resolve(result);
|
|
3680
|
-
}
|
|
3681
|
-
};
|
|
3682
|
-
this.send_SetClientInfo(req);
|
|
3683
|
-
return _defer.promise;
|
|
3684
|
-
} else {
|
|
3685
|
-
this._reqs[this.seqid()] = callback;
|
|
3686
|
-
this.send_SetClientInfo(req);
|
|
3687
|
-
}
|
|
3688
|
-
};
|
|
3689
|
-
|
|
3690
|
-
TCLIServiceClient.prototype.send_SetClientInfo = function(req) {
|
|
3691
|
-
var output = new this.pClass(this.output);
|
|
3692
|
-
var params = {
|
|
3693
|
-
req: req
|
|
3694
|
-
};
|
|
3695
|
-
var args = new TCLIService_SetClientInfo_args(params);
|
|
3696
|
-
try {
|
|
3697
|
-
output.writeMessageBegin('SetClientInfo', Thrift.MessageType.CALL, this.seqid());
|
|
3698
|
-
args.write(output);
|
|
3699
|
-
output.writeMessageEnd();
|
|
3700
|
-
return this.output.flush();
|
|
3701
|
-
}
|
|
3702
|
-
catch (e) {
|
|
3703
|
-
delete this._reqs[this.seqid()];
|
|
3704
|
-
if (typeof output.reset === 'function') {
|
|
3705
|
-
output.reset();
|
|
3706
|
-
}
|
|
3707
|
-
throw e;
|
|
3708
|
-
}
|
|
3709
|
-
};
|
|
3710
|
-
|
|
3711
|
-
TCLIServiceClient.prototype.recv_SetClientInfo = function(input,mtype,rseqid) {
|
|
3712
|
-
var callback = this._reqs[rseqid] || function() {};
|
|
3713
|
-
delete this._reqs[rseqid];
|
|
3714
|
-
if (mtype == Thrift.MessageType.EXCEPTION) {
|
|
3715
|
-
var x = new Thrift.TApplicationException();
|
|
3716
|
-
x.read(input);
|
|
3717
|
-
input.readMessageEnd();
|
|
3718
|
-
return callback(x);
|
|
3719
|
-
}
|
|
3720
|
-
var result = new TCLIService_SetClientInfo_result();
|
|
3721
|
-
result.read(input);
|
|
3722
|
-
input.readMessageEnd();
|
|
3723
|
-
|
|
3724
|
-
if (null !== result.success) {
|
|
3725
|
-
return callback(null, result.success);
|
|
3726
|
-
}
|
|
3727
|
-
return callback('SetClientInfo failed: unknown result');
|
|
3728
|
-
};
|
|
3729
3407
|
var TCLIServiceProcessor = exports.Processor = function(handler) {
|
|
3730
3408
|
this._handler = handler;
|
|
3731
3409
|
};
|
|
@@ -4520,77 +4198,3 @@ TCLIServiceProcessor.prototype.process_RenewDelegationToken = function(seqid, in
|
|
|
4520
4198
|
});
|
|
4521
4199
|
}
|
|
4522
4200
|
};
|
|
4523
|
-
TCLIServiceProcessor.prototype.process_GetQueryId = function(seqid, input, output) {
|
|
4524
|
-
var args = new TCLIService_GetQueryId_args();
|
|
4525
|
-
args.read(input);
|
|
4526
|
-
input.readMessageEnd();
|
|
4527
|
-
if (this._handler.GetQueryId.length === 1) {
|
|
4528
|
-
Q.fcall(this._handler.GetQueryId.bind(this._handler),
|
|
4529
|
-
args.req
|
|
4530
|
-
).then(function(result) {
|
|
4531
|
-
var result_obj = new TCLIService_GetQueryId_result({success: result});
|
|
4532
|
-
output.writeMessageBegin("GetQueryId", Thrift.MessageType.REPLY, seqid);
|
|
4533
|
-
result_obj.write(output);
|
|
4534
|
-
output.writeMessageEnd();
|
|
4535
|
-
output.flush();
|
|
4536
|
-
}).catch(function (err) {
|
|
4537
|
-
var result;
|
|
4538
|
-
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
|
|
4539
|
-
output.writeMessageBegin("GetQueryId", Thrift.MessageType.EXCEPTION, seqid);
|
|
4540
|
-
result.write(output);
|
|
4541
|
-
output.writeMessageEnd();
|
|
4542
|
-
output.flush();
|
|
4543
|
-
});
|
|
4544
|
-
} else {
|
|
4545
|
-
this._handler.GetQueryId(args.req, function (err, result) {
|
|
4546
|
-
var result_obj;
|
|
4547
|
-
if ((err === null || typeof err === 'undefined')) {
|
|
4548
|
-
result_obj = new TCLIService_GetQueryId_result((err !== null || typeof err === 'undefined') ? err : {success: result});
|
|
4549
|
-
output.writeMessageBegin("GetQueryId", Thrift.MessageType.REPLY, seqid);
|
|
4550
|
-
} else {
|
|
4551
|
-
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
|
|
4552
|
-
output.writeMessageBegin("GetQueryId", Thrift.MessageType.EXCEPTION, seqid);
|
|
4553
|
-
}
|
|
4554
|
-
result_obj.write(output);
|
|
4555
|
-
output.writeMessageEnd();
|
|
4556
|
-
output.flush();
|
|
4557
|
-
});
|
|
4558
|
-
}
|
|
4559
|
-
};
|
|
4560
|
-
TCLIServiceProcessor.prototype.process_SetClientInfo = function(seqid, input, output) {
|
|
4561
|
-
var args = new TCLIService_SetClientInfo_args();
|
|
4562
|
-
args.read(input);
|
|
4563
|
-
input.readMessageEnd();
|
|
4564
|
-
if (this._handler.SetClientInfo.length === 1) {
|
|
4565
|
-
Q.fcall(this._handler.SetClientInfo.bind(this._handler),
|
|
4566
|
-
args.req
|
|
4567
|
-
).then(function(result) {
|
|
4568
|
-
var result_obj = new TCLIService_SetClientInfo_result({success: result});
|
|
4569
|
-
output.writeMessageBegin("SetClientInfo", Thrift.MessageType.REPLY, seqid);
|
|
4570
|
-
result_obj.write(output);
|
|
4571
|
-
output.writeMessageEnd();
|
|
4572
|
-
output.flush();
|
|
4573
|
-
}).catch(function (err) {
|
|
4574
|
-
var result;
|
|
4575
|
-
result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
|
|
4576
|
-
output.writeMessageBegin("SetClientInfo", Thrift.MessageType.EXCEPTION, seqid);
|
|
4577
|
-
result.write(output);
|
|
4578
|
-
output.writeMessageEnd();
|
|
4579
|
-
output.flush();
|
|
4580
|
-
});
|
|
4581
|
-
} else {
|
|
4582
|
-
this._handler.SetClientInfo(args.req, function (err, result) {
|
|
4583
|
-
var result_obj;
|
|
4584
|
-
if ((err === null || typeof err === 'undefined')) {
|
|
4585
|
-
result_obj = new TCLIService_SetClientInfo_result((err !== null || typeof err === 'undefined') ? err : {success: result});
|
|
4586
|
-
output.writeMessageBegin("SetClientInfo", Thrift.MessageType.REPLY, seqid);
|
|
4587
|
-
} else {
|
|
4588
|
-
result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
|
|
4589
|
-
output.writeMessageBegin("SetClientInfo", Thrift.MessageType.EXCEPTION, seqid);
|
|
4590
|
-
}
|
|
4591
|
-
result_obj.write(output);
|
|
4592
|
-
output.writeMessageEnd();
|
|
4593
|
-
output.flush();
|
|
4594
|
-
});
|
|
4595
|
-
}
|
|
4596
|
-
};
|