@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.
Files changed (248) hide show
  1. package/CHANGELOG.md +29 -1
  2. package/NOTICE +35 -0
  3. package/README.md +42 -19
  4. package/dist/DBSQLClient.d.ts +23 -39
  5. package/dist/DBSQLClient.js +110 -98
  6. package/dist/DBSQLClient.js.map +1 -1
  7. package/dist/DBSQLOperation/CompleteOperationHelper.d.ts +13 -0
  8. package/dist/DBSQLOperation/CompleteOperationHelper.js +61 -0
  9. package/dist/DBSQLOperation/CompleteOperationHelper.js.map +1 -0
  10. package/dist/DBSQLOperation/FetchResultsHelper.d.ts +14 -0
  11. package/dist/DBSQLOperation/FetchResultsHelper.js +79 -0
  12. package/dist/DBSQLOperation/FetchResultsHelper.js.map +1 -0
  13. package/dist/DBSQLOperation/OperationStatusHelper.d.ts +17 -0
  14. package/dist/DBSQLOperation/OperationStatusHelper.js +115 -0
  15. package/dist/DBSQLOperation/OperationStatusHelper.js.map +1 -0
  16. package/dist/DBSQLOperation/SchemaHelper.d.ts +10 -0
  17. package/dist/DBSQLOperation/SchemaHelper.js +39 -0
  18. package/dist/DBSQLOperation/SchemaHelper.js.map +1 -0
  19. package/dist/DBSQLOperation/getResult.d.ts +2 -0
  20. package/dist/DBSQLOperation/getResult.js +19 -0
  21. package/dist/DBSQLOperation/getResult.js.map +1 -0
  22. package/dist/DBSQLOperation/index.d.ts +34 -0
  23. package/dist/DBSQLOperation/index.js +100 -0
  24. package/dist/DBSQLOperation/index.js.map +1 -0
  25. package/dist/{HiveSession.d.ts → DBSQLSession.d.ts} +8 -9
  26. package/dist/DBSQLSession.js +185 -0
  27. package/dist/DBSQLSession.js.map +1 -0
  28. package/dist/connection/auth/NoSaslAuthentication.d.ts +2 -2
  29. package/dist/connection/auth/NoSaslAuthentication.js +9 -9
  30. package/dist/connection/auth/NoSaslAuthentication.js.map +1 -1
  31. package/dist/connection/auth/PlainHttpAuthentication.d.ts +2 -2
  32. package/dist/connection/auth/PlainHttpAuthentication.js +9 -21
  33. package/dist/connection/auth/PlainHttpAuthentication.js.map +1 -1
  34. package/dist/connection/auth/helpers/SaslPackageFactory.js +5 -9
  35. package/dist/connection/auth/helpers/SaslPackageFactory.js.map +1 -1
  36. package/dist/connection/connections/HttpConnection.d.ts +4 -4
  37. package/dist/connection/connections/HttpConnection.js +39 -47
  38. package/dist/connection/connections/HttpConnection.js.map +1 -1
  39. package/dist/connection/contracts/IAuthentication.d.ts +1 -1
  40. package/dist/connection/transports/HttpTransport.d.ts +1 -1
  41. package/dist/connection/transports/HttpTransport.js +16 -31
  42. package/dist/connection/transports/HttpTransport.js.map +1 -1
  43. package/dist/contracts/IDBSQLClient.d.ts +14 -0
  44. package/dist/contracts/{IHiveClient.js → IDBSQLClient.js} +1 -1
  45. package/dist/contracts/IDBSQLClient.js.map +1 -0
  46. package/dist/contracts/{IHiveSession.d.ts → IDBSQLSession.d.ts} +9 -7
  47. package/dist/contracts/{IHiveSession.js → IDBSQLSession.js} +1 -1
  48. package/dist/contracts/IDBSQLSession.js.map +1 -0
  49. package/dist/contracts/IOperation.d.ts +21 -21
  50. package/dist/contracts/IOperation.js +4 -0
  51. package/dist/contracts/IOperation.js.map +1 -1
  52. package/dist/dto/InfoValue.d.ts +5 -3
  53. package/dist/dto/InfoValue.js +11 -14
  54. package/dist/dto/InfoValue.js.map +1 -1
  55. package/dist/dto/Status.js +9 -10
  56. package/dist/dto/Status.js.map +1 -1
  57. package/dist/errors/AuthenticationError.d.ts +1 -1
  58. package/dist/errors/AuthenticationError.js +3 -23
  59. package/dist/errors/AuthenticationError.js.map +1 -1
  60. package/dist/errors/HiveDriverError.js +2 -22
  61. package/dist/errors/HiveDriverError.js.map +1 -1
  62. package/dist/errors/OperationStateError.d.ts +4 -4
  63. package/dist/errors/OperationStateError.js +6 -24
  64. package/dist/errors/OperationStateError.js.map +1 -1
  65. package/dist/errors/StatusError.d.ts +2 -2
  66. package/dist/errors/StatusError.js +3 -4
  67. package/dist/errors/StatusError.js.map +1 -1
  68. package/dist/factory/StatusFactory.d.ts +2 -4
  69. package/dist/factory/StatusFactory.js +16 -21
  70. package/dist/factory/StatusFactory.js.map +1 -1
  71. package/dist/hive/Commands/BaseCommand.d.ts +3 -4
  72. package/dist/hive/Commands/BaseCommand.js +10 -12
  73. package/dist/hive/Commands/BaseCommand.js.map +1 -1
  74. package/dist/hive/Commands/CancelDelegationTokenCommand.d.ts +3 -10
  75. package/dist/hive/Commands/CancelDelegationTokenCommand.js +7 -26
  76. package/dist/hive/Commands/CancelDelegationTokenCommand.js.map +1 -1
  77. package/dist/hive/Commands/CancelOperationCommand.d.ts +3 -9
  78. package/dist/hive/Commands/CancelOperationCommand.js +7 -26
  79. package/dist/hive/Commands/CancelOperationCommand.js.map +1 -1
  80. package/dist/hive/Commands/CloseOperationCommand.d.ts +3 -9
  81. package/dist/hive/Commands/CloseOperationCommand.js +7 -26
  82. package/dist/hive/Commands/CloseOperationCommand.js.map +1 -1
  83. package/dist/hive/Commands/CloseSessionCommand.d.ts +3 -9
  84. package/dist/hive/Commands/CloseSessionCommand.js +7 -26
  85. package/dist/hive/Commands/CloseSessionCommand.js.map +1 -1
  86. package/dist/hive/Commands/ExecuteStatementCommand.d.ts +3 -15
  87. package/dist/hive/Commands/ExecuteStatementCommand.js +7 -26
  88. package/dist/hive/Commands/ExecuteStatementCommand.js.map +1 -1
  89. package/dist/hive/Commands/FetchResultsCommand.d.ts +4 -16
  90. package/dist/hive/Commands/FetchResultsCommand.js +10 -26
  91. package/dist/hive/Commands/FetchResultsCommand.js.map +1 -1
  92. package/dist/hive/Commands/GetCatalogsCommand.d.ts +3 -10
  93. package/dist/hive/Commands/GetCatalogsCommand.js +7 -26
  94. package/dist/hive/Commands/GetCatalogsCommand.js.map +1 -1
  95. package/dist/hive/Commands/GetColumnsCommand.d.ts +3 -14
  96. package/dist/hive/Commands/GetColumnsCommand.js +7 -26
  97. package/dist/hive/Commands/GetColumnsCommand.js.map +1 -1
  98. package/dist/hive/Commands/GetCrossReferenceCommand.d.ts +3 -16
  99. package/dist/hive/Commands/GetCrossReferenceCommand.js +7 -26
  100. package/dist/hive/Commands/GetCrossReferenceCommand.js.map +1 -1
  101. package/dist/hive/Commands/GetDelegationTokenCommand.d.ts +3 -12
  102. package/dist/hive/Commands/GetDelegationTokenCommand.js +7 -26
  103. package/dist/hive/Commands/GetDelegationTokenCommand.js.map +1 -1
  104. package/dist/hive/Commands/GetFunctionsCommand.d.ts +3 -13
  105. package/dist/hive/Commands/GetFunctionsCommand.js +7 -26
  106. package/dist/hive/Commands/GetFunctionsCommand.js.map +1 -1
  107. package/dist/hive/Commands/GetInfoCommand.d.ts +3 -14
  108. package/dist/hive/Commands/GetInfoCommand.js +7 -26
  109. package/dist/hive/Commands/GetInfoCommand.js.map +1 -1
  110. package/dist/hive/Commands/GetOperationStatusCommand.d.ts +3 -21
  111. package/dist/hive/Commands/GetOperationStatusCommand.js +7 -26
  112. package/dist/hive/Commands/GetOperationStatusCommand.js.map +1 -1
  113. package/dist/hive/Commands/GetPrimaryKeysCommand.d.ts +3 -13
  114. package/dist/hive/Commands/GetPrimaryKeysCommand.js +7 -26
  115. package/dist/hive/Commands/GetPrimaryKeysCommand.js.map +1 -1
  116. package/dist/hive/Commands/GetResultSetMetadataCommand.d.ts +3 -10
  117. package/dist/hive/Commands/GetResultSetMetadataCommand.js +7 -26
  118. package/dist/hive/Commands/GetResultSetMetadataCommand.js.map +1 -1
  119. package/dist/hive/Commands/GetSchemasCommand.d.ts +3 -12
  120. package/dist/hive/Commands/GetSchemasCommand.js +7 -26
  121. package/dist/hive/Commands/GetSchemasCommand.js.map +1 -1
  122. package/dist/hive/Commands/GetTableTypesCommand.d.ts +3 -10
  123. package/dist/hive/Commands/GetTableTypesCommand.js +7 -26
  124. package/dist/hive/Commands/GetTableTypesCommand.js.map +1 -1
  125. package/dist/hive/Commands/GetTablesCommand.d.ts +3 -14
  126. package/dist/hive/Commands/GetTablesCommand.js +7 -26
  127. package/dist/hive/Commands/GetTablesCommand.js.map +1 -1
  128. package/dist/hive/Commands/GetTypeInfoCommand.d.ts +3 -10
  129. package/dist/hive/Commands/GetTypeInfoCommand.js +7 -26
  130. package/dist/hive/Commands/GetTypeInfoCommand.js.map +1 -1
  131. package/dist/hive/Commands/OpenSessionCommand.d.ts +9 -28
  132. package/dist/hive/Commands/OpenSessionCommand.js +16 -26
  133. package/dist/hive/Commands/OpenSessionCommand.js.map +1 -1
  134. package/dist/hive/Commands/RenewDelegationTokenCommand.d.ts +3 -10
  135. package/dist/hive/Commands/RenewDelegationTokenCommand.js +7 -26
  136. package/dist/hive/Commands/RenewDelegationTokenCommand.js.map +1 -1
  137. package/dist/hive/HiveDriver.d.ts +24 -49
  138. package/dist/hive/HiveDriver.js +87 -99
  139. package/dist/hive/HiveDriver.js.map +1 -1
  140. package/dist/hive/Types/index.d.ts +7 -218
  141. package/dist/hive/Types/index.js +11 -2
  142. package/dist/hive/Types/index.js.map +1 -1
  143. package/dist/index.d.ts +14 -16
  144. package/dist/index.js +15 -51
  145. package/dist/index.js.map +1 -1
  146. package/dist/result/IOperationResult.d.ts +0 -2
  147. package/dist/result/JsonResult.d.ts +5 -8
  148. package/dist/result/JsonResult.js +81 -99
  149. package/dist/result/JsonResult.js.map +1 -1
  150. package/dist/result/NullResult.d.ts +1 -3
  151. package/dist/result/NullResult.js +4 -8
  152. package/dist/result/NullResult.js.map +1 -1
  153. package/dist/utils/buildUserAgentString.d.ts +1 -0
  154. package/dist/utils/buildUserAgentString.js +25 -0
  155. package/dist/utils/buildUserAgentString.js.map +1 -0
  156. package/dist/utils/definedOrError.d.ts +1 -0
  157. package/dist/utils/definedOrError.js +10 -0
  158. package/dist/utils/definedOrError.js.map +1 -0
  159. package/dist/utils/formatProgress.d.ts +9 -0
  160. package/dist/utils/formatProgress.js +24 -0
  161. package/dist/utils/formatProgress.js.map +1 -0
  162. package/dist/utils/index.d.ts +4 -0
  163. package/dist/utils/index.js +37 -0
  164. package/dist/utils/index.js.map +1 -0
  165. package/package.json +24 -6
  166. package/thrift/TCLIService.d.ts +196 -0
  167. package/thrift/{gen-nodejs/TCLIService.js → TCLIService.js} +1 -397
  168. package/thrift/TCLIService_types.d.ts +947 -0
  169. package/thrift/{gen-nodejs/TCLIService_types.js → TCLIService_types.js} +2830 -516
  170. package/.gitattributes +0 -32
  171. package/CONTRIBUTING.md +0 -55
  172. package/dist/HiveClient.d.ts +0 -35
  173. package/dist/HiveClient.js +0 -156
  174. package/dist/HiveClient.js.map +0 -1
  175. package/dist/HiveOperation.d.ts +0 -65
  176. package/dist/HiveOperation.js +0 -190
  177. package/dist/HiveOperation.js.map +0 -1
  178. package/dist/HiveSession.js +0 -197
  179. package/dist/HiveSession.js.map +0 -1
  180. package/dist/contracts/IHiveClient.d.ts +0 -10
  181. package/dist/contracts/IHiveClient.js.map +0 -1
  182. package/dist/contracts/IHiveSession.js.map +0 -1
  183. package/dist/hive/Commands/GetQueryIdCommand.d.ts +0 -11
  184. package/dist/hive/Commands/GetQueryIdCommand.js +0 -34
  185. package/dist/hive/Commands/GetQueryIdCommand.js.map +0 -1
  186. package/dist/hive/Commands/SetClientInfoCommand.d.ts +0 -12
  187. package/dist/hive/Commands/SetClientInfoCommand.js +0 -34
  188. package/dist/hive/Commands/SetClientInfoCommand.js.map +0 -1
  189. package/dist/utils/GetResult.d.ts +0 -16
  190. package/dist/utils/GetResult.js +0 -38
  191. package/dist/utils/GetResult.js.map +0 -1
  192. package/dist/utils/HiveUtils.d.ts +0 -11
  193. package/dist/utils/HiveUtils.js +0 -39
  194. package/dist/utils/HiveUtils.js.map +0 -1
  195. package/dist/utils/ProgressUpdateTransformer.d.ts +0 -8
  196. package/dist/utils/ProgressUpdateTransformer.js +0 -33
  197. package/dist/utils/ProgressUpdateTransformer.js.map +0 -1
  198. package/dist/utils/WaitUntilReady.d.ts +0 -16
  199. package/dist/utils/WaitUntilReady.js +0 -120
  200. package/dist/utils/WaitUntilReady.js.map +0 -1
  201. package/docs/readme.md +0 -227
  202. package/docs/troubleshooting.md +0 -84
  203. package/examples/data_types.js +0 -173
  204. package/examples/repl +0 -106
  205. package/examples/session.js +0 -55
  206. package/examples/usage.js +0 -18
  207. package/nyc.config.js +0 -8
  208. package/tests/e2e/data_types.test.js +0 -353
  209. package/tests/e2e/utils/config.js +0 -20
  210. package/tests/e2e/utils/logger.js +0 -22
  211. package/tests/unit/HiveClient.test.js +0 -153
  212. package/tests/unit/HiveOperation.test.js +0 -340
  213. package/tests/unit/HiveSession.test.js +0 -146
  214. package/tests/unit/connection/auth/PlainHttpAuthentication.test.js +0 -44
  215. package/tests/unit/connection/connections/HttpConnection.test.js +0 -141
  216. package/tests/unit/dto/InfoValue.test.js +0 -50
  217. package/tests/unit/factory/StatusFactory.test.js +0 -62
  218. package/tests/unit/hive/HiveDriver.test.js +0 -115
  219. package/tests/unit/hive/commands/CancelDelegationTokenCommand.test.js +0 -43
  220. package/tests/unit/hive/commands/CancelOperationCommand.test.js +0 -45
  221. package/tests/unit/hive/commands/CloseOperationCommand.test.js +0 -45
  222. package/tests/unit/hive/commands/CloseSessionCommand.test.js +0 -38
  223. package/tests/unit/hive/commands/ExecuteStatementCommand.test.js +0 -54
  224. package/tests/unit/hive/commands/FetchResultsCommand.test.js +0 -59
  225. package/tests/unit/hive/commands/GetCatalogsCommand.test.js +0 -50
  226. package/tests/unit/hive/commands/GetColumnsCommand.test.js +0 -50
  227. package/tests/unit/hive/commands/GetCrossReferenceCommand.test.js +0 -56
  228. package/tests/unit/hive/commands/GetDelegationTokenCommand.test.js +0 -45
  229. package/tests/unit/hive/commands/GetFunctionsCommand.test.js +0 -50
  230. package/tests/unit/hive/commands/GetInfoCommand.test.js +0 -51
  231. package/tests/unit/hive/commands/GetOperationStatusCommand.test.js +0 -63
  232. package/tests/unit/hive/commands/GetPrimaryKeysCommand.test.js +0 -50
  233. package/tests/unit/hive/commands/GetQueryIdCommand.test.js +0 -42
  234. package/tests/unit/hive/commands/GetResultSetMetadataCommand.test.js +0 -54
  235. package/tests/unit/hive/commands/GetSchemasCommand.test.js +0 -52
  236. package/tests/unit/hive/commands/GetTableTypesCommand.test.js +0 -50
  237. package/tests/unit/hive/commands/GetTablesCommand.test.js +0 -54
  238. package/tests/unit/hive/commands/GetTypeInfoCommand.test.js +0 -50
  239. package/tests/unit/hive/commands/OpenSessionCommand.test.js +0 -43
  240. package/tests/unit/hive/commands/RenewDelegationTokenCommand.test.js +0 -43
  241. package/tests/unit/hive/commands/SetClientInfoCommand.test.js +0 -45
  242. package/tests/unit/result/JsonResult.test.js +0 -295
  243. package/tests/unit/utils/GetResult.test.js +0 -30
  244. package/tests/unit/utils/HiveUtils.test.js +0 -60
  245. package/tests/unit/utils/ProgressUpdateTransformer.test.js +0 -28
  246. package/tests/unit/utils/WaitUntilReady.test.js +0 -105
  247. package/thrift/TCLIService.thrift +0 -1299
  248. 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.13.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
- };