@databricks/sql 0.1.8-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/.gitattributes +32 -0
  2. package/CHANGELOG.md +1 -0
  3. package/CONTRIBUTING.md +55 -0
  4. package/LICENSE +201 -0
  5. package/README.md +78 -0
  6. package/dist/DBSQLClient.d.ts +42 -0
  7. package/dist/DBSQLClient.js +111 -0
  8. package/dist/DBSQLClient.js.map +1 -0
  9. package/dist/HiveClient.d.ts +35 -0
  10. package/dist/HiveClient.js +156 -0
  11. package/dist/HiveClient.js.map +1 -0
  12. package/dist/HiveOperation.d.ts +65 -0
  13. package/dist/HiveOperation.js +190 -0
  14. package/dist/HiveOperation.js.map +1 -0
  15. package/dist/HiveSession.d.ts +30 -0
  16. package/dist/HiveSession.js +197 -0
  17. package/dist/HiveSession.js.map +1 -0
  18. package/dist/connection/auth/NoSaslAuthentication.d.ts +5 -0
  19. package/dist/connection/auth/NoSaslAuthentication.js +15 -0
  20. package/dist/connection/auth/NoSaslAuthentication.js.map +1 -0
  21. package/dist/connection/auth/PlainHttpAuthentication.d.ts +15 -0
  22. package/dist/connection/auth/PlainHttpAuthentication.js +30 -0
  23. package/dist/connection/auth/PlainHttpAuthentication.js.map +1 -0
  24. package/dist/connection/auth/helpers/SaslPackageFactory.d.ts +11 -0
  25. package/dist/connection/auth/helpers/SaslPackageFactory.js +24 -0
  26. package/dist/connection/auth/helpers/SaslPackageFactory.js.map +1 -0
  27. package/dist/connection/connections/HttpConnection.d.ts +13 -0
  28. package/dist/connection/connections/HttpConnection.js +77 -0
  29. package/dist/connection/connections/HttpConnection.js.map +1 -0
  30. package/dist/connection/contracts/IAuthentication.d.ts +4 -0
  31. package/dist/connection/contracts/IAuthentication.js +3 -0
  32. package/dist/connection/contracts/IAuthentication.js.map +1 -0
  33. package/dist/connection/contracts/IConnectionOptions.d.ts +23 -0
  34. package/dist/connection/contracts/IConnectionOptions.js +3 -0
  35. package/dist/connection/contracts/IConnectionOptions.js.map +1 -0
  36. package/dist/connection/contracts/IConnectionProvider.d.ts +6 -0
  37. package/dist/connection/contracts/IConnectionProvider.js +3 -0
  38. package/dist/connection/contracts/IConnectionProvider.js.map +1 -0
  39. package/dist/connection/contracts/IThriftConnection.d.ts +4 -0
  40. package/dist/connection/contracts/IThriftConnection.js +3 -0
  41. package/dist/connection/contracts/IThriftConnection.js.map +1 -0
  42. package/dist/connection/contracts/ITransport.d.ts +13 -0
  43. package/dist/connection/contracts/ITransport.js +3 -0
  44. package/dist/connection/contracts/ITransport.js.map +1 -0
  45. package/dist/connection/transports/HttpTransport.d.ts +14 -0
  46. package/dist/connection/transports/HttpTransport.js +39 -0
  47. package/dist/connection/transports/HttpTransport.js.map +1 -0
  48. package/dist/connection/types/AuthOptions.d.ts +4 -0
  49. package/dist/connection/types/AuthOptions.js +3 -0
  50. package/dist/connection/types/AuthOptions.js.map +1 -0
  51. package/dist/contracts/IHiveClient.d.ts +10 -0
  52. package/dist/contracts/IHiveClient.js +3 -0
  53. package/dist/contracts/IHiveClient.js.map +1 -0
  54. package/dist/contracts/IHiveSession.d.ts +126 -0
  55. package/dist/contracts/IHiveSession.js +3 -0
  56. package/dist/contracts/IHiveSession.js.map +1 -0
  57. package/dist/contracts/IOperation.d.ts +47 -0
  58. package/dist/contracts/IOperation.js +3 -0
  59. package/dist/contracts/IOperation.js.map +1 -0
  60. package/dist/dto/InfoValue.d.ts +9 -0
  61. package/dist/dto/InfoValue.js +31 -0
  62. package/dist/dto/InfoValue.js.map +1 -0
  63. package/dist/dto/Status.d.ts +15 -0
  64. package/dist/dto/Status.js +21 -0
  65. package/dist/dto/Status.js.map +1 -0
  66. package/dist/errors/AuthenticationError.d.ts +3 -0
  67. package/dist/errors/AuthenticationError.js +30 -0
  68. package/dist/errors/AuthenticationError.js.map +1 -0
  69. package/dist/errors/HiveDriverError.d.ts +2 -0
  70. package/dist/errors/HiveDriverError.js +26 -0
  71. package/dist/errors/HiveDriverError.js.map +1 -0
  72. package/dist/errors/OperationStateError.d.ts +6 -0
  73. package/dist/errors/OperationStateError.js +32 -0
  74. package/dist/errors/OperationStateError.js.map +1 -0
  75. package/dist/errors/StatusError.d.ts +8 -0
  76. package/dist/errors/StatusError.js +15 -0
  77. package/dist/errors/StatusError.js.map +1 -0
  78. package/dist/factory/StatusFactory.d.ts +14 -0
  79. package/dist/factory/StatusFactory.js +40 -0
  80. package/dist/factory/StatusFactory.js.map +1 -0
  81. package/dist/hive/Commands/BaseCommand.d.ts +7 -0
  82. package/dist/hive/Commands/BaseCommand.js +36 -0
  83. package/dist/hive/Commands/BaseCommand.js.map +1 -0
  84. package/dist/hive/Commands/CancelDelegationTokenCommand.d.ts +12 -0
  85. package/dist/hive/Commands/CancelDelegationTokenCommand.js +34 -0
  86. package/dist/hive/Commands/CancelDelegationTokenCommand.js.map +1 -0
  87. package/dist/hive/Commands/CancelOperationCommand.d.ts +11 -0
  88. package/dist/hive/Commands/CancelOperationCommand.js +34 -0
  89. package/dist/hive/Commands/CancelOperationCommand.js.map +1 -0
  90. package/dist/hive/Commands/CloseOperationCommand.d.ts +11 -0
  91. package/dist/hive/Commands/CloseOperationCommand.js +34 -0
  92. package/dist/hive/Commands/CloseOperationCommand.js.map +1 -0
  93. package/dist/hive/Commands/CloseSessionCommand.d.ts +11 -0
  94. package/dist/hive/Commands/CloseSessionCommand.js +34 -0
  95. package/dist/hive/Commands/CloseSessionCommand.js.map +1 -0
  96. package/dist/hive/Commands/ExecuteStatementCommand.d.ts +17 -0
  97. package/dist/hive/Commands/ExecuteStatementCommand.js +34 -0
  98. package/dist/hive/Commands/ExecuteStatementCommand.js.map +1 -0
  99. package/dist/hive/Commands/FetchResultsCommand.d.ts +20 -0
  100. package/dist/hive/Commands/FetchResultsCommand.js +34 -0
  101. package/dist/hive/Commands/FetchResultsCommand.js.map +1 -0
  102. package/dist/hive/Commands/GetCatalogsCommand.d.ts +12 -0
  103. package/dist/hive/Commands/GetCatalogsCommand.js +34 -0
  104. package/dist/hive/Commands/GetCatalogsCommand.js.map +1 -0
  105. package/dist/hive/Commands/GetColumnsCommand.d.ts +16 -0
  106. package/dist/hive/Commands/GetColumnsCommand.js +34 -0
  107. package/dist/hive/Commands/GetColumnsCommand.js.map +1 -0
  108. package/dist/hive/Commands/GetCrossReferenceCommand.d.ts +18 -0
  109. package/dist/hive/Commands/GetCrossReferenceCommand.js +34 -0
  110. package/dist/hive/Commands/GetCrossReferenceCommand.js.map +1 -0
  111. package/dist/hive/Commands/GetDelegationTokenCommand.d.ts +14 -0
  112. package/dist/hive/Commands/GetDelegationTokenCommand.js +34 -0
  113. package/dist/hive/Commands/GetDelegationTokenCommand.js.map +1 -0
  114. package/dist/hive/Commands/GetFunctionsCommand.d.ts +15 -0
  115. package/dist/hive/Commands/GetFunctionsCommand.js +34 -0
  116. package/dist/hive/Commands/GetFunctionsCommand.js.map +1 -0
  117. package/dist/hive/Commands/GetInfoCommand.d.ts +16 -0
  118. package/dist/hive/Commands/GetInfoCommand.js +34 -0
  119. package/dist/hive/Commands/GetInfoCommand.js.map +1 -0
  120. package/dist/hive/Commands/GetOperationStatusCommand.d.ts +23 -0
  121. package/dist/hive/Commands/GetOperationStatusCommand.js +34 -0
  122. package/dist/hive/Commands/GetOperationStatusCommand.js.map +1 -0
  123. package/dist/hive/Commands/GetPrimaryKeysCommand.d.ts +15 -0
  124. package/dist/hive/Commands/GetPrimaryKeysCommand.js +34 -0
  125. package/dist/hive/Commands/GetPrimaryKeysCommand.js.map +1 -0
  126. package/dist/hive/Commands/GetQueryIdCommand.d.ts +11 -0
  127. package/dist/hive/Commands/GetQueryIdCommand.js +34 -0
  128. package/dist/hive/Commands/GetQueryIdCommand.js.map +1 -0
  129. package/dist/hive/Commands/GetResultSetMetadataCommand.d.ts +12 -0
  130. package/dist/hive/Commands/GetResultSetMetadataCommand.js +34 -0
  131. package/dist/hive/Commands/GetResultSetMetadataCommand.js.map +1 -0
  132. package/dist/hive/Commands/GetSchemasCommand.d.ts +14 -0
  133. package/dist/hive/Commands/GetSchemasCommand.js +34 -0
  134. package/dist/hive/Commands/GetSchemasCommand.js.map +1 -0
  135. package/dist/hive/Commands/GetTableTypesCommand.d.ts +12 -0
  136. package/dist/hive/Commands/GetTableTypesCommand.js +34 -0
  137. package/dist/hive/Commands/GetTableTypesCommand.js.map +1 -0
  138. package/dist/hive/Commands/GetTablesCommand.d.ts +16 -0
  139. package/dist/hive/Commands/GetTablesCommand.js +34 -0
  140. package/dist/hive/Commands/GetTablesCommand.js.map +1 -0
  141. package/dist/hive/Commands/GetTypeInfoCommand.d.ts +12 -0
  142. package/dist/hive/Commands/GetTypeInfoCommand.js +34 -0
  143. package/dist/hive/Commands/GetTypeInfoCommand.js.map +1 -0
  144. package/dist/hive/Commands/OpenSessionCommand.d.ts +33 -0
  145. package/dist/hive/Commands/OpenSessionCommand.js +34 -0
  146. package/dist/hive/Commands/OpenSessionCommand.js.map +1 -0
  147. package/dist/hive/Commands/RenewDelegationTokenCommand.d.ts +12 -0
  148. package/dist/hive/Commands/RenewDelegationTokenCommand.js +34 -0
  149. package/dist/hive/Commands/RenewDelegationTokenCommand.js.map +1 -0
  150. package/dist/hive/Commands/SetClientInfoCommand.d.ts +12 -0
  151. package/dist/hive/Commands/SetClientInfoCommand.js +34 -0
  152. package/dist/hive/Commands/SetClientInfoCommand.js.map +1 -0
  153. package/dist/hive/HiveDriver.d.ts +52 -0
  154. package/dist/hive/HiveDriver.js +129 -0
  155. package/dist/hive/HiveDriver.js.map +1 -0
  156. package/dist/hive/Types/index.d.ts +229 -0
  157. package/dist/hive/Types/index.js +16 -0
  158. package/dist/hive/Types/index.js.map +1 -0
  159. package/dist/index.d.ts +25 -0
  160. package/dist/index.js +67 -0
  161. package/dist/index.js.map +1 -0
  162. package/dist/result/IOperationResult.d.ts +5 -0
  163. package/dist/result/IOperationResult.js +3 -0
  164. package/dist/result/IOperationResult.js.map +1 -0
  165. package/dist/result/JsonResult.d.ts +20 -0
  166. package/dist/result/JsonResult.js +137 -0
  167. package/dist/result/JsonResult.js.map +1 -0
  168. package/dist/result/NullResult.d.ts +6 -0
  169. package/dist/result/NullResult.js +13 -0
  170. package/dist/result/NullResult.js.map +1 -0
  171. package/dist/utils/GetResult.d.ts +16 -0
  172. package/dist/utils/GetResult.js +38 -0
  173. package/dist/utils/GetResult.js.map +1 -0
  174. package/dist/utils/HiveUtils.d.ts +11 -0
  175. package/dist/utils/HiveUtils.js +39 -0
  176. package/dist/utils/HiveUtils.js.map +1 -0
  177. package/dist/utils/ProgressUpdateTransformer.d.ts +8 -0
  178. package/dist/utils/ProgressUpdateTransformer.js +33 -0
  179. package/dist/utils/ProgressUpdateTransformer.js.map +1 -0
  180. package/dist/utils/WaitUntilReady.d.ts +16 -0
  181. package/dist/utils/WaitUntilReady.js +120 -0
  182. package/dist/utils/WaitUntilReady.js.map +1 -0
  183. package/docs/readme.md +227 -0
  184. package/docs/troubleshooting.md +84 -0
  185. package/examples/data_types.js +173 -0
  186. package/examples/repl +106 -0
  187. package/examples/session.js +55 -0
  188. package/examples/usage.js +18 -0
  189. package/nyc.config.js +8 -0
  190. package/package.json +56 -0
  191. package/tests/e2e/data_types.test.js +353 -0
  192. package/tests/e2e/utils/config.js +20 -0
  193. package/tests/e2e/utils/logger.js +22 -0
  194. package/tests/unit/HiveClient.test.js +153 -0
  195. package/tests/unit/HiveOperation.test.js +340 -0
  196. package/tests/unit/HiveSession.test.js +146 -0
  197. package/tests/unit/connection/auth/PlainHttpAuthentication.test.js +44 -0
  198. package/tests/unit/connection/connections/HttpConnection.test.js +141 -0
  199. package/tests/unit/dto/InfoValue.test.js +50 -0
  200. package/tests/unit/factory/StatusFactory.test.js +62 -0
  201. package/tests/unit/hive/HiveDriver.test.js +115 -0
  202. package/tests/unit/hive/commands/CancelDelegationTokenCommand.test.js +43 -0
  203. package/tests/unit/hive/commands/CancelOperationCommand.test.js +45 -0
  204. package/tests/unit/hive/commands/CloseOperationCommand.test.js +45 -0
  205. package/tests/unit/hive/commands/CloseSessionCommand.test.js +38 -0
  206. package/tests/unit/hive/commands/ExecuteStatementCommand.test.js +54 -0
  207. package/tests/unit/hive/commands/FetchResultsCommand.test.js +59 -0
  208. package/tests/unit/hive/commands/GetCatalogsCommand.test.js +50 -0
  209. package/tests/unit/hive/commands/GetColumnsCommand.test.js +50 -0
  210. package/tests/unit/hive/commands/GetCrossReferenceCommand.test.js +56 -0
  211. package/tests/unit/hive/commands/GetDelegationTokenCommand.test.js +45 -0
  212. package/tests/unit/hive/commands/GetFunctionsCommand.test.js +50 -0
  213. package/tests/unit/hive/commands/GetInfoCommand.test.js +51 -0
  214. package/tests/unit/hive/commands/GetOperationStatusCommand.test.js +63 -0
  215. package/tests/unit/hive/commands/GetPrimaryKeysCommand.test.js +50 -0
  216. package/tests/unit/hive/commands/GetQueryIdCommand.test.js +42 -0
  217. package/tests/unit/hive/commands/GetResultSetMetadataCommand.test.js +54 -0
  218. package/tests/unit/hive/commands/GetSchemasCommand.test.js +52 -0
  219. package/tests/unit/hive/commands/GetTableTypesCommand.test.js +50 -0
  220. package/tests/unit/hive/commands/GetTablesCommand.test.js +54 -0
  221. package/tests/unit/hive/commands/GetTypeInfoCommand.test.js +50 -0
  222. package/tests/unit/hive/commands/OpenSessionCommand.test.js +43 -0
  223. package/tests/unit/hive/commands/RenewDelegationTokenCommand.test.js +43 -0
  224. package/tests/unit/hive/commands/SetClientInfoCommand.test.js +45 -0
  225. package/tests/unit/result/JsonResult.test.js +295 -0
  226. package/tests/unit/utils/GetResult.test.js +30 -0
  227. package/tests/unit/utils/HiveUtils.test.js +60 -0
  228. package/tests/unit/utils/ProgressUpdateTransformer.test.js +28 -0
  229. package/tests/unit/utils/WaitUntilReady.test.js +105 -0
  230. package/thrift/TCLIService.thrift +1299 -0
  231. package/thrift/gen-nodejs/TCLIService.js +4596 -0
  232. package/thrift/gen-nodejs/TCLIService_types.js +6794 -0
  233. package/tsconfig.json +13 -0
@@ -0,0 +1,4596 @@
1
+ //
2
+ // Autogenerated by Thrift Compiler (0.13.0)
3
+ //
4
+ // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ //
6
+ "use strict";
7
+
8
+ var thrift = require('thrift');
9
+ var Thrift = thrift.Thrift;
10
+ var Q = thrift.Q;
11
+ var Int64 = require('node-int64');
12
+
13
+
14
+ var ttypes = require('./TCLIService_types');
15
+ //HELPER FUNCTIONS AND STRUCTURES
16
+
17
+ var TCLIService_OpenSession_args = function(args) {
18
+ this.req = null;
19
+ if (args) {
20
+ if (args.req !== undefined && args.req !== null) {
21
+ this.req = new ttypes.TOpenSessionReq(args.req);
22
+ }
23
+ }
24
+ };
25
+ TCLIService_OpenSession_args.prototype = {};
26
+ TCLIService_OpenSession_args.prototype.read = function(input) {
27
+ input.readStructBegin();
28
+ while (true) {
29
+ var ret = input.readFieldBegin();
30
+ var ftype = ret.ftype;
31
+ var fid = ret.fid;
32
+ if (ftype == Thrift.Type.STOP) {
33
+ break;
34
+ }
35
+ switch (fid) {
36
+ case 1:
37
+ if (ftype == Thrift.Type.STRUCT) {
38
+ this.req = new ttypes.TOpenSessionReq();
39
+ this.req.read(input);
40
+ } else {
41
+ input.skip(ftype);
42
+ }
43
+ break;
44
+ case 0:
45
+ input.skip(ftype);
46
+ break;
47
+ default:
48
+ input.skip(ftype);
49
+ }
50
+ input.readFieldEnd();
51
+ }
52
+ input.readStructEnd();
53
+ return;
54
+ };
55
+
56
+ TCLIService_OpenSession_args.prototype.write = function(output) {
57
+ output.writeStructBegin('TCLIService_OpenSession_args');
58
+ if (this.req !== null && this.req !== undefined) {
59
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
60
+ this.req.write(output);
61
+ output.writeFieldEnd();
62
+ }
63
+ output.writeFieldStop();
64
+ output.writeStructEnd();
65
+ return;
66
+ };
67
+
68
+ var TCLIService_OpenSession_result = function(args) {
69
+ this.success = null;
70
+ if (args) {
71
+ if (args.success !== undefined && args.success !== null) {
72
+ this.success = new ttypes.TOpenSessionResp(args.success);
73
+ }
74
+ }
75
+ };
76
+ TCLIService_OpenSession_result.prototype = {};
77
+ TCLIService_OpenSession_result.prototype.read = function(input) {
78
+ input.readStructBegin();
79
+ while (true) {
80
+ var ret = input.readFieldBegin();
81
+ var ftype = ret.ftype;
82
+ var fid = ret.fid;
83
+ if (ftype == Thrift.Type.STOP) {
84
+ break;
85
+ }
86
+ switch (fid) {
87
+ case 0:
88
+ if (ftype == Thrift.Type.STRUCT) {
89
+ this.success = new ttypes.TOpenSessionResp();
90
+ this.success.read(input);
91
+ } else {
92
+ input.skip(ftype);
93
+ }
94
+ break;
95
+ case 0:
96
+ input.skip(ftype);
97
+ break;
98
+ default:
99
+ input.skip(ftype);
100
+ }
101
+ input.readFieldEnd();
102
+ }
103
+ input.readStructEnd();
104
+ return;
105
+ };
106
+
107
+ TCLIService_OpenSession_result.prototype.write = function(output) {
108
+ output.writeStructBegin('TCLIService_OpenSession_result');
109
+ if (this.success !== null && this.success !== undefined) {
110
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
111
+ this.success.write(output);
112
+ output.writeFieldEnd();
113
+ }
114
+ output.writeFieldStop();
115
+ output.writeStructEnd();
116
+ return;
117
+ };
118
+
119
+ var TCLIService_CloseSession_args = function(args) {
120
+ this.req = null;
121
+ if (args) {
122
+ if (args.req !== undefined && args.req !== null) {
123
+ this.req = new ttypes.TCloseSessionReq(args.req);
124
+ }
125
+ }
126
+ };
127
+ TCLIService_CloseSession_args.prototype = {};
128
+ TCLIService_CloseSession_args.prototype.read = function(input) {
129
+ input.readStructBegin();
130
+ while (true) {
131
+ var ret = input.readFieldBegin();
132
+ var ftype = ret.ftype;
133
+ var fid = ret.fid;
134
+ if (ftype == Thrift.Type.STOP) {
135
+ break;
136
+ }
137
+ switch (fid) {
138
+ case 1:
139
+ if (ftype == Thrift.Type.STRUCT) {
140
+ this.req = new ttypes.TCloseSessionReq();
141
+ this.req.read(input);
142
+ } else {
143
+ input.skip(ftype);
144
+ }
145
+ break;
146
+ case 0:
147
+ input.skip(ftype);
148
+ break;
149
+ default:
150
+ input.skip(ftype);
151
+ }
152
+ input.readFieldEnd();
153
+ }
154
+ input.readStructEnd();
155
+ return;
156
+ };
157
+
158
+ TCLIService_CloseSession_args.prototype.write = function(output) {
159
+ output.writeStructBegin('TCLIService_CloseSession_args');
160
+ if (this.req !== null && this.req !== undefined) {
161
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
162
+ this.req.write(output);
163
+ output.writeFieldEnd();
164
+ }
165
+ output.writeFieldStop();
166
+ output.writeStructEnd();
167
+ return;
168
+ };
169
+
170
+ var TCLIService_CloseSession_result = function(args) {
171
+ this.success = null;
172
+ if (args) {
173
+ if (args.success !== undefined && args.success !== null) {
174
+ this.success = new ttypes.TCloseSessionResp(args.success);
175
+ }
176
+ }
177
+ };
178
+ TCLIService_CloseSession_result.prototype = {};
179
+ TCLIService_CloseSession_result.prototype.read = function(input) {
180
+ input.readStructBegin();
181
+ while (true) {
182
+ var ret = input.readFieldBegin();
183
+ var ftype = ret.ftype;
184
+ var fid = ret.fid;
185
+ if (ftype == Thrift.Type.STOP) {
186
+ break;
187
+ }
188
+ switch (fid) {
189
+ case 0:
190
+ if (ftype == Thrift.Type.STRUCT) {
191
+ this.success = new ttypes.TCloseSessionResp();
192
+ this.success.read(input);
193
+ } else {
194
+ input.skip(ftype);
195
+ }
196
+ break;
197
+ case 0:
198
+ input.skip(ftype);
199
+ break;
200
+ default:
201
+ input.skip(ftype);
202
+ }
203
+ input.readFieldEnd();
204
+ }
205
+ input.readStructEnd();
206
+ return;
207
+ };
208
+
209
+ TCLIService_CloseSession_result.prototype.write = function(output) {
210
+ output.writeStructBegin('TCLIService_CloseSession_result');
211
+ if (this.success !== null && this.success !== undefined) {
212
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
213
+ this.success.write(output);
214
+ output.writeFieldEnd();
215
+ }
216
+ output.writeFieldStop();
217
+ output.writeStructEnd();
218
+ return;
219
+ };
220
+
221
+ var TCLIService_GetInfo_args = function(args) {
222
+ this.req = null;
223
+ if (args) {
224
+ if (args.req !== undefined && args.req !== null) {
225
+ this.req = new ttypes.TGetInfoReq(args.req);
226
+ }
227
+ }
228
+ };
229
+ TCLIService_GetInfo_args.prototype = {};
230
+ TCLIService_GetInfo_args.prototype.read = function(input) {
231
+ input.readStructBegin();
232
+ while (true) {
233
+ var ret = input.readFieldBegin();
234
+ var ftype = ret.ftype;
235
+ var fid = ret.fid;
236
+ if (ftype == Thrift.Type.STOP) {
237
+ break;
238
+ }
239
+ switch (fid) {
240
+ case 1:
241
+ if (ftype == Thrift.Type.STRUCT) {
242
+ this.req = new ttypes.TGetInfoReq();
243
+ this.req.read(input);
244
+ } else {
245
+ input.skip(ftype);
246
+ }
247
+ break;
248
+ case 0:
249
+ input.skip(ftype);
250
+ break;
251
+ default:
252
+ input.skip(ftype);
253
+ }
254
+ input.readFieldEnd();
255
+ }
256
+ input.readStructEnd();
257
+ return;
258
+ };
259
+
260
+ TCLIService_GetInfo_args.prototype.write = function(output) {
261
+ output.writeStructBegin('TCLIService_GetInfo_args');
262
+ if (this.req !== null && this.req !== undefined) {
263
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
264
+ this.req.write(output);
265
+ output.writeFieldEnd();
266
+ }
267
+ output.writeFieldStop();
268
+ output.writeStructEnd();
269
+ return;
270
+ };
271
+
272
+ var TCLIService_GetInfo_result = function(args) {
273
+ this.success = null;
274
+ if (args) {
275
+ if (args.success !== undefined && args.success !== null) {
276
+ this.success = new ttypes.TGetInfoResp(args.success);
277
+ }
278
+ }
279
+ };
280
+ TCLIService_GetInfo_result.prototype = {};
281
+ TCLIService_GetInfo_result.prototype.read = function(input) {
282
+ input.readStructBegin();
283
+ while (true) {
284
+ var ret = input.readFieldBegin();
285
+ var ftype = ret.ftype;
286
+ var fid = ret.fid;
287
+ if (ftype == Thrift.Type.STOP) {
288
+ break;
289
+ }
290
+ switch (fid) {
291
+ case 0:
292
+ if (ftype == Thrift.Type.STRUCT) {
293
+ this.success = new ttypes.TGetInfoResp();
294
+ this.success.read(input);
295
+ } else {
296
+ input.skip(ftype);
297
+ }
298
+ break;
299
+ case 0:
300
+ input.skip(ftype);
301
+ break;
302
+ default:
303
+ input.skip(ftype);
304
+ }
305
+ input.readFieldEnd();
306
+ }
307
+ input.readStructEnd();
308
+ return;
309
+ };
310
+
311
+ TCLIService_GetInfo_result.prototype.write = function(output) {
312
+ output.writeStructBegin('TCLIService_GetInfo_result');
313
+ if (this.success !== null && this.success !== undefined) {
314
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
315
+ this.success.write(output);
316
+ output.writeFieldEnd();
317
+ }
318
+ output.writeFieldStop();
319
+ output.writeStructEnd();
320
+ return;
321
+ };
322
+
323
+ var TCLIService_ExecuteStatement_args = function(args) {
324
+ this.req = null;
325
+ if (args) {
326
+ if (args.req !== undefined && args.req !== null) {
327
+ this.req = new ttypes.TExecuteStatementReq(args.req);
328
+ }
329
+ }
330
+ };
331
+ TCLIService_ExecuteStatement_args.prototype = {};
332
+ TCLIService_ExecuteStatement_args.prototype.read = function(input) {
333
+ input.readStructBegin();
334
+ while (true) {
335
+ var ret = input.readFieldBegin();
336
+ var ftype = ret.ftype;
337
+ var fid = ret.fid;
338
+ if (ftype == Thrift.Type.STOP) {
339
+ break;
340
+ }
341
+ switch (fid) {
342
+ case 1:
343
+ if (ftype == Thrift.Type.STRUCT) {
344
+ this.req = new ttypes.TExecuteStatementReq();
345
+ this.req.read(input);
346
+ } else {
347
+ input.skip(ftype);
348
+ }
349
+ break;
350
+ case 0:
351
+ input.skip(ftype);
352
+ break;
353
+ default:
354
+ input.skip(ftype);
355
+ }
356
+ input.readFieldEnd();
357
+ }
358
+ input.readStructEnd();
359
+ return;
360
+ };
361
+
362
+ TCLIService_ExecuteStatement_args.prototype.write = function(output) {
363
+ output.writeStructBegin('TCLIService_ExecuteStatement_args');
364
+ if (this.req !== null && this.req !== undefined) {
365
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
366
+ this.req.write(output);
367
+ output.writeFieldEnd();
368
+ }
369
+ output.writeFieldStop();
370
+ output.writeStructEnd();
371
+ return;
372
+ };
373
+
374
+ var TCLIService_ExecuteStatement_result = function(args) {
375
+ this.success = null;
376
+ if (args) {
377
+ if (args.success !== undefined && args.success !== null) {
378
+ this.success = new ttypes.TExecuteStatementResp(args.success);
379
+ }
380
+ }
381
+ };
382
+ TCLIService_ExecuteStatement_result.prototype = {};
383
+ TCLIService_ExecuteStatement_result.prototype.read = function(input) {
384
+ input.readStructBegin();
385
+ while (true) {
386
+ var ret = input.readFieldBegin();
387
+ var ftype = ret.ftype;
388
+ var fid = ret.fid;
389
+ if (ftype == Thrift.Type.STOP) {
390
+ break;
391
+ }
392
+ switch (fid) {
393
+ case 0:
394
+ if (ftype == Thrift.Type.STRUCT) {
395
+ this.success = new ttypes.TExecuteStatementResp();
396
+ this.success.read(input);
397
+ } else {
398
+ input.skip(ftype);
399
+ }
400
+ break;
401
+ case 0:
402
+ input.skip(ftype);
403
+ break;
404
+ default:
405
+ input.skip(ftype);
406
+ }
407
+ input.readFieldEnd();
408
+ }
409
+ input.readStructEnd();
410
+ return;
411
+ };
412
+
413
+ TCLIService_ExecuteStatement_result.prototype.write = function(output) {
414
+ output.writeStructBegin('TCLIService_ExecuteStatement_result');
415
+ if (this.success !== null && this.success !== undefined) {
416
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
417
+ this.success.write(output);
418
+ output.writeFieldEnd();
419
+ }
420
+ output.writeFieldStop();
421
+ output.writeStructEnd();
422
+ return;
423
+ };
424
+
425
+ var TCLIService_GetTypeInfo_args = function(args) {
426
+ this.req = null;
427
+ if (args) {
428
+ if (args.req !== undefined && args.req !== null) {
429
+ this.req = new ttypes.TGetTypeInfoReq(args.req);
430
+ }
431
+ }
432
+ };
433
+ TCLIService_GetTypeInfo_args.prototype = {};
434
+ TCLIService_GetTypeInfo_args.prototype.read = function(input) {
435
+ input.readStructBegin();
436
+ while (true) {
437
+ var ret = input.readFieldBegin();
438
+ var ftype = ret.ftype;
439
+ var fid = ret.fid;
440
+ if (ftype == Thrift.Type.STOP) {
441
+ break;
442
+ }
443
+ switch (fid) {
444
+ case 1:
445
+ if (ftype == Thrift.Type.STRUCT) {
446
+ this.req = new ttypes.TGetTypeInfoReq();
447
+ this.req.read(input);
448
+ } else {
449
+ input.skip(ftype);
450
+ }
451
+ break;
452
+ case 0:
453
+ input.skip(ftype);
454
+ break;
455
+ default:
456
+ input.skip(ftype);
457
+ }
458
+ input.readFieldEnd();
459
+ }
460
+ input.readStructEnd();
461
+ return;
462
+ };
463
+
464
+ TCLIService_GetTypeInfo_args.prototype.write = function(output) {
465
+ output.writeStructBegin('TCLIService_GetTypeInfo_args');
466
+ if (this.req !== null && this.req !== undefined) {
467
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
468
+ this.req.write(output);
469
+ output.writeFieldEnd();
470
+ }
471
+ output.writeFieldStop();
472
+ output.writeStructEnd();
473
+ return;
474
+ };
475
+
476
+ var TCLIService_GetTypeInfo_result = function(args) {
477
+ this.success = null;
478
+ if (args) {
479
+ if (args.success !== undefined && args.success !== null) {
480
+ this.success = new ttypes.TGetTypeInfoResp(args.success);
481
+ }
482
+ }
483
+ };
484
+ TCLIService_GetTypeInfo_result.prototype = {};
485
+ TCLIService_GetTypeInfo_result.prototype.read = function(input) {
486
+ input.readStructBegin();
487
+ while (true) {
488
+ var ret = input.readFieldBegin();
489
+ var ftype = ret.ftype;
490
+ var fid = ret.fid;
491
+ if (ftype == Thrift.Type.STOP) {
492
+ break;
493
+ }
494
+ switch (fid) {
495
+ case 0:
496
+ if (ftype == Thrift.Type.STRUCT) {
497
+ this.success = new ttypes.TGetTypeInfoResp();
498
+ this.success.read(input);
499
+ } else {
500
+ input.skip(ftype);
501
+ }
502
+ break;
503
+ case 0:
504
+ input.skip(ftype);
505
+ break;
506
+ default:
507
+ input.skip(ftype);
508
+ }
509
+ input.readFieldEnd();
510
+ }
511
+ input.readStructEnd();
512
+ return;
513
+ };
514
+
515
+ TCLIService_GetTypeInfo_result.prototype.write = function(output) {
516
+ output.writeStructBegin('TCLIService_GetTypeInfo_result');
517
+ if (this.success !== null && this.success !== undefined) {
518
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
519
+ this.success.write(output);
520
+ output.writeFieldEnd();
521
+ }
522
+ output.writeFieldStop();
523
+ output.writeStructEnd();
524
+ return;
525
+ };
526
+
527
+ var TCLIService_GetCatalogs_args = function(args) {
528
+ this.req = null;
529
+ if (args) {
530
+ if (args.req !== undefined && args.req !== null) {
531
+ this.req = new ttypes.TGetCatalogsReq(args.req);
532
+ }
533
+ }
534
+ };
535
+ TCLIService_GetCatalogs_args.prototype = {};
536
+ TCLIService_GetCatalogs_args.prototype.read = function(input) {
537
+ input.readStructBegin();
538
+ while (true) {
539
+ var ret = input.readFieldBegin();
540
+ var ftype = ret.ftype;
541
+ var fid = ret.fid;
542
+ if (ftype == Thrift.Type.STOP) {
543
+ break;
544
+ }
545
+ switch (fid) {
546
+ case 1:
547
+ if (ftype == Thrift.Type.STRUCT) {
548
+ this.req = new ttypes.TGetCatalogsReq();
549
+ this.req.read(input);
550
+ } else {
551
+ input.skip(ftype);
552
+ }
553
+ break;
554
+ case 0:
555
+ input.skip(ftype);
556
+ break;
557
+ default:
558
+ input.skip(ftype);
559
+ }
560
+ input.readFieldEnd();
561
+ }
562
+ input.readStructEnd();
563
+ return;
564
+ };
565
+
566
+ TCLIService_GetCatalogs_args.prototype.write = function(output) {
567
+ output.writeStructBegin('TCLIService_GetCatalogs_args');
568
+ if (this.req !== null && this.req !== undefined) {
569
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
570
+ this.req.write(output);
571
+ output.writeFieldEnd();
572
+ }
573
+ output.writeFieldStop();
574
+ output.writeStructEnd();
575
+ return;
576
+ };
577
+
578
+ var TCLIService_GetCatalogs_result = function(args) {
579
+ this.success = null;
580
+ if (args) {
581
+ if (args.success !== undefined && args.success !== null) {
582
+ this.success = new ttypes.TGetCatalogsResp(args.success);
583
+ }
584
+ }
585
+ };
586
+ TCLIService_GetCatalogs_result.prototype = {};
587
+ TCLIService_GetCatalogs_result.prototype.read = function(input) {
588
+ input.readStructBegin();
589
+ while (true) {
590
+ var ret = input.readFieldBegin();
591
+ var ftype = ret.ftype;
592
+ var fid = ret.fid;
593
+ if (ftype == Thrift.Type.STOP) {
594
+ break;
595
+ }
596
+ switch (fid) {
597
+ case 0:
598
+ if (ftype == Thrift.Type.STRUCT) {
599
+ this.success = new ttypes.TGetCatalogsResp();
600
+ this.success.read(input);
601
+ } else {
602
+ input.skip(ftype);
603
+ }
604
+ break;
605
+ case 0:
606
+ input.skip(ftype);
607
+ break;
608
+ default:
609
+ input.skip(ftype);
610
+ }
611
+ input.readFieldEnd();
612
+ }
613
+ input.readStructEnd();
614
+ return;
615
+ };
616
+
617
+ TCLIService_GetCatalogs_result.prototype.write = function(output) {
618
+ output.writeStructBegin('TCLIService_GetCatalogs_result');
619
+ if (this.success !== null && this.success !== undefined) {
620
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
621
+ this.success.write(output);
622
+ output.writeFieldEnd();
623
+ }
624
+ output.writeFieldStop();
625
+ output.writeStructEnd();
626
+ return;
627
+ };
628
+
629
+ var TCLIService_GetSchemas_args = function(args) {
630
+ this.req = null;
631
+ if (args) {
632
+ if (args.req !== undefined && args.req !== null) {
633
+ this.req = new ttypes.TGetSchemasReq(args.req);
634
+ }
635
+ }
636
+ };
637
+ TCLIService_GetSchemas_args.prototype = {};
638
+ TCLIService_GetSchemas_args.prototype.read = function(input) {
639
+ input.readStructBegin();
640
+ while (true) {
641
+ var ret = input.readFieldBegin();
642
+ var ftype = ret.ftype;
643
+ var fid = ret.fid;
644
+ if (ftype == Thrift.Type.STOP) {
645
+ break;
646
+ }
647
+ switch (fid) {
648
+ case 1:
649
+ if (ftype == Thrift.Type.STRUCT) {
650
+ this.req = new ttypes.TGetSchemasReq();
651
+ this.req.read(input);
652
+ } else {
653
+ input.skip(ftype);
654
+ }
655
+ break;
656
+ case 0:
657
+ input.skip(ftype);
658
+ break;
659
+ default:
660
+ input.skip(ftype);
661
+ }
662
+ input.readFieldEnd();
663
+ }
664
+ input.readStructEnd();
665
+ return;
666
+ };
667
+
668
+ TCLIService_GetSchemas_args.prototype.write = function(output) {
669
+ output.writeStructBegin('TCLIService_GetSchemas_args');
670
+ if (this.req !== null && this.req !== undefined) {
671
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
672
+ this.req.write(output);
673
+ output.writeFieldEnd();
674
+ }
675
+ output.writeFieldStop();
676
+ output.writeStructEnd();
677
+ return;
678
+ };
679
+
680
+ var TCLIService_GetSchemas_result = function(args) {
681
+ this.success = null;
682
+ if (args) {
683
+ if (args.success !== undefined && args.success !== null) {
684
+ this.success = new ttypes.TGetSchemasResp(args.success);
685
+ }
686
+ }
687
+ };
688
+ TCLIService_GetSchemas_result.prototype = {};
689
+ TCLIService_GetSchemas_result.prototype.read = function(input) {
690
+ input.readStructBegin();
691
+ while (true) {
692
+ var ret = input.readFieldBegin();
693
+ var ftype = ret.ftype;
694
+ var fid = ret.fid;
695
+ if (ftype == Thrift.Type.STOP) {
696
+ break;
697
+ }
698
+ switch (fid) {
699
+ case 0:
700
+ if (ftype == Thrift.Type.STRUCT) {
701
+ this.success = new ttypes.TGetSchemasResp();
702
+ this.success.read(input);
703
+ } else {
704
+ input.skip(ftype);
705
+ }
706
+ break;
707
+ case 0:
708
+ input.skip(ftype);
709
+ break;
710
+ default:
711
+ input.skip(ftype);
712
+ }
713
+ input.readFieldEnd();
714
+ }
715
+ input.readStructEnd();
716
+ return;
717
+ };
718
+
719
+ TCLIService_GetSchemas_result.prototype.write = function(output) {
720
+ output.writeStructBegin('TCLIService_GetSchemas_result');
721
+ if (this.success !== null && this.success !== undefined) {
722
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
723
+ this.success.write(output);
724
+ output.writeFieldEnd();
725
+ }
726
+ output.writeFieldStop();
727
+ output.writeStructEnd();
728
+ return;
729
+ };
730
+
731
+ var TCLIService_GetTables_args = function(args) {
732
+ this.req = null;
733
+ if (args) {
734
+ if (args.req !== undefined && args.req !== null) {
735
+ this.req = new ttypes.TGetTablesReq(args.req);
736
+ }
737
+ }
738
+ };
739
+ TCLIService_GetTables_args.prototype = {};
740
+ TCLIService_GetTables_args.prototype.read = function(input) {
741
+ input.readStructBegin();
742
+ while (true) {
743
+ var ret = input.readFieldBegin();
744
+ var ftype = ret.ftype;
745
+ var fid = ret.fid;
746
+ if (ftype == Thrift.Type.STOP) {
747
+ break;
748
+ }
749
+ switch (fid) {
750
+ case 1:
751
+ if (ftype == Thrift.Type.STRUCT) {
752
+ this.req = new ttypes.TGetTablesReq();
753
+ this.req.read(input);
754
+ } else {
755
+ input.skip(ftype);
756
+ }
757
+ break;
758
+ case 0:
759
+ input.skip(ftype);
760
+ break;
761
+ default:
762
+ input.skip(ftype);
763
+ }
764
+ input.readFieldEnd();
765
+ }
766
+ input.readStructEnd();
767
+ return;
768
+ };
769
+
770
+ TCLIService_GetTables_args.prototype.write = function(output) {
771
+ output.writeStructBegin('TCLIService_GetTables_args');
772
+ if (this.req !== null && this.req !== undefined) {
773
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
774
+ this.req.write(output);
775
+ output.writeFieldEnd();
776
+ }
777
+ output.writeFieldStop();
778
+ output.writeStructEnd();
779
+ return;
780
+ };
781
+
782
+ var TCLIService_GetTables_result = function(args) {
783
+ this.success = null;
784
+ if (args) {
785
+ if (args.success !== undefined && args.success !== null) {
786
+ this.success = new ttypes.TGetTablesResp(args.success);
787
+ }
788
+ }
789
+ };
790
+ TCLIService_GetTables_result.prototype = {};
791
+ TCLIService_GetTables_result.prototype.read = function(input) {
792
+ input.readStructBegin();
793
+ while (true) {
794
+ var ret = input.readFieldBegin();
795
+ var ftype = ret.ftype;
796
+ var fid = ret.fid;
797
+ if (ftype == Thrift.Type.STOP) {
798
+ break;
799
+ }
800
+ switch (fid) {
801
+ case 0:
802
+ if (ftype == Thrift.Type.STRUCT) {
803
+ this.success = new ttypes.TGetTablesResp();
804
+ this.success.read(input);
805
+ } else {
806
+ input.skip(ftype);
807
+ }
808
+ break;
809
+ case 0:
810
+ input.skip(ftype);
811
+ break;
812
+ default:
813
+ input.skip(ftype);
814
+ }
815
+ input.readFieldEnd();
816
+ }
817
+ input.readStructEnd();
818
+ return;
819
+ };
820
+
821
+ TCLIService_GetTables_result.prototype.write = function(output) {
822
+ output.writeStructBegin('TCLIService_GetTables_result');
823
+ if (this.success !== null && this.success !== undefined) {
824
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
825
+ this.success.write(output);
826
+ output.writeFieldEnd();
827
+ }
828
+ output.writeFieldStop();
829
+ output.writeStructEnd();
830
+ return;
831
+ };
832
+
833
+ var TCLIService_GetTableTypes_args = function(args) {
834
+ this.req = null;
835
+ if (args) {
836
+ if (args.req !== undefined && args.req !== null) {
837
+ this.req = new ttypes.TGetTableTypesReq(args.req);
838
+ }
839
+ }
840
+ };
841
+ TCLIService_GetTableTypes_args.prototype = {};
842
+ TCLIService_GetTableTypes_args.prototype.read = function(input) {
843
+ input.readStructBegin();
844
+ while (true) {
845
+ var ret = input.readFieldBegin();
846
+ var ftype = ret.ftype;
847
+ var fid = ret.fid;
848
+ if (ftype == Thrift.Type.STOP) {
849
+ break;
850
+ }
851
+ switch (fid) {
852
+ case 1:
853
+ if (ftype == Thrift.Type.STRUCT) {
854
+ this.req = new ttypes.TGetTableTypesReq();
855
+ this.req.read(input);
856
+ } else {
857
+ input.skip(ftype);
858
+ }
859
+ break;
860
+ case 0:
861
+ input.skip(ftype);
862
+ break;
863
+ default:
864
+ input.skip(ftype);
865
+ }
866
+ input.readFieldEnd();
867
+ }
868
+ input.readStructEnd();
869
+ return;
870
+ };
871
+
872
+ TCLIService_GetTableTypes_args.prototype.write = function(output) {
873
+ output.writeStructBegin('TCLIService_GetTableTypes_args');
874
+ if (this.req !== null && this.req !== undefined) {
875
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
876
+ this.req.write(output);
877
+ output.writeFieldEnd();
878
+ }
879
+ output.writeFieldStop();
880
+ output.writeStructEnd();
881
+ return;
882
+ };
883
+
884
+ var TCLIService_GetTableTypes_result = function(args) {
885
+ this.success = null;
886
+ if (args) {
887
+ if (args.success !== undefined && args.success !== null) {
888
+ this.success = new ttypes.TGetTableTypesResp(args.success);
889
+ }
890
+ }
891
+ };
892
+ TCLIService_GetTableTypes_result.prototype = {};
893
+ TCLIService_GetTableTypes_result.prototype.read = function(input) {
894
+ input.readStructBegin();
895
+ while (true) {
896
+ var ret = input.readFieldBegin();
897
+ var ftype = ret.ftype;
898
+ var fid = ret.fid;
899
+ if (ftype == Thrift.Type.STOP) {
900
+ break;
901
+ }
902
+ switch (fid) {
903
+ case 0:
904
+ if (ftype == Thrift.Type.STRUCT) {
905
+ this.success = new ttypes.TGetTableTypesResp();
906
+ this.success.read(input);
907
+ } else {
908
+ input.skip(ftype);
909
+ }
910
+ break;
911
+ case 0:
912
+ input.skip(ftype);
913
+ break;
914
+ default:
915
+ input.skip(ftype);
916
+ }
917
+ input.readFieldEnd();
918
+ }
919
+ input.readStructEnd();
920
+ return;
921
+ };
922
+
923
+ TCLIService_GetTableTypes_result.prototype.write = function(output) {
924
+ output.writeStructBegin('TCLIService_GetTableTypes_result');
925
+ if (this.success !== null && this.success !== undefined) {
926
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
927
+ this.success.write(output);
928
+ output.writeFieldEnd();
929
+ }
930
+ output.writeFieldStop();
931
+ output.writeStructEnd();
932
+ return;
933
+ };
934
+
935
+ var TCLIService_GetColumns_args = function(args) {
936
+ this.req = null;
937
+ if (args) {
938
+ if (args.req !== undefined && args.req !== null) {
939
+ this.req = new ttypes.TGetColumnsReq(args.req);
940
+ }
941
+ }
942
+ };
943
+ TCLIService_GetColumns_args.prototype = {};
944
+ TCLIService_GetColumns_args.prototype.read = function(input) {
945
+ input.readStructBegin();
946
+ while (true) {
947
+ var ret = input.readFieldBegin();
948
+ var ftype = ret.ftype;
949
+ var fid = ret.fid;
950
+ if (ftype == Thrift.Type.STOP) {
951
+ break;
952
+ }
953
+ switch (fid) {
954
+ case 1:
955
+ if (ftype == Thrift.Type.STRUCT) {
956
+ this.req = new ttypes.TGetColumnsReq();
957
+ this.req.read(input);
958
+ } else {
959
+ input.skip(ftype);
960
+ }
961
+ break;
962
+ case 0:
963
+ input.skip(ftype);
964
+ break;
965
+ default:
966
+ input.skip(ftype);
967
+ }
968
+ input.readFieldEnd();
969
+ }
970
+ input.readStructEnd();
971
+ return;
972
+ };
973
+
974
+ TCLIService_GetColumns_args.prototype.write = function(output) {
975
+ output.writeStructBegin('TCLIService_GetColumns_args');
976
+ if (this.req !== null && this.req !== undefined) {
977
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
978
+ this.req.write(output);
979
+ output.writeFieldEnd();
980
+ }
981
+ output.writeFieldStop();
982
+ output.writeStructEnd();
983
+ return;
984
+ };
985
+
986
+ var TCLIService_GetColumns_result = function(args) {
987
+ this.success = null;
988
+ if (args) {
989
+ if (args.success !== undefined && args.success !== null) {
990
+ this.success = new ttypes.TGetColumnsResp(args.success);
991
+ }
992
+ }
993
+ };
994
+ TCLIService_GetColumns_result.prototype = {};
995
+ TCLIService_GetColumns_result.prototype.read = function(input) {
996
+ input.readStructBegin();
997
+ while (true) {
998
+ var ret = input.readFieldBegin();
999
+ var ftype = ret.ftype;
1000
+ var fid = ret.fid;
1001
+ if (ftype == Thrift.Type.STOP) {
1002
+ break;
1003
+ }
1004
+ switch (fid) {
1005
+ case 0:
1006
+ if (ftype == Thrift.Type.STRUCT) {
1007
+ this.success = new ttypes.TGetColumnsResp();
1008
+ this.success.read(input);
1009
+ } else {
1010
+ input.skip(ftype);
1011
+ }
1012
+ break;
1013
+ case 0:
1014
+ input.skip(ftype);
1015
+ break;
1016
+ default:
1017
+ input.skip(ftype);
1018
+ }
1019
+ input.readFieldEnd();
1020
+ }
1021
+ input.readStructEnd();
1022
+ return;
1023
+ };
1024
+
1025
+ TCLIService_GetColumns_result.prototype.write = function(output) {
1026
+ output.writeStructBegin('TCLIService_GetColumns_result');
1027
+ if (this.success !== null && this.success !== undefined) {
1028
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
1029
+ this.success.write(output);
1030
+ output.writeFieldEnd();
1031
+ }
1032
+ output.writeFieldStop();
1033
+ output.writeStructEnd();
1034
+ return;
1035
+ };
1036
+
1037
+ var TCLIService_GetFunctions_args = function(args) {
1038
+ this.req = null;
1039
+ if (args) {
1040
+ if (args.req !== undefined && args.req !== null) {
1041
+ this.req = new ttypes.TGetFunctionsReq(args.req);
1042
+ }
1043
+ }
1044
+ };
1045
+ TCLIService_GetFunctions_args.prototype = {};
1046
+ TCLIService_GetFunctions_args.prototype.read = function(input) {
1047
+ input.readStructBegin();
1048
+ while (true) {
1049
+ var ret = input.readFieldBegin();
1050
+ var ftype = ret.ftype;
1051
+ var fid = ret.fid;
1052
+ if (ftype == Thrift.Type.STOP) {
1053
+ break;
1054
+ }
1055
+ switch (fid) {
1056
+ case 1:
1057
+ if (ftype == Thrift.Type.STRUCT) {
1058
+ this.req = new ttypes.TGetFunctionsReq();
1059
+ this.req.read(input);
1060
+ } else {
1061
+ input.skip(ftype);
1062
+ }
1063
+ break;
1064
+ case 0:
1065
+ input.skip(ftype);
1066
+ break;
1067
+ default:
1068
+ input.skip(ftype);
1069
+ }
1070
+ input.readFieldEnd();
1071
+ }
1072
+ input.readStructEnd();
1073
+ return;
1074
+ };
1075
+
1076
+ TCLIService_GetFunctions_args.prototype.write = function(output) {
1077
+ output.writeStructBegin('TCLIService_GetFunctions_args');
1078
+ if (this.req !== null && this.req !== undefined) {
1079
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
1080
+ this.req.write(output);
1081
+ output.writeFieldEnd();
1082
+ }
1083
+ output.writeFieldStop();
1084
+ output.writeStructEnd();
1085
+ return;
1086
+ };
1087
+
1088
+ var TCLIService_GetFunctions_result = function(args) {
1089
+ this.success = null;
1090
+ if (args) {
1091
+ if (args.success !== undefined && args.success !== null) {
1092
+ this.success = new ttypes.TGetFunctionsResp(args.success);
1093
+ }
1094
+ }
1095
+ };
1096
+ TCLIService_GetFunctions_result.prototype = {};
1097
+ TCLIService_GetFunctions_result.prototype.read = function(input) {
1098
+ input.readStructBegin();
1099
+ while (true) {
1100
+ var ret = input.readFieldBegin();
1101
+ var ftype = ret.ftype;
1102
+ var fid = ret.fid;
1103
+ if (ftype == Thrift.Type.STOP) {
1104
+ break;
1105
+ }
1106
+ switch (fid) {
1107
+ case 0:
1108
+ if (ftype == Thrift.Type.STRUCT) {
1109
+ this.success = new ttypes.TGetFunctionsResp();
1110
+ this.success.read(input);
1111
+ } else {
1112
+ input.skip(ftype);
1113
+ }
1114
+ break;
1115
+ case 0:
1116
+ input.skip(ftype);
1117
+ break;
1118
+ default:
1119
+ input.skip(ftype);
1120
+ }
1121
+ input.readFieldEnd();
1122
+ }
1123
+ input.readStructEnd();
1124
+ return;
1125
+ };
1126
+
1127
+ TCLIService_GetFunctions_result.prototype.write = function(output) {
1128
+ output.writeStructBegin('TCLIService_GetFunctions_result');
1129
+ if (this.success !== null && this.success !== undefined) {
1130
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
1131
+ this.success.write(output);
1132
+ output.writeFieldEnd();
1133
+ }
1134
+ output.writeFieldStop();
1135
+ output.writeStructEnd();
1136
+ return;
1137
+ };
1138
+
1139
+ var TCLIService_GetPrimaryKeys_args = function(args) {
1140
+ this.req = null;
1141
+ if (args) {
1142
+ if (args.req !== undefined && args.req !== null) {
1143
+ this.req = new ttypes.TGetPrimaryKeysReq(args.req);
1144
+ }
1145
+ }
1146
+ };
1147
+ TCLIService_GetPrimaryKeys_args.prototype = {};
1148
+ TCLIService_GetPrimaryKeys_args.prototype.read = function(input) {
1149
+ input.readStructBegin();
1150
+ while (true) {
1151
+ var ret = input.readFieldBegin();
1152
+ var ftype = ret.ftype;
1153
+ var fid = ret.fid;
1154
+ if (ftype == Thrift.Type.STOP) {
1155
+ break;
1156
+ }
1157
+ switch (fid) {
1158
+ case 1:
1159
+ if (ftype == Thrift.Type.STRUCT) {
1160
+ this.req = new ttypes.TGetPrimaryKeysReq();
1161
+ this.req.read(input);
1162
+ } else {
1163
+ input.skip(ftype);
1164
+ }
1165
+ break;
1166
+ case 0:
1167
+ input.skip(ftype);
1168
+ break;
1169
+ default:
1170
+ input.skip(ftype);
1171
+ }
1172
+ input.readFieldEnd();
1173
+ }
1174
+ input.readStructEnd();
1175
+ return;
1176
+ };
1177
+
1178
+ TCLIService_GetPrimaryKeys_args.prototype.write = function(output) {
1179
+ output.writeStructBegin('TCLIService_GetPrimaryKeys_args');
1180
+ if (this.req !== null && this.req !== undefined) {
1181
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
1182
+ this.req.write(output);
1183
+ output.writeFieldEnd();
1184
+ }
1185
+ output.writeFieldStop();
1186
+ output.writeStructEnd();
1187
+ return;
1188
+ };
1189
+
1190
+ var TCLIService_GetPrimaryKeys_result = function(args) {
1191
+ this.success = null;
1192
+ if (args) {
1193
+ if (args.success !== undefined && args.success !== null) {
1194
+ this.success = new ttypes.TGetPrimaryKeysResp(args.success);
1195
+ }
1196
+ }
1197
+ };
1198
+ TCLIService_GetPrimaryKeys_result.prototype = {};
1199
+ TCLIService_GetPrimaryKeys_result.prototype.read = function(input) {
1200
+ input.readStructBegin();
1201
+ while (true) {
1202
+ var ret = input.readFieldBegin();
1203
+ var ftype = ret.ftype;
1204
+ var fid = ret.fid;
1205
+ if (ftype == Thrift.Type.STOP) {
1206
+ break;
1207
+ }
1208
+ switch (fid) {
1209
+ case 0:
1210
+ if (ftype == Thrift.Type.STRUCT) {
1211
+ this.success = new ttypes.TGetPrimaryKeysResp();
1212
+ this.success.read(input);
1213
+ } else {
1214
+ input.skip(ftype);
1215
+ }
1216
+ break;
1217
+ case 0:
1218
+ input.skip(ftype);
1219
+ break;
1220
+ default:
1221
+ input.skip(ftype);
1222
+ }
1223
+ input.readFieldEnd();
1224
+ }
1225
+ input.readStructEnd();
1226
+ return;
1227
+ };
1228
+
1229
+ TCLIService_GetPrimaryKeys_result.prototype.write = function(output) {
1230
+ output.writeStructBegin('TCLIService_GetPrimaryKeys_result');
1231
+ if (this.success !== null && this.success !== undefined) {
1232
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
1233
+ this.success.write(output);
1234
+ output.writeFieldEnd();
1235
+ }
1236
+ output.writeFieldStop();
1237
+ output.writeStructEnd();
1238
+ return;
1239
+ };
1240
+
1241
+ var TCLIService_GetCrossReference_args = function(args) {
1242
+ this.req = null;
1243
+ if (args) {
1244
+ if (args.req !== undefined && args.req !== null) {
1245
+ this.req = new ttypes.TGetCrossReferenceReq(args.req);
1246
+ }
1247
+ }
1248
+ };
1249
+ TCLIService_GetCrossReference_args.prototype = {};
1250
+ TCLIService_GetCrossReference_args.prototype.read = function(input) {
1251
+ input.readStructBegin();
1252
+ while (true) {
1253
+ var ret = input.readFieldBegin();
1254
+ var ftype = ret.ftype;
1255
+ var fid = ret.fid;
1256
+ if (ftype == Thrift.Type.STOP) {
1257
+ break;
1258
+ }
1259
+ switch (fid) {
1260
+ case 1:
1261
+ if (ftype == Thrift.Type.STRUCT) {
1262
+ this.req = new ttypes.TGetCrossReferenceReq();
1263
+ this.req.read(input);
1264
+ } else {
1265
+ input.skip(ftype);
1266
+ }
1267
+ break;
1268
+ case 0:
1269
+ input.skip(ftype);
1270
+ break;
1271
+ default:
1272
+ input.skip(ftype);
1273
+ }
1274
+ input.readFieldEnd();
1275
+ }
1276
+ input.readStructEnd();
1277
+ return;
1278
+ };
1279
+
1280
+ TCLIService_GetCrossReference_args.prototype.write = function(output) {
1281
+ output.writeStructBegin('TCLIService_GetCrossReference_args');
1282
+ if (this.req !== null && this.req !== undefined) {
1283
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
1284
+ this.req.write(output);
1285
+ output.writeFieldEnd();
1286
+ }
1287
+ output.writeFieldStop();
1288
+ output.writeStructEnd();
1289
+ return;
1290
+ };
1291
+
1292
+ var TCLIService_GetCrossReference_result = function(args) {
1293
+ this.success = null;
1294
+ if (args) {
1295
+ if (args.success !== undefined && args.success !== null) {
1296
+ this.success = new ttypes.TGetCrossReferenceResp(args.success);
1297
+ }
1298
+ }
1299
+ };
1300
+ TCLIService_GetCrossReference_result.prototype = {};
1301
+ TCLIService_GetCrossReference_result.prototype.read = function(input) {
1302
+ input.readStructBegin();
1303
+ while (true) {
1304
+ var ret = input.readFieldBegin();
1305
+ var ftype = ret.ftype;
1306
+ var fid = ret.fid;
1307
+ if (ftype == Thrift.Type.STOP) {
1308
+ break;
1309
+ }
1310
+ switch (fid) {
1311
+ case 0:
1312
+ if (ftype == Thrift.Type.STRUCT) {
1313
+ this.success = new ttypes.TGetCrossReferenceResp();
1314
+ this.success.read(input);
1315
+ } else {
1316
+ input.skip(ftype);
1317
+ }
1318
+ break;
1319
+ case 0:
1320
+ input.skip(ftype);
1321
+ break;
1322
+ default:
1323
+ input.skip(ftype);
1324
+ }
1325
+ input.readFieldEnd();
1326
+ }
1327
+ input.readStructEnd();
1328
+ return;
1329
+ };
1330
+
1331
+ TCLIService_GetCrossReference_result.prototype.write = function(output) {
1332
+ output.writeStructBegin('TCLIService_GetCrossReference_result');
1333
+ if (this.success !== null && this.success !== undefined) {
1334
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
1335
+ this.success.write(output);
1336
+ output.writeFieldEnd();
1337
+ }
1338
+ output.writeFieldStop();
1339
+ output.writeStructEnd();
1340
+ return;
1341
+ };
1342
+
1343
+ var TCLIService_GetOperationStatus_args = function(args) {
1344
+ this.req = null;
1345
+ if (args) {
1346
+ if (args.req !== undefined && args.req !== null) {
1347
+ this.req = new ttypes.TGetOperationStatusReq(args.req);
1348
+ }
1349
+ }
1350
+ };
1351
+ TCLIService_GetOperationStatus_args.prototype = {};
1352
+ TCLIService_GetOperationStatus_args.prototype.read = function(input) {
1353
+ input.readStructBegin();
1354
+ while (true) {
1355
+ var ret = input.readFieldBegin();
1356
+ var ftype = ret.ftype;
1357
+ var fid = ret.fid;
1358
+ if (ftype == Thrift.Type.STOP) {
1359
+ break;
1360
+ }
1361
+ switch (fid) {
1362
+ case 1:
1363
+ if (ftype == Thrift.Type.STRUCT) {
1364
+ this.req = new ttypes.TGetOperationStatusReq();
1365
+ this.req.read(input);
1366
+ } else {
1367
+ input.skip(ftype);
1368
+ }
1369
+ break;
1370
+ case 0:
1371
+ input.skip(ftype);
1372
+ break;
1373
+ default:
1374
+ input.skip(ftype);
1375
+ }
1376
+ input.readFieldEnd();
1377
+ }
1378
+ input.readStructEnd();
1379
+ return;
1380
+ };
1381
+
1382
+ TCLIService_GetOperationStatus_args.prototype.write = function(output) {
1383
+ output.writeStructBegin('TCLIService_GetOperationStatus_args');
1384
+ if (this.req !== null && this.req !== undefined) {
1385
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
1386
+ this.req.write(output);
1387
+ output.writeFieldEnd();
1388
+ }
1389
+ output.writeFieldStop();
1390
+ output.writeStructEnd();
1391
+ return;
1392
+ };
1393
+
1394
+ var TCLIService_GetOperationStatus_result = function(args) {
1395
+ this.success = null;
1396
+ if (args) {
1397
+ if (args.success !== undefined && args.success !== null) {
1398
+ this.success = new ttypes.TGetOperationStatusResp(args.success);
1399
+ }
1400
+ }
1401
+ };
1402
+ TCLIService_GetOperationStatus_result.prototype = {};
1403
+ TCLIService_GetOperationStatus_result.prototype.read = function(input) {
1404
+ input.readStructBegin();
1405
+ while (true) {
1406
+ var ret = input.readFieldBegin();
1407
+ var ftype = ret.ftype;
1408
+ var fid = ret.fid;
1409
+ if (ftype == Thrift.Type.STOP) {
1410
+ break;
1411
+ }
1412
+ switch (fid) {
1413
+ case 0:
1414
+ if (ftype == Thrift.Type.STRUCT) {
1415
+ this.success = new ttypes.TGetOperationStatusResp();
1416
+ this.success.read(input);
1417
+ } else {
1418
+ input.skip(ftype);
1419
+ }
1420
+ break;
1421
+ case 0:
1422
+ input.skip(ftype);
1423
+ break;
1424
+ default:
1425
+ input.skip(ftype);
1426
+ }
1427
+ input.readFieldEnd();
1428
+ }
1429
+ input.readStructEnd();
1430
+ return;
1431
+ };
1432
+
1433
+ TCLIService_GetOperationStatus_result.prototype.write = function(output) {
1434
+ output.writeStructBegin('TCLIService_GetOperationStatus_result');
1435
+ if (this.success !== null && this.success !== undefined) {
1436
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
1437
+ this.success.write(output);
1438
+ output.writeFieldEnd();
1439
+ }
1440
+ output.writeFieldStop();
1441
+ output.writeStructEnd();
1442
+ return;
1443
+ };
1444
+
1445
+ var TCLIService_CancelOperation_args = function(args) {
1446
+ this.req = null;
1447
+ if (args) {
1448
+ if (args.req !== undefined && args.req !== null) {
1449
+ this.req = new ttypes.TCancelOperationReq(args.req);
1450
+ }
1451
+ }
1452
+ };
1453
+ TCLIService_CancelOperation_args.prototype = {};
1454
+ TCLIService_CancelOperation_args.prototype.read = function(input) {
1455
+ input.readStructBegin();
1456
+ while (true) {
1457
+ var ret = input.readFieldBegin();
1458
+ var ftype = ret.ftype;
1459
+ var fid = ret.fid;
1460
+ if (ftype == Thrift.Type.STOP) {
1461
+ break;
1462
+ }
1463
+ switch (fid) {
1464
+ case 1:
1465
+ if (ftype == Thrift.Type.STRUCT) {
1466
+ this.req = new ttypes.TCancelOperationReq();
1467
+ this.req.read(input);
1468
+ } else {
1469
+ input.skip(ftype);
1470
+ }
1471
+ break;
1472
+ case 0:
1473
+ input.skip(ftype);
1474
+ break;
1475
+ default:
1476
+ input.skip(ftype);
1477
+ }
1478
+ input.readFieldEnd();
1479
+ }
1480
+ input.readStructEnd();
1481
+ return;
1482
+ };
1483
+
1484
+ TCLIService_CancelOperation_args.prototype.write = function(output) {
1485
+ output.writeStructBegin('TCLIService_CancelOperation_args');
1486
+ if (this.req !== null && this.req !== undefined) {
1487
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
1488
+ this.req.write(output);
1489
+ output.writeFieldEnd();
1490
+ }
1491
+ output.writeFieldStop();
1492
+ output.writeStructEnd();
1493
+ return;
1494
+ };
1495
+
1496
+ var TCLIService_CancelOperation_result = function(args) {
1497
+ this.success = null;
1498
+ if (args) {
1499
+ if (args.success !== undefined && args.success !== null) {
1500
+ this.success = new ttypes.TCancelOperationResp(args.success);
1501
+ }
1502
+ }
1503
+ };
1504
+ TCLIService_CancelOperation_result.prototype = {};
1505
+ TCLIService_CancelOperation_result.prototype.read = function(input) {
1506
+ input.readStructBegin();
1507
+ while (true) {
1508
+ var ret = input.readFieldBegin();
1509
+ var ftype = ret.ftype;
1510
+ var fid = ret.fid;
1511
+ if (ftype == Thrift.Type.STOP) {
1512
+ break;
1513
+ }
1514
+ switch (fid) {
1515
+ case 0:
1516
+ if (ftype == Thrift.Type.STRUCT) {
1517
+ this.success = new ttypes.TCancelOperationResp();
1518
+ this.success.read(input);
1519
+ } else {
1520
+ input.skip(ftype);
1521
+ }
1522
+ break;
1523
+ case 0:
1524
+ input.skip(ftype);
1525
+ break;
1526
+ default:
1527
+ input.skip(ftype);
1528
+ }
1529
+ input.readFieldEnd();
1530
+ }
1531
+ input.readStructEnd();
1532
+ return;
1533
+ };
1534
+
1535
+ TCLIService_CancelOperation_result.prototype.write = function(output) {
1536
+ output.writeStructBegin('TCLIService_CancelOperation_result');
1537
+ if (this.success !== null && this.success !== undefined) {
1538
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
1539
+ this.success.write(output);
1540
+ output.writeFieldEnd();
1541
+ }
1542
+ output.writeFieldStop();
1543
+ output.writeStructEnd();
1544
+ return;
1545
+ };
1546
+
1547
+ var TCLIService_CloseOperation_args = function(args) {
1548
+ this.req = null;
1549
+ if (args) {
1550
+ if (args.req !== undefined && args.req !== null) {
1551
+ this.req = new ttypes.TCloseOperationReq(args.req);
1552
+ }
1553
+ }
1554
+ };
1555
+ TCLIService_CloseOperation_args.prototype = {};
1556
+ TCLIService_CloseOperation_args.prototype.read = function(input) {
1557
+ input.readStructBegin();
1558
+ while (true) {
1559
+ var ret = input.readFieldBegin();
1560
+ var ftype = ret.ftype;
1561
+ var fid = ret.fid;
1562
+ if (ftype == Thrift.Type.STOP) {
1563
+ break;
1564
+ }
1565
+ switch (fid) {
1566
+ case 1:
1567
+ if (ftype == Thrift.Type.STRUCT) {
1568
+ this.req = new ttypes.TCloseOperationReq();
1569
+ this.req.read(input);
1570
+ } else {
1571
+ input.skip(ftype);
1572
+ }
1573
+ break;
1574
+ case 0:
1575
+ input.skip(ftype);
1576
+ break;
1577
+ default:
1578
+ input.skip(ftype);
1579
+ }
1580
+ input.readFieldEnd();
1581
+ }
1582
+ input.readStructEnd();
1583
+ return;
1584
+ };
1585
+
1586
+ TCLIService_CloseOperation_args.prototype.write = function(output) {
1587
+ output.writeStructBegin('TCLIService_CloseOperation_args');
1588
+ if (this.req !== null && this.req !== undefined) {
1589
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
1590
+ this.req.write(output);
1591
+ output.writeFieldEnd();
1592
+ }
1593
+ output.writeFieldStop();
1594
+ output.writeStructEnd();
1595
+ return;
1596
+ };
1597
+
1598
+ var TCLIService_CloseOperation_result = function(args) {
1599
+ this.success = null;
1600
+ if (args) {
1601
+ if (args.success !== undefined && args.success !== null) {
1602
+ this.success = new ttypes.TCloseOperationResp(args.success);
1603
+ }
1604
+ }
1605
+ };
1606
+ TCLIService_CloseOperation_result.prototype = {};
1607
+ TCLIService_CloseOperation_result.prototype.read = function(input) {
1608
+ input.readStructBegin();
1609
+ while (true) {
1610
+ var ret = input.readFieldBegin();
1611
+ var ftype = ret.ftype;
1612
+ var fid = ret.fid;
1613
+ if (ftype == Thrift.Type.STOP) {
1614
+ break;
1615
+ }
1616
+ switch (fid) {
1617
+ case 0:
1618
+ if (ftype == Thrift.Type.STRUCT) {
1619
+ this.success = new ttypes.TCloseOperationResp();
1620
+ this.success.read(input);
1621
+ } else {
1622
+ input.skip(ftype);
1623
+ }
1624
+ break;
1625
+ case 0:
1626
+ input.skip(ftype);
1627
+ break;
1628
+ default:
1629
+ input.skip(ftype);
1630
+ }
1631
+ input.readFieldEnd();
1632
+ }
1633
+ input.readStructEnd();
1634
+ return;
1635
+ };
1636
+
1637
+ TCLIService_CloseOperation_result.prototype.write = function(output) {
1638
+ output.writeStructBegin('TCLIService_CloseOperation_result');
1639
+ if (this.success !== null && this.success !== undefined) {
1640
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
1641
+ this.success.write(output);
1642
+ output.writeFieldEnd();
1643
+ }
1644
+ output.writeFieldStop();
1645
+ output.writeStructEnd();
1646
+ return;
1647
+ };
1648
+
1649
+ var TCLIService_GetResultSetMetadata_args = function(args) {
1650
+ this.req = null;
1651
+ if (args) {
1652
+ if (args.req !== undefined && args.req !== null) {
1653
+ this.req = new ttypes.TGetResultSetMetadataReq(args.req);
1654
+ }
1655
+ }
1656
+ };
1657
+ TCLIService_GetResultSetMetadata_args.prototype = {};
1658
+ TCLIService_GetResultSetMetadata_args.prototype.read = function(input) {
1659
+ input.readStructBegin();
1660
+ while (true) {
1661
+ var ret = input.readFieldBegin();
1662
+ var ftype = ret.ftype;
1663
+ var fid = ret.fid;
1664
+ if (ftype == Thrift.Type.STOP) {
1665
+ break;
1666
+ }
1667
+ switch (fid) {
1668
+ case 1:
1669
+ if (ftype == Thrift.Type.STRUCT) {
1670
+ this.req = new ttypes.TGetResultSetMetadataReq();
1671
+ this.req.read(input);
1672
+ } else {
1673
+ input.skip(ftype);
1674
+ }
1675
+ break;
1676
+ case 0:
1677
+ input.skip(ftype);
1678
+ break;
1679
+ default:
1680
+ input.skip(ftype);
1681
+ }
1682
+ input.readFieldEnd();
1683
+ }
1684
+ input.readStructEnd();
1685
+ return;
1686
+ };
1687
+
1688
+ TCLIService_GetResultSetMetadata_args.prototype.write = function(output) {
1689
+ output.writeStructBegin('TCLIService_GetResultSetMetadata_args');
1690
+ if (this.req !== null && this.req !== undefined) {
1691
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
1692
+ this.req.write(output);
1693
+ output.writeFieldEnd();
1694
+ }
1695
+ output.writeFieldStop();
1696
+ output.writeStructEnd();
1697
+ return;
1698
+ };
1699
+
1700
+ var TCLIService_GetResultSetMetadata_result = function(args) {
1701
+ this.success = null;
1702
+ if (args) {
1703
+ if (args.success !== undefined && args.success !== null) {
1704
+ this.success = new ttypes.TGetResultSetMetadataResp(args.success);
1705
+ }
1706
+ }
1707
+ };
1708
+ TCLIService_GetResultSetMetadata_result.prototype = {};
1709
+ TCLIService_GetResultSetMetadata_result.prototype.read = function(input) {
1710
+ input.readStructBegin();
1711
+ while (true) {
1712
+ var ret = input.readFieldBegin();
1713
+ var ftype = ret.ftype;
1714
+ var fid = ret.fid;
1715
+ if (ftype == Thrift.Type.STOP) {
1716
+ break;
1717
+ }
1718
+ switch (fid) {
1719
+ case 0:
1720
+ if (ftype == Thrift.Type.STRUCT) {
1721
+ this.success = new ttypes.TGetResultSetMetadataResp();
1722
+ this.success.read(input);
1723
+ } else {
1724
+ input.skip(ftype);
1725
+ }
1726
+ break;
1727
+ case 0:
1728
+ input.skip(ftype);
1729
+ break;
1730
+ default:
1731
+ input.skip(ftype);
1732
+ }
1733
+ input.readFieldEnd();
1734
+ }
1735
+ input.readStructEnd();
1736
+ return;
1737
+ };
1738
+
1739
+ TCLIService_GetResultSetMetadata_result.prototype.write = function(output) {
1740
+ output.writeStructBegin('TCLIService_GetResultSetMetadata_result');
1741
+ if (this.success !== null && this.success !== undefined) {
1742
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
1743
+ this.success.write(output);
1744
+ output.writeFieldEnd();
1745
+ }
1746
+ output.writeFieldStop();
1747
+ output.writeStructEnd();
1748
+ return;
1749
+ };
1750
+
1751
+ var TCLIService_FetchResults_args = function(args) {
1752
+ this.req = null;
1753
+ if (args) {
1754
+ if (args.req !== undefined && args.req !== null) {
1755
+ this.req = new ttypes.TFetchResultsReq(args.req);
1756
+ }
1757
+ }
1758
+ };
1759
+ TCLIService_FetchResults_args.prototype = {};
1760
+ TCLIService_FetchResults_args.prototype.read = function(input) {
1761
+ input.readStructBegin();
1762
+ while (true) {
1763
+ var ret = input.readFieldBegin();
1764
+ var ftype = ret.ftype;
1765
+ var fid = ret.fid;
1766
+ if (ftype == Thrift.Type.STOP) {
1767
+ break;
1768
+ }
1769
+ switch (fid) {
1770
+ case 1:
1771
+ if (ftype == Thrift.Type.STRUCT) {
1772
+ this.req = new ttypes.TFetchResultsReq();
1773
+ this.req.read(input);
1774
+ } else {
1775
+ input.skip(ftype);
1776
+ }
1777
+ break;
1778
+ case 0:
1779
+ input.skip(ftype);
1780
+ break;
1781
+ default:
1782
+ input.skip(ftype);
1783
+ }
1784
+ input.readFieldEnd();
1785
+ }
1786
+ input.readStructEnd();
1787
+ return;
1788
+ };
1789
+
1790
+ TCLIService_FetchResults_args.prototype.write = function(output) {
1791
+ output.writeStructBegin('TCLIService_FetchResults_args');
1792
+ if (this.req !== null && this.req !== undefined) {
1793
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
1794
+ this.req.write(output);
1795
+ output.writeFieldEnd();
1796
+ }
1797
+ output.writeFieldStop();
1798
+ output.writeStructEnd();
1799
+ return;
1800
+ };
1801
+
1802
+ var TCLIService_FetchResults_result = function(args) {
1803
+ this.success = null;
1804
+ if (args) {
1805
+ if (args.success !== undefined && args.success !== null) {
1806
+ this.success = new ttypes.TFetchResultsResp(args.success);
1807
+ }
1808
+ }
1809
+ };
1810
+ TCLIService_FetchResults_result.prototype = {};
1811
+ TCLIService_FetchResults_result.prototype.read = function(input) {
1812
+ input.readStructBegin();
1813
+ while (true) {
1814
+ var ret = input.readFieldBegin();
1815
+ var ftype = ret.ftype;
1816
+ var fid = ret.fid;
1817
+ if (ftype == Thrift.Type.STOP) {
1818
+ break;
1819
+ }
1820
+ switch (fid) {
1821
+ case 0:
1822
+ if (ftype == Thrift.Type.STRUCT) {
1823
+ this.success = new ttypes.TFetchResultsResp();
1824
+ this.success.read(input);
1825
+ } else {
1826
+ input.skip(ftype);
1827
+ }
1828
+ break;
1829
+ case 0:
1830
+ input.skip(ftype);
1831
+ break;
1832
+ default:
1833
+ input.skip(ftype);
1834
+ }
1835
+ input.readFieldEnd();
1836
+ }
1837
+ input.readStructEnd();
1838
+ return;
1839
+ };
1840
+
1841
+ TCLIService_FetchResults_result.prototype.write = function(output) {
1842
+ output.writeStructBegin('TCLIService_FetchResults_result');
1843
+ if (this.success !== null && this.success !== undefined) {
1844
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
1845
+ this.success.write(output);
1846
+ output.writeFieldEnd();
1847
+ }
1848
+ output.writeFieldStop();
1849
+ output.writeStructEnd();
1850
+ return;
1851
+ };
1852
+
1853
+ var TCLIService_GetDelegationToken_args = function(args) {
1854
+ this.req = null;
1855
+ if (args) {
1856
+ if (args.req !== undefined && args.req !== null) {
1857
+ this.req = new ttypes.TGetDelegationTokenReq(args.req);
1858
+ }
1859
+ }
1860
+ };
1861
+ TCLIService_GetDelegationToken_args.prototype = {};
1862
+ TCLIService_GetDelegationToken_args.prototype.read = function(input) {
1863
+ input.readStructBegin();
1864
+ while (true) {
1865
+ var ret = input.readFieldBegin();
1866
+ var ftype = ret.ftype;
1867
+ var fid = ret.fid;
1868
+ if (ftype == Thrift.Type.STOP) {
1869
+ break;
1870
+ }
1871
+ switch (fid) {
1872
+ case 1:
1873
+ if (ftype == Thrift.Type.STRUCT) {
1874
+ this.req = new ttypes.TGetDelegationTokenReq();
1875
+ this.req.read(input);
1876
+ } else {
1877
+ input.skip(ftype);
1878
+ }
1879
+ break;
1880
+ case 0:
1881
+ input.skip(ftype);
1882
+ break;
1883
+ default:
1884
+ input.skip(ftype);
1885
+ }
1886
+ input.readFieldEnd();
1887
+ }
1888
+ input.readStructEnd();
1889
+ return;
1890
+ };
1891
+
1892
+ TCLIService_GetDelegationToken_args.prototype.write = function(output) {
1893
+ output.writeStructBegin('TCLIService_GetDelegationToken_args');
1894
+ if (this.req !== null && this.req !== undefined) {
1895
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
1896
+ this.req.write(output);
1897
+ output.writeFieldEnd();
1898
+ }
1899
+ output.writeFieldStop();
1900
+ output.writeStructEnd();
1901
+ return;
1902
+ };
1903
+
1904
+ var TCLIService_GetDelegationToken_result = function(args) {
1905
+ this.success = null;
1906
+ if (args) {
1907
+ if (args.success !== undefined && args.success !== null) {
1908
+ this.success = new ttypes.TGetDelegationTokenResp(args.success);
1909
+ }
1910
+ }
1911
+ };
1912
+ TCLIService_GetDelegationToken_result.prototype = {};
1913
+ TCLIService_GetDelegationToken_result.prototype.read = function(input) {
1914
+ input.readStructBegin();
1915
+ while (true) {
1916
+ var ret = input.readFieldBegin();
1917
+ var ftype = ret.ftype;
1918
+ var fid = ret.fid;
1919
+ if (ftype == Thrift.Type.STOP) {
1920
+ break;
1921
+ }
1922
+ switch (fid) {
1923
+ case 0:
1924
+ if (ftype == Thrift.Type.STRUCT) {
1925
+ this.success = new ttypes.TGetDelegationTokenResp();
1926
+ this.success.read(input);
1927
+ } else {
1928
+ input.skip(ftype);
1929
+ }
1930
+ break;
1931
+ case 0:
1932
+ input.skip(ftype);
1933
+ break;
1934
+ default:
1935
+ input.skip(ftype);
1936
+ }
1937
+ input.readFieldEnd();
1938
+ }
1939
+ input.readStructEnd();
1940
+ return;
1941
+ };
1942
+
1943
+ TCLIService_GetDelegationToken_result.prototype.write = function(output) {
1944
+ output.writeStructBegin('TCLIService_GetDelegationToken_result');
1945
+ if (this.success !== null && this.success !== undefined) {
1946
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
1947
+ this.success.write(output);
1948
+ output.writeFieldEnd();
1949
+ }
1950
+ output.writeFieldStop();
1951
+ output.writeStructEnd();
1952
+ return;
1953
+ };
1954
+
1955
+ var TCLIService_CancelDelegationToken_args = function(args) {
1956
+ this.req = null;
1957
+ if (args) {
1958
+ if (args.req !== undefined && args.req !== null) {
1959
+ this.req = new ttypes.TCancelDelegationTokenReq(args.req);
1960
+ }
1961
+ }
1962
+ };
1963
+ TCLIService_CancelDelegationToken_args.prototype = {};
1964
+ TCLIService_CancelDelegationToken_args.prototype.read = function(input) {
1965
+ input.readStructBegin();
1966
+ while (true) {
1967
+ var ret = input.readFieldBegin();
1968
+ var ftype = ret.ftype;
1969
+ var fid = ret.fid;
1970
+ if (ftype == Thrift.Type.STOP) {
1971
+ break;
1972
+ }
1973
+ switch (fid) {
1974
+ case 1:
1975
+ if (ftype == Thrift.Type.STRUCT) {
1976
+ this.req = new ttypes.TCancelDelegationTokenReq();
1977
+ this.req.read(input);
1978
+ } else {
1979
+ input.skip(ftype);
1980
+ }
1981
+ break;
1982
+ case 0:
1983
+ input.skip(ftype);
1984
+ break;
1985
+ default:
1986
+ input.skip(ftype);
1987
+ }
1988
+ input.readFieldEnd();
1989
+ }
1990
+ input.readStructEnd();
1991
+ return;
1992
+ };
1993
+
1994
+ TCLIService_CancelDelegationToken_args.prototype.write = function(output) {
1995
+ output.writeStructBegin('TCLIService_CancelDelegationToken_args');
1996
+ if (this.req !== null && this.req !== undefined) {
1997
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
1998
+ this.req.write(output);
1999
+ output.writeFieldEnd();
2000
+ }
2001
+ output.writeFieldStop();
2002
+ output.writeStructEnd();
2003
+ return;
2004
+ };
2005
+
2006
+ var TCLIService_CancelDelegationToken_result = function(args) {
2007
+ this.success = null;
2008
+ if (args) {
2009
+ if (args.success !== undefined && args.success !== null) {
2010
+ this.success = new ttypes.TCancelDelegationTokenResp(args.success);
2011
+ }
2012
+ }
2013
+ };
2014
+ TCLIService_CancelDelegationToken_result.prototype = {};
2015
+ TCLIService_CancelDelegationToken_result.prototype.read = function(input) {
2016
+ input.readStructBegin();
2017
+ while (true) {
2018
+ var ret = input.readFieldBegin();
2019
+ var ftype = ret.ftype;
2020
+ var fid = ret.fid;
2021
+ if (ftype == Thrift.Type.STOP) {
2022
+ break;
2023
+ }
2024
+ switch (fid) {
2025
+ case 0:
2026
+ if (ftype == Thrift.Type.STRUCT) {
2027
+ this.success = new ttypes.TCancelDelegationTokenResp();
2028
+ this.success.read(input);
2029
+ } else {
2030
+ input.skip(ftype);
2031
+ }
2032
+ break;
2033
+ case 0:
2034
+ input.skip(ftype);
2035
+ break;
2036
+ default:
2037
+ input.skip(ftype);
2038
+ }
2039
+ input.readFieldEnd();
2040
+ }
2041
+ input.readStructEnd();
2042
+ return;
2043
+ };
2044
+
2045
+ TCLIService_CancelDelegationToken_result.prototype.write = function(output) {
2046
+ output.writeStructBegin('TCLIService_CancelDelegationToken_result');
2047
+ if (this.success !== null && this.success !== undefined) {
2048
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
2049
+ this.success.write(output);
2050
+ output.writeFieldEnd();
2051
+ }
2052
+ output.writeFieldStop();
2053
+ output.writeStructEnd();
2054
+ return;
2055
+ };
2056
+
2057
+ var TCLIService_RenewDelegationToken_args = function(args) {
2058
+ this.req = null;
2059
+ if (args) {
2060
+ if (args.req !== undefined && args.req !== null) {
2061
+ this.req = new ttypes.TRenewDelegationTokenReq(args.req);
2062
+ }
2063
+ }
2064
+ };
2065
+ TCLIService_RenewDelegationToken_args.prototype = {};
2066
+ TCLIService_RenewDelegationToken_args.prototype.read = function(input) {
2067
+ input.readStructBegin();
2068
+ while (true) {
2069
+ var ret = input.readFieldBegin();
2070
+ var ftype = ret.ftype;
2071
+ var fid = ret.fid;
2072
+ if (ftype == Thrift.Type.STOP) {
2073
+ break;
2074
+ }
2075
+ switch (fid) {
2076
+ case 1:
2077
+ if (ftype == Thrift.Type.STRUCT) {
2078
+ this.req = new ttypes.TRenewDelegationTokenReq();
2079
+ this.req.read(input);
2080
+ } else {
2081
+ input.skip(ftype);
2082
+ }
2083
+ break;
2084
+ case 0:
2085
+ input.skip(ftype);
2086
+ break;
2087
+ default:
2088
+ input.skip(ftype);
2089
+ }
2090
+ input.readFieldEnd();
2091
+ }
2092
+ input.readStructEnd();
2093
+ return;
2094
+ };
2095
+
2096
+ TCLIService_RenewDelegationToken_args.prototype.write = function(output) {
2097
+ output.writeStructBegin('TCLIService_RenewDelegationToken_args');
2098
+ if (this.req !== null && this.req !== undefined) {
2099
+ output.writeFieldBegin('req', Thrift.Type.STRUCT, 1);
2100
+ this.req.write(output);
2101
+ output.writeFieldEnd();
2102
+ }
2103
+ output.writeFieldStop();
2104
+ output.writeStructEnd();
2105
+ return;
2106
+ };
2107
+
2108
+ var TCLIService_RenewDelegationToken_result = function(args) {
2109
+ this.success = null;
2110
+ if (args) {
2111
+ if (args.success !== undefined && args.success !== null) {
2112
+ this.success = new ttypes.TRenewDelegationTokenResp(args.success);
2113
+ }
2114
+ }
2115
+ };
2116
+ TCLIService_RenewDelegationToken_result.prototype = {};
2117
+ TCLIService_RenewDelegationToken_result.prototype.read = function(input) {
2118
+ input.readStructBegin();
2119
+ while (true) {
2120
+ var ret = input.readFieldBegin();
2121
+ var ftype = ret.ftype;
2122
+ var fid = ret.fid;
2123
+ if (ftype == Thrift.Type.STOP) {
2124
+ break;
2125
+ }
2126
+ switch (fid) {
2127
+ case 0:
2128
+ if (ftype == Thrift.Type.STRUCT) {
2129
+ this.success = new ttypes.TRenewDelegationTokenResp();
2130
+ this.success.read(input);
2131
+ } else {
2132
+ input.skip(ftype);
2133
+ }
2134
+ break;
2135
+ case 0:
2136
+ input.skip(ftype);
2137
+ break;
2138
+ default:
2139
+ input.skip(ftype);
2140
+ }
2141
+ input.readFieldEnd();
2142
+ }
2143
+ input.readStructEnd();
2144
+ return;
2145
+ };
2146
+
2147
+ TCLIService_RenewDelegationToken_result.prototype.write = function(output) {
2148
+ output.writeStructBegin('TCLIService_RenewDelegationToken_result');
2149
+ if (this.success !== null && this.success !== undefined) {
2150
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
2151
+ this.success.write(output);
2152
+ output.writeFieldEnd();
2153
+ }
2154
+ output.writeFieldStop();
2155
+ output.writeStructEnd();
2156
+ return;
2157
+ };
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
+ var TCLIServiceClient = exports.Client = function(output, pClass) {
2364
+ this.output = output;
2365
+ this.pClass = pClass;
2366
+ this._seqid = 0;
2367
+ this._reqs = {};
2368
+ };
2369
+ TCLIServiceClient.prototype = {};
2370
+ TCLIServiceClient.prototype.seqid = function() { return this._seqid; };
2371
+ TCLIServiceClient.prototype.new_seqid = function() { return this._seqid += 1; };
2372
+
2373
+ TCLIServiceClient.prototype.OpenSession = function(req, callback) {
2374
+ this._seqid = this.new_seqid();
2375
+ if (callback === undefined) {
2376
+ var _defer = Q.defer();
2377
+ this._reqs[this.seqid()] = function(error, result) {
2378
+ if (error) {
2379
+ _defer.reject(error);
2380
+ } else {
2381
+ _defer.resolve(result);
2382
+ }
2383
+ };
2384
+ this.send_OpenSession(req);
2385
+ return _defer.promise;
2386
+ } else {
2387
+ this._reqs[this.seqid()] = callback;
2388
+ this.send_OpenSession(req);
2389
+ }
2390
+ };
2391
+
2392
+ TCLIServiceClient.prototype.send_OpenSession = function(req) {
2393
+ var output = new this.pClass(this.output);
2394
+ var params = {
2395
+ req: req
2396
+ };
2397
+ var args = new TCLIService_OpenSession_args(params);
2398
+ try {
2399
+ output.writeMessageBegin('OpenSession', Thrift.MessageType.CALL, this.seqid());
2400
+ args.write(output);
2401
+ output.writeMessageEnd();
2402
+ return this.output.flush();
2403
+ }
2404
+ catch (e) {
2405
+ delete this._reqs[this.seqid()];
2406
+ if (typeof output.reset === 'function') {
2407
+ output.reset();
2408
+ }
2409
+ throw e;
2410
+ }
2411
+ };
2412
+
2413
+ TCLIServiceClient.prototype.recv_OpenSession = function(input,mtype,rseqid) {
2414
+ var callback = this._reqs[rseqid] || function() {};
2415
+ delete this._reqs[rseqid];
2416
+ if (mtype == Thrift.MessageType.EXCEPTION) {
2417
+ var x = new Thrift.TApplicationException();
2418
+ x.read(input);
2419
+ input.readMessageEnd();
2420
+ return callback(x);
2421
+ }
2422
+ var result = new TCLIService_OpenSession_result();
2423
+ result.read(input);
2424
+ input.readMessageEnd();
2425
+
2426
+ if (null !== result.success) {
2427
+ return callback(null, result.success);
2428
+ }
2429
+ return callback('OpenSession failed: unknown result');
2430
+ };
2431
+
2432
+ TCLIServiceClient.prototype.CloseSession = function(req, callback) {
2433
+ this._seqid = this.new_seqid();
2434
+ if (callback === undefined) {
2435
+ var _defer = Q.defer();
2436
+ this._reqs[this.seqid()] = function(error, result) {
2437
+ if (error) {
2438
+ _defer.reject(error);
2439
+ } else {
2440
+ _defer.resolve(result);
2441
+ }
2442
+ };
2443
+ this.send_CloseSession(req);
2444
+ return _defer.promise;
2445
+ } else {
2446
+ this._reqs[this.seqid()] = callback;
2447
+ this.send_CloseSession(req);
2448
+ }
2449
+ };
2450
+
2451
+ TCLIServiceClient.prototype.send_CloseSession = function(req) {
2452
+ var output = new this.pClass(this.output);
2453
+ var params = {
2454
+ req: req
2455
+ };
2456
+ var args = new TCLIService_CloseSession_args(params);
2457
+ try {
2458
+ output.writeMessageBegin('CloseSession', Thrift.MessageType.CALL, this.seqid());
2459
+ args.write(output);
2460
+ output.writeMessageEnd();
2461
+ return this.output.flush();
2462
+ }
2463
+ catch (e) {
2464
+ delete this._reqs[this.seqid()];
2465
+ if (typeof output.reset === 'function') {
2466
+ output.reset();
2467
+ }
2468
+ throw e;
2469
+ }
2470
+ };
2471
+
2472
+ TCLIServiceClient.prototype.recv_CloseSession = function(input,mtype,rseqid) {
2473
+ var callback = this._reqs[rseqid] || function() {};
2474
+ delete this._reqs[rseqid];
2475
+ if (mtype == Thrift.MessageType.EXCEPTION) {
2476
+ var x = new Thrift.TApplicationException();
2477
+ x.read(input);
2478
+ input.readMessageEnd();
2479
+ return callback(x);
2480
+ }
2481
+ var result = new TCLIService_CloseSession_result();
2482
+ result.read(input);
2483
+ input.readMessageEnd();
2484
+
2485
+ if (null !== result.success) {
2486
+ return callback(null, result.success);
2487
+ }
2488
+ return callback('CloseSession failed: unknown result');
2489
+ };
2490
+
2491
+ TCLIServiceClient.prototype.GetInfo = function(req, callback) {
2492
+ this._seqid = this.new_seqid();
2493
+ if (callback === undefined) {
2494
+ var _defer = Q.defer();
2495
+ this._reqs[this.seqid()] = function(error, result) {
2496
+ if (error) {
2497
+ _defer.reject(error);
2498
+ } else {
2499
+ _defer.resolve(result);
2500
+ }
2501
+ };
2502
+ this.send_GetInfo(req);
2503
+ return _defer.promise;
2504
+ } else {
2505
+ this._reqs[this.seqid()] = callback;
2506
+ this.send_GetInfo(req);
2507
+ }
2508
+ };
2509
+
2510
+ TCLIServiceClient.prototype.send_GetInfo = function(req) {
2511
+ var output = new this.pClass(this.output);
2512
+ var params = {
2513
+ req: req
2514
+ };
2515
+ var args = new TCLIService_GetInfo_args(params);
2516
+ try {
2517
+ output.writeMessageBegin('GetInfo', Thrift.MessageType.CALL, this.seqid());
2518
+ args.write(output);
2519
+ output.writeMessageEnd();
2520
+ return this.output.flush();
2521
+ }
2522
+ catch (e) {
2523
+ delete this._reqs[this.seqid()];
2524
+ if (typeof output.reset === 'function') {
2525
+ output.reset();
2526
+ }
2527
+ throw e;
2528
+ }
2529
+ };
2530
+
2531
+ TCLIServiceClient.prototype.recv_GetInfo = function(input,mtype,rseqid) {
2532
+ var callback = this._reqs[rseqid] || function() {};
2533
+ delete this._reqs[rseqid];
2534
+ if (mtype == Thrift.MessageType.EXCEPTION) {
2535
+ var x = new Thrift.TApplicationException();
2536
+ x.read(input);
2537
+ input.readMessageEnd();
2538
+ return callback(x);
2539
+ }
2540
+ var result = new TCLIService_GetInfo_result();
2541
+ result.read(input);
2542
+ input.readMessageEnd();
2543
+
2544
+ if (null !== result.success) {
2545
+ return callback(null, result.success);
2546
+ }
2547
+ return callback('GetInfo failed: unknown result');
2548
+ };
2549
+
2550
+ TCLIServiceClient.prototype.ExecuteStatement = function(req, callback) {
2551
+ this._seqid = this.new_seqid();
2552
+ if (callback === undefined) {
2553
+ var _defer = Q.defer();
2554
+ this._reqs[this.seqid()] = function(error, result) {
2555
+ if (error) {
2556
+ _defer.reject(error);
2557
+ } else {
2558
+ _defer.resolve(result);
2559
+ }
2560
+ };
2561
+ this.send_ExecuteStatement(req);
2562
+ return _defer.promise;
2563
+ } else {
2564
+ this._reqs[this.seqid()] = callback;
2565
+ this.send_ExecuteStatement(req);
2566
+ }
2567
+ };
2568
+
2569
+ TCLIServiceClient.prototype.send_ExecuteStatement = function(req) {
2570
+ var output = new this.pClass(this.output);
2571
+ var params = {
2572
+ req: req
2573
+ };
2574
+ var args = new TCLIService_ExecuteStatement_args(params);
2575
+ try {
2576
+ output.writeMessageBegin('ExecuteStatement', Thrift.MessageType.CALL, this.seqid());
2577
+ args.write(output);
2578
+ output.writeMessageEnd();
2579
+ return this.output.flush();
2580
+ }
2581
+ catch (e) {
2582
+ delete this._reqs[this.seqid()];
2583
+ if (typeof output.reset === 'function') {
2584
+ output.reset();
2585
+ }
2586
+ throw e;
2587
+ }
2588
+ };
2589
+
2590
+ TCLIServiceClient.prototype.recv_ExecuteStatement = function(input,mtype,rseqid) {
2591
+ var callback = this._reqs[rseqid] || function() {};
2592
+ delete this._reqs[rseqid];
2593
+ if (mtype == Thrift.MessageType.EXCEPTION) {
2594
+ var x = new Thrift.TApplicationException();
2595
+ x.read(input);
2596
+ input.readMessageEnd();
2597
+ return callback(x);
2598
+ }
2599
+ var result = new TCLIService_ExecuteStatement_result();
2600
+ result.read(input);
2601
+ input.readMessageEnd();
2602
+
2603
+ if (null !== result.success) {
2604
+ return callback(null, result.success);
2605
+ }
2606
+ return callback('ExecuteStatement failed: unknown result');
2607
+ };
2608
+
2609
+ TCLIServiceClient.prototype.GetTypeInfo = function(req, callback) {
2610
+ this._seqid = this.new_seqid();
2611
+ if (callback === undefined) {
2612
+ var _defer = Q.defer();
2613
+ this._reqs[this.seqid()] = function(error, result) {
2614
+ if (error) {
2615
+ _defer.reject(error);
2616
+ } else {
2617
+ _defer.resolve(result);
2618
+ }
2619
+ };
2620
+ this.send_GetTypeInfo(req);
2621
+ return _defer.promise;
2622
+ } else {
2623
+ this._reqs[this.seqid()] = callback;
2624
+ this.send_GetTypeInfo(req);
2625
+ }
2626
+ };
2627
+
2628
+ TCLIServiceClient.prototype.send_GetTypeInfo = function(req) {
2629
+ var output = new this.pClass(this.output);
2630
+ var params = {
2631
+ req: req
2632
+ };
2633
+ var args = new TCLIService_GetTypeInfo_args(params);
2634
+ try {
2635
+ output.writeMessageBegin('GetTypeInfo', Thrift.MessageType.CALL, this.seqid());
2636
+ args.write(output);
2637
+ output.writeMessageEnd();
2638
+ return this.output.flush();
2639
+ }
2640
+ catch (e) {
2641
+ delete this._reqs[this.seqid()];
2642
+ if (typeof output.reset === 'function') {
2643
+ output.reset();
2644
+ }
2645
+ throw e;
2646
+ }
2647
+ };
2648
+
2649
+ TCLIServiceClient.prototype.recv_GetTypeInfo = function(input,mtype,rseqid) {
2650
+ var callback = this._reqs[rseqid] || function() {};
2651
+ delete this._reqs[rseqid];
2652
+ if (mtype == Thrift.MessageType.EXCEPTION) {
2653
+ var x = new Thrift.TApplicationException();
2654
+ x.read(input);
2655
+ input.readMessageEnd();
2656
+ return callback(x);
2657
+ }
2658
+ var result = new TCLIService_GetTypeInfo_result();
2659
+ result.read(input);
2660
+ input.readMessageEnd();
2661
+
2662
+ if (null !== result.success) {
2663
+ return callback(null, result.success);
2664
+ }
2665
+ return callback('GetTypeInfo failed: unknown result');
2666
+ };
2667
+
2668
+ TCLIServiceClient.prototype.GetCatalogs = function(req, callback) {
2669
+ this._seqid = this.new_seqid();
2670
+ if (callback === undefined) {
2671
+ var _defer = Q.defer();
2672
+ this._reqs[this.seqid()] = function(error, result) {
2673
+ if (error) {
2674
+ _defer.reject(error);
2675
+ } else {
2676
+ _defer.resolve(result);
2677
+ }
2678
+ };
2679
+ this.send_GetCatalogs(req);
2680
+ return _defer.promise;
2681
+ } else {
2682
+ this._reqs[this.seqid()] = callback;
2683
+ this.send_GetCatalogs(req);
2684
+ }
2685
+ };
2686
+
2687
+ TCLIServiceClient.prototype.send_GetCatalogs = function(req) {
2688
+ var output = new this.pClass(this.output);
2689
+ var params = {
2690
+ req: req
2691
+ };
2692
+ var args = new TCLIService_GetCatalogs_args(params);
2693
+ try {
2694
+ output.writeMessageBegin('GetCatalogs', Thrift.MessageType.CALL, this.seqid());
2695
+ args.write(output);
2696
+ output.writeMessageEnd();
2697
+ return this.output.flush();
2698
+ }
2699
+ catch (e) {
2700
+ delete this._reqs[this.seqid()];
2701
+ if (typeof output.reset === 'function') {
2702
+ output.reset();
2703
+ }
2704
+ throw e;
2705
+ }
2706
+ };
2707
+
2708
+ TCLIServiceClient.prototype.recv_GetCatalogs = function(input,mtype,rseqid) {
2709
+ var callback = this._reqs[rseqid] || function() {};
2710
+ delete this._reqs[rseqid];
2711
+ if (mtype == Thrift.MessageType.EXCEPTION) {
2712
+ var x = new Thrift.TApplicationException();
2713
+ x.read(input);
2714
+ input.readMessageEnd();
2715
+ return callback(x);
2716
+ }
2717
+ var result = new TCLIService_GetCatalogs_result();
2718
+ result.read(input);
2719
+ input.readMessageEnd();
2720
+
2721
+ if (null !== result.success) {
2722
+ return callback(null, result.success);
2723
+ }
2724
+ return callback('GetCatalogs failed: unknown result');
2725
+ };
2726
+
2727
+ TCLIServiceClient.prototype.GetSchemas = function(req, callback) {
2728
+ this._seqid = this.new_seqid();
2729
+ if (callback === undefined) {
2730
+ var _defer = Q.defer();
2731
+ this._reqs[this.seqid()] = function(error, result) {
2732
+ if (error) {
2733
+ _defer.reject(error);
2734
+ } else {
2735
+ _defer.resolve(result);
2736
+ }
2737
+ };
2738
+ this.send_GetSchemas(req);
2739
+ return _defer.promise;
2740
+ } else {
2741
+ this._reqs[this.seqid()] = callback;
2742
+ this.send_GetSchemas(req);
2743
+ }
2744
+ };
2745
+
2746
+ TCLIServiceClient.prototype.send_GetSchemas = function(req) {
2747
+ var output = new this.pClass(this.output);
2748
+ var params = {
2749
+ req: req
2750
+ };
2751
+ var args = new TCLIService_GetSchemas_args(params);
2752
+ try {
2753
+ output.writeMessageBegin('GetSchemas', Thrift.MessageType.CALL, this.seqid());
2754
+ args.write(output);
2755
+ output.writeMessageEnd();
2756
+ return this.output.flush();
2757
+ }
2758
+ catch (e) {
2759
+ delete this._reqs[this.seqid()];
2760
+ if (typeof output.reset === 'function') {
2761
+ output.reset();
2762
+ }
2763
+ throw e;
2764
+ }
2765
+ };
2766
+
2767
+ TCLIServiceClient.prototype.recv_GetSchemas = function(input,mtype,rseqid) {
2768
+ var callback = this._reqs[rseqid] || function() {};
2769
+ delete this._reqs[rseqid];
2770
+ if (mtype == Thrift.MessageType.EXCEPTION) {
2771
+ var x = new Thrift.TApplicationException();
2772
+ x.read(input);
2773
+ input.readMessageEnd();
2774
+ return callback(x);
2775
+ }
2776
+ var result = new TCLIService_GetSchemas_result();
2777
+ result.read(input);
2778
+ input.readMessageEnd();
2779
+
2780
+ if (null !== result.success) {
2781
+ return callback(null, result.success);
2782
+ }
2783
+ return callback('GetSchemas failed: unknown result');
2784
+ };
2785
+
2786
+ TCLIServiceClient.prototype.GetTables = function(req, callback) {
2787
+ this._seqid = this.new_seqid();
2788
+ if (callback === undefined) {
2789
+ var _defer = Q.defer();
2790
+ this._reqs[this.seqid()] = function(error, result) {
2791
+ if (error) {
2792
+ _defer.reject(error);
2793
+ } else {
2794
+ _defer.resolve(result);
2795
+ }
2796
+ };
2797
+ this.send_GetTables(req);
2798
+ return _defer.promise;
2799
+ } else {
2800
+ this._reqs[this.seqid()] = callback;
2801
+ this.send_GetTables(req);
2802
+ }
2803
+ };
2804
+
2805
+ TCLIServiceClient.prototype.send_GetTables = function(req) {
2806
+ var output = new this.pClass(this.output);
2807
+ var params = {
2808
+ req: req
2809
+ };
2810
+ var args = new TCLIService_GetTables_args(params);
2811
+ try {
2812
+ output.writeMessageBegin('GetTables', Thrift.MessageType.CALL, this.seqid());
2813
+ args.write(output);
2814
+ output.writeMessageEnd();
2815
+ return this.output.flush();
2816
+ }
2817
+ catch (e) {
2818
+ delete this._reqs[this.seqid()];
2819
+ if (typeof output.reset === 'function') {
2820
+ output.reset();
2821
+ }
2822
+ throw e;
2823
+ }
2824
+ };
2825
+
2826
+ TCLIServiceClient.prototype.recv_GetTables = function(input,mtype,rseqid) {
2827
+ var callback = this._reqs[rseqid] || function() {};
2828
+ delete this._reqs[rseqid];
2829
+ if (mtype == Thrift.MessageType.EXCEPTION) {
2830
+ var x = new Thrift.TApplicationException();
2831
+ x.read(input);
2832
+ input.readMessageEnd();
2833
+ return callback(x);
2834
+ }
2835
+ var result = new TCLIService_GetTables_result();
2836
+ result.read(input);
2837
+ input.readMessageEnd();
2838
+
2839
+ if (null !== result.success) {
2840
+ return callback(null, result.success);
2841
+ }
2842
+ return callback('GetTables failed: unknown result');
2843
+ };
2844
+
2845
+ TCLIServiceClient.prototype.GetTableTypes = function(req, callback) {
2846
+ this._seqid = this.new_seqid();
2847
+ if (callback === undefined) {
2848
+ var _defer = Q.defer();
2849
+ this._reqs[this.seqid()] = function(error, result) {
2850
+ if (error) {
2851
+ _defer.reject(error);
2852
+ } else {
2853
+ _defer.resolve(result);
2854
+ }
2855
+ };
2856
+ this.send_GetTableTypes(req);
2857
+ return _defer.promise;
2858
+ } else {
2859
+ this._reqs[this.seqid()] = callback;
2860
+ this.send_GetTableTypes(req);
2861
+ }
2862
+ };
2863
+
2864
+ TCLIServiceClient.prototype.send_GetTableTypes = function(req) {
2865
+ var output = new this.pClass(this.output);
2866
+ var params = {
2867
+ req: req
2868
+ };
2869
+ var args = new TCLIService_GetTableTypes_args(params);
2870
+ try {
2871
+ output.writeMessageBegin('GetTableTypes', Thrift.MessageType.CALL, this.seqid());
2872
+ args.write(output);
2873
+ output.writeMessageEnd();
2874
+ return this.output.flush();
2875
+ }
2876
+ catch (e) {
2877
+ delete this._reqs[this.seqid()];
2878
+ if (typeof output.reset === 'function') {
2879
+ output.reset();
2880
+ }
2881
+ throw e;
2882
+ }
2883
+ };
2884
+
2885
+ TCLIServiceClient.prototype.recv_GetTableTypes = function(input,mtype,rseqid) {
2886
+ var callback = this._reqs[rseqid] || function() {};
2887
+ delete this._reqs[rseqid];
2888
+ if (mtype == Thrift.MessageType.EXCEPTION) {
2889
+ var x = new Thrift.TApplicationException();
2890
+ x.read(input);
2891
+ input.readMessageEnd();
2892
+ return callback(x);
2893
+ }
2894
+ var result = new TCLIService_GetTableTypes_result();
2895
+ result.read(input);
2896
+ input.readMessageEnd();
2897
+
2898
+ if (null !== result.success) {
2899
+ return callback(null, result.success);
2900
+ }
2901
+ return callback('GetTableTypes failed: unknown result');
2902
+ };
2903
+
2904
+ TCLIServiceClient.prototype.GetColumns = function(req, callback) {
2905
+ this._seqid = this.new_seqid();
2906
+ if (callback === undefined) {
2907
+ var _defer = Q.defer();
2908
+ this._reqs[this.seqid()] = function(error, result) {
2909
+ if (error) {
2910
+ _defer.reject(error);
2911
+ } else {
2912
+ _defer.resolve(result);
2913
+ }
2914
+ };
2915
+ this.send_GetColumns(req);
2916
+ return _defer.promise;
2917
+ } else {
2918
+ this._reqs[this.seqid()] = callback;
2919
+ this.send_GetColumns(req);
2920
+ }
2921
+ };
2922
+
2923
+ TCLIServiceClient.prototype.send_GetColumns = function(req) {
2924
+ var output = new this.pClass(this.output);
2925
+ var params = {
2926
+ req: req
2927
+ };
2928
+ var args = new TCLIService_GetColumns_args(params);
2929
+ try {
2930
+ output.writeMessageBegin('GetColumns', Thrift.MessageType.CALL, this.seqid());
2931
+ args.write(output);
2932
+ output.writeMessageEnd();
2933
+ return this.output.flush();
2934
+ }
2935
+ catch (e) {
2936
+ delete this._reqs[this.seqid()];
2937
+ if (typeof output.reset === 'function') {
2938
+ output.reset();
2939
+ }
2940
+ throw e;
2941
+ }
2942
+ };
2943
+
2944
+ TCLIServiceClient.prototype.recv_GetColumns = function(input,mtype,rseqid) {
2945
+ var callback = this._reqs[rseqid] || function() {};
2946
+ delete this._reqs[rseqid];
2947
+ if (mtype == Thrift.MessageType.EXCEPTION) {
2948
+ var x = new Thrift.TApplicationException();
2949
+ x.read(input);
2950
+ input.readMessageEnd();
2951
+ return callback(x);
2952
+ }
2953
+ var result = new TCLIService_GetColumns_result();
2954
+ result.read(input);
2955
+ input.readMessageEnd();
2956
+
2957
+ if (null !== result.success) {
2958
+ return callback(null, result.success);
2959
+ }
2960
+ return callback('GetColumns failed: unknown result');
2961
+ };
2962
+
2963
+ TCLIServiceClient.prototype.GetFunctions = function(req, callback) {
2964
+ this._seqid = this.new_seqid();
2965
+ if (callback === undefined) {
2966
+ var _defer = Q.defer();
2967
+ this._reqs[this.seqid()] = function(error, result) {
2968
+ if (error) {
2969
+ _defer.reject(error);
2970
+ } else {
2971
+ _defer.resolve(result);
2972
+ }
2973
+ };
2974
+ this.send_GetFunctions(req);
2975
+ return _defer.promise;
2976
+ } else {
2977
+ this._reqs[this.seqid()] = callback;
2978
+ this.send_GetFunctions(req);
2979
+ }
2980
+ };
2981
+
2982
+ TCLIServiceClient.prototype.send_GetFunctions = function(req) {
2983
+ var output = new this.pClass(this.output);
2984
+ var params = {
2985
+ req: req
2986
+ };
2987
+ var args = new TCLIService_GetFunctions_args(params);
2988
+ try {
2989
+ output.writeMessageBegin('GetFunctions', Thrift.MessageType.CALL, this.seqid());
2990
+ args.write(output);
2991
+ output.writeMessageEnd();
2992
+ return this.output.flush();
2993
+ }
2994
+ catch (e) {
2995
+ delete this._reqs[this.seqid()];
2996
+ if (typeof output.reset === 'function') {
2997
+ output.reset();
2998
+ }
2999
+ throw e;
3000
+ }
3001
+ };
3002
+
3003
+ TCLIServiceClient.prototype.recv_GetFunctions = function(input,mtype,rseqid) {
3004
+ var callback = this._reqs[rseqid] || function() {};
3005
+ delete this._reqs[rseqid];
3006
+ if (mtype == Thrift.MessageType.EXCEPTION) {
3007
+ var x = new Thrift.TApplicationException();
3008
+ x.read(input);
3009
+ input.readMessageEnd();
3010
+ return callback(x);
3011
+ }
3012
+ var result = new TCLIService_GetFunctions_result();
3013
+ result.read(input);
3014
+ input.readMessageEnd();
3015
+
3016
+ if (null !== result.success) {
3017
+ return callback(null, result.success);
3018
+ }
3019
+ return callback('GetFunctions failed: unknown result');
3020
+ };
3021
+
3022
+ TCLIServiceClient.prototype.GetPrimaryKeys = function(req, callback) {
3023
+ this._seqid = this.new_seqid();
3024
+ if (callback === undefined) {
3025
+ var _defer = Q.defer();
3026
+ this._reqs[this.seqid()] = function(error, result) {
3027
+ if (error) {
3028
+ _defer.reject(error);
3029
+ } else {
3030
+ _defer.resolve(result);
3031
+ }
3032
+ };
3033
+ this.send_GetPrimaryKeys(req);
3034
+ return _defer.promise;
3035
+ } else {
3036
+ this._reqs[this.seqid()] = callback;
3037
+ this.send_GetPrimaryKeys(req);
3038
+ }
3039
+ };
3040
+
3041
+ TCLIServiceClient.prototype.send_GetPrimaryKeys = function(req) {
3042
+ var output = new this.pClass(this.output);
3043
+ var params = {
3044
+ req: req
3045
+ };
3046
+ var args = new TCLIService_GetPrimaryKeys_args(params);
3047
+ try {
3048
+ output.writeMessageBegin('GetPrimaryKeys', Thrift.MessageType.CALL, this.seqid());
3049
+ args.write(output);
3050
+ output.writeMessageEnd();
3051
+ return this.output.flush();
3052
+ }
3053
+ catch (e) {
3054
+ delete this._reqs[this.seqid()];
3055
+ if (typeof output.reset === 'function') {
3056
+ output.reset();
3057
+ }
3058
+ throw e;
3059
+ }
3060
+ };
3061
+
3062
+ TCLIServiceClient.prototype.recv_GetPrimaryKeys = function(input,mtype,rseqid) {
3063
+ var callback = this._reqs[rseqid] || function() {};
3064
+ delete this._reqs[rseqid];
3065
+ if (mtype == Thrift.MessageType.EXCEPTION) {
3066
+ var x = new Thrift.TApplicationException();
3067
+ x.read(input);
3068
+ input.readMessageEnd();
3069
+ return callback(x);
3070
+ }
3071
+ var result = new TCLIService_GetPrimaryKeys_result();
3072
+ result.read(input);
3073
+ input.readMessageEnd();
3074
+
3075
+ if (null !== result.success) {
3076
+ return callback(null, result.success);
3077
+ }
3078
+ return callback('GetPrimaryKeys failed: unknown result');
3079
+ };
3080
+
3081
+ TCLIServiceClient.prototype.GetCrossReference = function(req, callback) {
3082
+ this._seqid = this.new_seqid();
3083
+ if (callback === undefined) {
3084
+ var _defer = Q.defer();
3085
+ this._reqs[this.seqid()] = function(error, result) {
3086
+ if (error) {
3087
+ _defer.reject(error);
3088
+ } else {
3089
+ _defer.resolve(result);
3090
+ }
3091
+ };
3092
+ this.send_GetCrossReference(req);
3093
+ return _defer.promise;
3094
+ } else {
3095
+ this._reqs[this.seqid()] = callback;
3096
+ this.send_GetCrossReference(req);
3097
+ }
3098
+ };
3099
+
3100
+ TCLIServiceClient.prototype.send_GetCrossReference = function(req) {
3101
+ var output = new this.pClass(this.output);
3102
+ var params = {
3103
+ req: req
3104
+ };
3105
+ var args = new TCLIService_GetCrossReference_args(params);
3106
+ try {
3107
+ output.writeMessageBegin('GetCrossReference', Thrift.MessageType.CALL, this.seqid());
3108
+ args.write(output);
3109
+ output.writeMessageEnd();
3110
+ return this.output.flush();
3111
+ }
3112
+ catch (e) {
3113
+ delete this._reqs[this.seqid()];
3114
+ if (typeof output.reset === 'function') {
3115
+ output.reset();
3116
+ }
3117
+ throw e;
3118
+ }
3119
+ };
3120
+
3121
+ TCLIServiceClient.prototype.recv_GetCrossReference = function(input,mtype,rseqid) {
3122
+ var callback = this._reqs[rseqid] || function() {};
3123
+ delete this._reqs[rseqid];
3124
+ if (mtype == Thrift.MessageType.EXCEPTION) {
3125
+ var x = new Thrift.TApplicationException();
3126
+ x.read(input);
3127
+ input.readMessageEnd();
3128
+ return callback(x);
3129
+ }
3130
+ var result = new TCLIService_GetCrossReference_result();
3131
+ result.read(input);
3132
+ input.readMessageEnd();
3133
+
3134
+ if (null !== result.success) {
3135
+ return callback(null, result.success);
3136
+ }
3137
+ return callback('GetCrossReference failed: unknown result');
3138
+ };
3139
+
3140
+ TCLIServiceClient.prototype.GetOperationStatus = function(req, callback) {
3141
+ this._seqid = this.new_seqid();
3142
+ if (callback === undefined) {
3143
+ var _defer = Q.defer();
3144
+ this._reqs[this.seqid()] = function(error, result) {
3145
+ if (error) {
3146
+ _defer.reject(error);
3147
+ } else {
3148
+ _defer.resolve(result);
3149
+ }
3150
+ };
3151
+ this.send_GetOperationStatus(req);
3152
+ return _defer.promise;
3153
+ } else {
3154
+ this._reqs[this.seqid()] = callback;
3155
+ this.send_GetOperationStatus(req);
3156
+ }
3157
+ };
3158
+
3159
+ TCLIServiceClient.prototype.send_GetOperationStatus = function(req) {
3160
+ var output = new this.pClass(this.output);
3161
+ var params = {
3162
+ req: req
3163
+ };
3164
+ var args = new TCLIService_GetOperationStatus_args(params);
3165
+ try {
3166
+ output.writeMessageBegin('GetOperationStatus', Thrift.MessageType.CALL, this.seqid());
3167
+ args.write(output);
3168
+ output.writeMessageEnd();
3169
+ return this.output.flush();
3170
+ }
3171
+ catch (e) {
3172
+ delete this._reqs[this.seqid()];
3173
+ if (typeof output.reset === 'function') {
3174
+ output.reset();
3175
+ }
3176
+ throw e;
3177
+ }
3178
+ };
3179
+
3180
+ TCLIServiceClient.prototype.recv_GetOperationStatus = function(input,mtype,rseqid) {
3181
+ var callback = this._reqs[rseqid] || function() {};
3182
+ delete this._reqs[rseqid];
3183
+ if (mtype == Thrift.MessageType.EXCEPTION) {
3184
+ var x = new Thrift.TApplicationException();
3185
+ x.read(input);
3186
+ input.readMessageEnd();
3187
+ return callback(x);
3188
+ }
3189
+ var result = new TCLIService_GetOperationStatus_result();
3190
+ result.read(input);
3191
+ input.readMessageEnd();
3192
+
3193
+ if (null !== result.success) {
3194
+ return callback(null, result.success);
3195
+ }
3196
+ return callback('GetOperationStatus failed: unknown result');
3197
+ };
3198
+
3199
+ TCLIServiceClient.prototype.CancelOperation = function(req, callback) {
3200
+ this._seqid = this.new_seqid();
3201
+ if (callback === undefined) {
3202
+ var _defer = Q.defer();
3203
+ this._reqs[this.seqid()] = function(error, result) {
3204
+ if (error) {
3205
+ _defer.reject(error);
3206
+ } else {
3207
+ _defer.resolve(result);
3208
+ }
3209
+ };
3210
+ this.send_CancelOperation(req);
3211
+ return _defer.promise;
3212
+ } else {
3213
+ this._reqs[this.seqid()] = callback;
3214
+ this.send_CancelOperation(req);
3215
+ }
3216
+ };
3217
+
3218
+ TCLIServiceClient.prototype.send_CancelOperation = function(req) {
3219
+ var output = new this.pClass(this.output);
3220
+ var params = {
3221
+ req: req
3222
+ };
3223
+ var args = new TCLIService_CancelOperation_args(params);
3224
+ try {
3225
+ output.writeMessageBegin('CancelOperation', Thrift.MessageType.CALL, this.seqid());
3226
+ args.write(output);
3227
+ output.writeMessageEnd();
3228
+ return this.output.flush();
3229
+ }
3230
+ catch (e) {
3231
+ delete this._reqs[this.seqid()];
3232
+ if (typeof output.reset === 'function') {
3233
+ output.reset();
3234
+ }
3235
+ throw e;
3236
+ }
3237
+ };
3238
+
3239
+ TCLIServiceClient.prototype.recv_CancelOperation = function(input,mtype,rseqid) {
3240
+ var callback = this._reqs[rseqid] || function() {};
3241
+ delete this._reqs[rseqid];
3242
+ if (mtype == Thrift.MessageType.EXCEPTION) {
3243
+ var x = new Thrift.TApplicationException();
3244
+ x.read(input);
3245
+ input.readMessageEnd();
3246
+ return callback(x);
3247
+ }
3248
+ var result = new TCLIService_CancelOperation_result();
3249
+ result.read(input);
3250
+ input.readMessageEnd();
3251
+
3252
+ if (null !== result.success) {
3253
+ return callback(null, result.success);
3254
+ }
3255
+ return callback('CancelOperation failed: unknown result');
3256
+ };
3257
+
3258
+ TCLIServiceClient.prototype.CloseOperation = function(req, callback) {
3259
+ this._seqid = this.new_seqid();
3260
+ if (callback === undefined) {
3261
+ var _defer = Q.defer();
3262
+ this._reqs[this.seqid()] = function(error, result) {
3263
+ if (error) {
3264
+ _defer.reject(error);
3265
+ } else {
3266
+ _defer.resolve(result);
3267
+ }
3268
+ };
3269
+ this.send_CloseOperation(req);
3270
+ return _defer.promise;
3271
+ } else {
3272
+ this._reqs[this.seqid()] = callback;
3273
+ this.send_CloseOperation(req);
3274
+ }
3275
+ };
3276
+
3277
+ TCLIServiceClient.prototype.send_CloseOperation = function(req) {
3278
+ var output = new this.pClass(this.output);
3279
+ var params = {
3280
+ req: req
3281
+ };
3282
+ var args = new TCLIService_CloseOperation_args(params);
3283
+ try {
3284
+ output.writeMessageBegin('CloseOperation', Thrift.MessageType.CALL, this.seqid());
3285
+ args.write(output);
3286
+ output.writeMessageEnd();
3287
+ return this.output.flush();
3288
+ }
3289
+ catch (e) {
3290
+ delete this._reqs[this.seqid()];
3291
+ if (typeof output.reset === 'function') {
3292
+ output.reset();
3293
+ }
3294
+ throw e;
3295
+ }
3296
+ };
3297
+
3298
+ TCLIServiceClient.prototype.recv_CloseOperation = function(input,mtype,rseqid) {
3299
+ var callback = this._reqs[rseqid] || function() {};
3300
+ delete this._reqs[rseqid];
3301
+ if (mtype == Thrift.MessageType.EXCEPTION) {
3302
+ var x = new Thrift.TApplicationException();
3303
+ x.read(input);
3304
+ input.readMessageEnd();
3305
+ return callback(x);
3306
+ }
3307
+ var result = new TCLIService_CloseOperation_result();
3308
+ result.read(input);
3309
+ input.readMessageEnd();
3310
+
3311
+ if (null !== result.success) {
3312
+ return callback(null, result.success);
3313
+ }
3314
+ return callback('CloseOperation failed: unknown result');
3315
+ };
3316
+
3317
+ TCLIServiceClient.prototype.GetResultSetMetadata = function(req, callback) {
3318
+ this._seqid = this.new_seqid();
3319
+ if (callback === undefined) {
3320
+ var _defer = Q.defer();
3321
+ this._reqs[this.seqid()] = function(error, result) {
3322
+ if (error) {
3323
+ _defer.reject(error);
3324
+ } else {
3325
+ _defer.resolve(result);
3326
+ }
3327
+ };
3328
+ this.send_GetResultSetMetadata(req);
3329
+ return _defer.promise;
3330
+ } else {
3331
+ this._reqs[this.seqid()] = callback;
3332
+ this.send_GetResultSetMetadata(req);
3333
+ }
3334
+ };
3335
+
3336
+ TCLIServiceClient.prototype.send_GetResultSetMetadata = function(req) {
3337
+ var output = new this.pClass(this.output);
3338
+ var params = {
3339
+ req: req
3340
+ };
3341
+ var args = new TCLIService_GetResultSetMetadata_args(params);
3342
+ try {
3343
+ output.writeMessageBegin('GetResultSetMetadata', Thrift.MessageType.CALL, this.seqid());
3344
+ args.write(output);
3345
+ output.writeMessageEnd();
3346
+ return this.output.flush();
3347
+ }
3348
+ catch (e) {
3349
+ delete this._reqs[this.seqid()];
3350
+ if (typeof output.reset === 'function') {
3351
+ output.reset();
3352
+ }
3353
+ throw e;
3354
+ }
3355
+ };
3356
+
3357
+ TCLIServiceClient.prototype.recv_GetResultSetMetadata = function(input,mtype,rseqid) {
3358
+ var callback = this._reqs[rseqid] || function() {};
3359
+ delete this._reqs[rseqid];
3360
+ if (mtype == Thrift.MessageType.EXCEPTION) {
3361
+ var x = new Thrift.TApplicationException();
3362
+ x.read(input);
3363
+ input.readMessageEnd();
3364
+ return callback(x);
3365
+ }
3366
+ var result = new TCLIService_GetResultSetMetadata_result();
3367
+ result.read(input);
3368
+ input.readMessageEnd();
3369
+
3370
+ if (null !== result.success) {
3371
+ return callback(null, result.success);
3372
+ }
3373
+ return callback('GetResultSetMetadata failed: unknown result');
3374
+ };
3375
+
3376
+ TCLIServiceClient.prototype.FetchResults = function(req, callback) {
3377
+ this._seqid = this.new_seqid();
3378
+ if (callback === undefined) {
3379
+ var _defer = Q.defer();
3380
+ this._reqs[this.seqid()] = function(error, result) {
3381
+ if (error) {
3382
+ _defer.reject(error);
3383
+ } else {
3384
+ _defer.resolve(result);
3385
+ }
3386
+ };
3387
+ this.send_FetchResults(req);
3388
+ return _defer.promise;
3389
+ } else {
3390
+ this._reqs[this.seqid()] = callback;
3391
+ this.send_FetchResults(req);
3392
+ }
3393
+ };
3394
+
3395
+ TCLIServiceClient.prototype.send_FetchResults = function(req) {
3396
+ var output = new this.pClass(this.output);
3397
+ var params = {
3398
+ req: req
3399
+ };
3400
+ var args = new TCLIService_FetchResults_args(params);
3401
+ try {
3402
+ output.writeMessageBegin('FetchResults', Thrift.MessageType.CALL, this.seqid());
3403
+ args.write(output);
3404
+ output.writeMessageEnd();
3405
+ return this.output.flush();
3406
+ }
3407
+ catch (e) {
3408
+ delete this._reqs[this.seqid()];
3409
+ if (typeof output.reset === 'function') {
3410
+ output.reset();
3411
+ }
3412
+ throw e;
3413
+ }
3414
+ };
3415
+
3416
+ TCLIServiceClient.prototype.recv_FetchResults = function(input,mtype,rseqid) {
3417
+ var callback = this._reqs[rseqid] || function() {};
3418
+ delete this._reqs[rseqid];
3419
+ if (mtype == Thrift.MessageType.EXCEPTION) {
3420
+ var x = new Thrift.TApplicationException();
3421
+ x.read(input);
3422
+ input.readMessageEnd();
3423
+ return callback(x);
3424
+ }
3425
+ var result = new TCLIService_FetchResults_result();
3426
+ result.read(input);
3427
+ input.readMessageEnd();
3428
+
3429
+ if (null !== result.success) {
3430
+ return callback(null, result.success);
3431
+ }
3432
+ return callback('FetchResults failed: unknown result');
3433
+ };
3434
+
3435
+ TCLIServiceClient.prototype.GetDelegationToken = function(req, callback) {
3436
+ this._seqid = this.new_seqid();
3437
+ if (callback === undefined) {
3438
+ var _defer = Q.defer();
3439
+ this._reqs[this.seqid()] = function(error, result) {
3440
+ if (error) {
3441
+ _defer.reject(error);
3442
+ } else {
3443
+ _defer.resolve(result);
3444
+ }
3445
+ };
3446
+ this.send_GetDelegationToken(req);
3447
+ return _defer.promise;
3448
+ } else {
3449
+ this._reqs[this.seqid()] = callback;
3450
+ this.send_GetDelegationToken(req);
3451
+ }
3452
+ };
3453
+
3454
+ TCLIServiceClient.prototype.send_GetDelegationToken = function(req) {
3455
+ var output = new this.pClass(this.output);
3456
+ var params = {
3457
+ req: req
3458
+ };
3459
+ var args = new TCLIService_GetDelegationToken_args(params);
3460
+ try {
3461
+ output.writeMessageBegin('GetDelegationToken', Thrift.MessageType.CALL, this.seqid());
3462
+ args.write(output);
3463
+ output.writeMessageEnd();
3464
+ return this.output.flush();
3465
+ }
3466
+ catch (e) {
3467
+ delete this._reqs[this.seqid()];
3468
+ if (typeof output.reset === 'function') {
3469
+ output.reset();
3470
+ }
3471
+ throw e;
3472
+ }
3473
+ };
3474
+
3475
+ TCLIServiceClient.prototype.recv_GetDelegationToken = function(input,mtype,rseqid) {
3476
+ var callback = this._reqs[rseqid] || function() {};
3477
+ delete this._reqs[rseqid];
3478
+ if (mtype == Thrift.MessageType.EXCEPTION) {
3479
+ var x = new Thrift.TApplicationException();
3480
+ x.read(input);
3481
+ input.readMessageEnd();
3482
+ return callback(x);
3483
+ }
3484
+ var result = new TCLIService_GetDelegationToken_result();
3485
+ result.read(input);
3486
+ input.readMessageEnd();
3487
+
3488
+ if (null !== result.success) {
3489
+ return callback(null, result.success);
3490
+ }
3491
+ return callback('GetDelegationToken failed: unknown result');
3492
+ };
3493
+
3494
+ TCLIServiceClient.prototype.CancelDelegationToken = function(req, callback) {
3495
+ this._seqid = this.new_seqid();
3496
+ if (callback === undefined) {
3497
+ var _defer = Q.defer();
3498
+ this._reqs[this.seqid()] = function(error, result) {
3499
+ if (error) {
3500
+ _defer.reject(error);
3501
+ } else {
3502
+ _defer.resolve(result);
3503
+ }
3504
+ };
3505
+ this.send_CancelDelegationToken(req);
3506
+ return _defer.promise;
3507
+ } else {
3508
+ this._reqs[this.seqid()] = callback;
3509
+ this.send_CancelDelegationToken(req);
3510
+ }
3511
+ };
3512
+
3513
+ TCLIServiceClient.prototype.send_CancelDelegationToken = function(req) {
3514
+ var output = new this.pClass(this.output);
3515
+ var params = {
3516
+ req: req
3517
+ };
3518
+ var args = new TCLIService_CancelDelegationToken_args(params);
3519
+ try {
3520
+ output.writeMessageBegin('CancelDelegationToken', Thrift.MessageType.CALL, this.seqid());
3521
+ args.write(output);
3522
+ output.writeMessageEnd();
3523
+ return this.output.flush();
3524
+ }
3525
+ catch (e) {
3526
+ delete this._reqs[this.seqid()];
3527
+ if (typeof output.reset === 'function') {
3528
+ output.reset();
3529
+ }
3530
+ throw e;
3531
+ }
3532
+ };
3533
+
3534
+ TCLIServiceClient.prototype.recv_CancelDelegationToken = function(input,mtype,rseqid) {
3535
+ var callback = this._reqs[rseqid] || function() {};
3536
+ delete this._reqs[rseqid];
3537
+ if (mtype == Thrift.MessageType.EXCEPTION) {
3538
+ var x = new Thrift.TApplicationException();
3539
+ x.read(input);
3540
+ input.readMessageEnd();
3541
+ return callback(x);
3542
+ }
3543
+ var result = new TCLIService_CancelDelegationToken_result();
3544
+ result.read(input);
3545
+ input.readMessageEnd();
3546
+
3547
+ if (null !== result.success) {
3548
+ return callback(null, result.success);
3549
+ }
3550
+ return callback('CancelDelegationToken failed: unknown result');
3551
+ };
3552
+
3553
+ TCLIServiceClient.prototype.RenewDelegationToken = function(req, callback) {
3554
+ this._seqid = this.new_seqid();
3555
+ if (callback === undefined) {
3556
+ var _defer = Q.defer();
3557
+ this._reqs[this.seqid()] = function(error, result) {
3558
+ if (error) {
3559
+ _defer.reject(error);
3560
+ } else {
3561
+ _defer.resolve(result);
3562
+ }
3563
+ };
3564
+ this.send_RenewDelegationToken(req);
3565
+ return _defer.promise;
3566
+ } else {
3567
+ this._reqs[this.seqid()] = callback;
3568
+ this.send_RenewDelegationToken(req);
3569
+ }
3570
+ };
3571
+
3572
+ TCLIServiceClient.prototype.send_RenewDelegationToken = function(req) {
3573
+ var output = new this.pClass(this.output);
3574
+ var params = {
3575
+ req: req
3576
+ };
3577
+ var args = new TCLIService_RenewDelegationToken_args(params);
3578
+ try {
3579
+ output.writeMessageBegin('RenewDelegationToken', Thrift.MessageType.CALL, this.seqid());
3580
+ args.write(output);
3581
+ output.writeMessageEnd();
3582
+ return this.output.flush();
3583
+ }
3584
+ catch (e) {
3585
+ delete this._reqs[this.seqid()];
3586
+ if (typeof output.reset === 'function') {
3587
+ output.reset();
3588
+ }
3589
+ throw e;
3590
+ }
3591
+ };
3592
+
3593
+ TCLIServiceClient.prototype.recv_RenewDelegationToken = function(input,mtype,rseqid) {
3594
+ var callback = this._reqs[rseqid] || function() {};
3595
+ delete this._reqs[rseqid];
3596
+ if (mtype == Thrift.MessageType.EXCEPTION) {
3597
+ var x = new Thrift.TApplicationException();
3598
+ x.read(input);
3599
+ input.readMessageEnd();
3600
+ return callback(x);
3601
+ }
3602
+ var result = new TCLIService_RenewDelegationToken_result();
3603
+ result.read(input);
3604
+ input.readMessageEnd();
3605
+
3606
+ if (null !== result.success) {
3607
+ return callback(null, result.success);
3608
+ }
3609
+ return callback('RenewDelegationToken failed: unknown result');
3610
+ };
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
+ var TCLIServiceProcessor = exports.Processor = function(handler) {
3730
+ this._handler = handler;
3731
+ };
3732
+ TCLIServiceProcessor.prototype.process = function(input, output) {
3733
+ var r = input.readMessageBegin();
3734
+ if (this['process_' + r.fname]) {
3735
+ return this['process_' + r.fname].call(this, r.rseqid, input, output);
3736
+ } else {
3737
+ input.skip(Thrift.Type.STRUCT);
3738
+ input.readMessageEnd();
3739
+ var x = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN_METHOD, 'Unknown function ' + r.fname);
3740
+ output.writeMessageBegin(r.fname, Thrift.MessageType.EXCEPTION, r.rseqid);
3741
+ x.write(output);
3742
+ output.writeMessageEnd();
3743
+ output.flush();
3744
+ }
3745
+ };
3746
+ TCLIServiceProcessor.prototype.process_OpenSession = function(seqid, input, output) {
3747
+ var args = new TCLIService_OpenSession_args();
3748
+ args.read(input);
3749
+ input.readMessageEnd();
3750
+ if (this._handler.OpenSession.length === 1) {
3751
+ Q.fcall(this._handler.OpenSession.bind(this._handler),
3752
+ args.req
3753
+ ).then(function(result) {
3754
+ var result_obj = new TCLIService_OpenSession_result({success: result});
3755
+ output.writeMessageBegin("OpenSession", Thrift.MessageType.REPLY, seqid);
3756
+ result_obj.write(output);
3757
+ output.writeMessageEnd();
3758
+ output.flush();
3759
+ }).catch(function (err) {
3760
+ var result;
3761
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
3762
+ output.writeMessageBegin("OpenSession", Thrift.MessageType.EXCEPTION, seqid);
3763
+ result.write(output);
3764
+ output.writeMessageEnd();
3765
+ output.flush();
3766
+ });
3767
+ } else {
3768
+ this._handler.OpenSession(args.req, function (err, result) {
3769
+ var result_obj;
3770
+ if ((err === null || typeof err === 'undefined')) {
3771
+ result_obj = new TCLIService_OpenSession_result((err !== null || typeof err === 'undefined') ? err : {success: result});
3772
+ output.writeMessageBegin("OpenSession", Thrift.MessageType.REPLY, seqid);
3773
+ } else {
3774
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
3775
+ output.writeMessageBegin("OpenSession", Thrift.MessageType.EXCEPTION, seqid);
3776
+ }
3777
+ result_obj.write(output);
3778
+ output.writeMessageEnd();
3779
+ output.flush();
3780
+ });
3781
+ }
3782
+ };
3783
+ TCLIServiceProcessor.prototype.process_CloseSession = function(seqid, input, output) {
3784
+ var args = new TCLIService_CloseSession_args();
3785
+ args.read(input);
3786
+ input.readMessageEnd();
3787
+ if (this._handler.CloseSession.length === 1) {
3788
+ Q.fcall(this._handler.CloseSession.bind(this._handler),
3789
+ args.req
3790
+ ).then(function(result) {
3791
+ var result_obj = new TCLIService_CloseSession_result({success: result});
3792
+ output.writeMessageBegin("CloseSession", Thrift.MessageType.REPLY, seqid);
3793
+ result_obj.write(output);
3794
+ output.writeMessageEnd();
3795
+ output.flush();
3796
+ }).catch(function (err) {
3797
+ var result;
3798
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
3799
+ output.writeMessageBegin("CloseSession", Thrift.MessageType.EXCEPTION, seqid);
3800
+ result.write(output);
3801
+ output.writeMessageEnd();
3802
+ output.flush();
3803
+ });
3804
+ } else {
3805
+ this._handler.CloseSession(args.req, function (err, result) {
3806
+ var result_obj;
3807
+ if ((err === null || typeof err === 'undefined')) {
3808
+ result_obj = new TCLIService_CloseSession_result((err !== null || typeof err === 'undefined') ? err : {success: result});
3809
+ output.writeMessageBegin("CloseSession", Thrift.MessageType.REPLY, seqid);
3810
+ } else {
3811
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
3812
+ output.writeMessageBegin("CloseSession", Thrift.MessageType.EXCEPTION, seqid);
3813
+ }
3814
+ result_obj.write(output);
3815
+ output.writeMessageEnd();
3816
+ output.flush();
3817
+ });
3818
+ }
3819
+ };
3820
+ TCLIServiceProcessor.prototype.process_GetInfo = function(seqid, input, output) {
3821
+ var args = new TCLIService_GetInfo_args();
3822
+ args.read(input);
3823
+ input.readMessageEnd();
3824
+ if (this._handler.GetInfo.length === 1) {
3825
+ Q.fcall(this._handler.GetInfo.bind(this._handler),
3826
+ args.req
3827
+ ).then(function(result) {
3828
+ var result_obj = new TCLIService_GetInfo_result({success: result});
3829
+ output.writeMessageBegin("GetInfo", Thrift.MessageType.REPLY, seqid);
3830
+ result_obj.write(output);
3831
+ output.writeMessageEnd();
3832
+ output.flush();
3833
+ }).catch(function (err) {
3834
+ var result;
3835
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
3836
+ output.writeMessageBegin("GetInfo", Thrift.MessageType.EXCEPTION, seqid);
3837
+ result.write(output);
3838
+ output.writeMessageEnd();
3839
+ output.flush();
3840
+ });
3841
+ } else {
3842
+ this._handler.GetInfo(args.req, function (err, result) {
3843
+ var result_obj;
3844
+ if ((err === null || typeof err === 'undefined')) {
3845
+ result_obj = new TCLIService_GetInfo_result((err !== null || typeof err === 'undefined') ? err : {success: result});
3846
+ output.writeMessageBegin("GetInfo", Thrift.MessageType.REPLY, seqid);
3847
+ } else {
3848
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
3849
+ output.writeMessageBegin("GetInfo", Thrift.MessageType.EXCEPTION, seqid);
3850
+ }
3851
+ result_obj.write(output);
3852
+ output.writeMessageEnd();
3853
+ output.flush();
3854
+ });
3855
+ }
3856
+ };
3857
+ TCLIServiceProcessor.prototype.process_ExecuteStatement = function(seqid, input, output) {
3858
+ var args = new TCLIService_ExecuteStatement_args();
3859
+ args.read(input);
3860
+ input.readMessageEnd();
3861
+ if (this._handler.ExecuteStatement.length === 1) {
3862
+ Q.fcall(this._handler.ExecuteStatement.bind(this._handler),
3863
+ args.req
3864
+ ).then(function(result) {
3865
+ var result_obj = new TCLIService_ExecuteStatement_result({success: result});
3866
+ output.writeMessageBegin("ExecuteStatement", Thrift.MessageType.REPLY, seqid);
3867
+ result_obj.write(output);
3868
+ output.writeMessageEnd();
3869
+ output.flush();
3870
+ }).catch(function (err) {
3871
+ var result;
3872
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
3873
+ output.writeMessageBegin("ExecuteStatement", Thrift.MessageType.EXCEPTION, seqid);
3874
+ result.write(output);
3875
+ output.writeMessageEnd();
3876
+ output.flush();
3877
+ });
3878
+ } else {
3879
+ this._handler.ExecuteStatement(args.req, function (err, result) {
3880
+ var result_obj;
3881
+ if ((err === null || typeof err === 'undefined')) {
3882
+ result_obj = new TCLIService_ExecuteStatement_result((err !== null || typeof err === 'undefined') ? err : {success: result});
3883
+ output.writeMessageBegin("ExecuteStatement", Thrift.MessageType.REPLY, seqid);
3884
+ } else {
3885
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
3886
+ output.writeMessageBegin("ExecuteStatement", Thrift.MessageType.EXCEPTION, seqid);
3887
+ }
3888
+ result_obj.write(output);
3889
+ output.writeMessageEnd();
3890
+ output.flush();
3891
+ });
3892
+ }
3893
+ };
3894
+ TCLIServiceProcessor.prototype.process_GetTypeInfo = function(seqid, input, output) {
3895
+ var args = new TCLIService_GetTypeInfo_args();
3896
+ args.read(input);
3897
+ input.readMessageEnd();
3898
+ if (this._handler.GetTypeInfo.length === 1) {
3899
+ Q.fcall(this._handler.GetTypeInfo.bind(this._handler),
3900
+ args.req
3901
+ ).then(function(result) {
3902
+ var result_obj = new TCLIService_GetTypeInfo_result({success: result});
3903
+ output.writeMessageBegin("GetTypeInfo", Thrift.MessageType.REPLY, seqid);
3904
+ result_obj.write(output);
3905
+ output.writeMessageEnd();
3906
+ output.flush();
3907
+ }).catch(function (err) {
3908
+ var result;
3909
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
3910
+ output.writeMessageBegin("GetTypeInfo", Thrift.MessageType.EXCEPTION, seqid);
3911
+ result.write(output);
3912
+ output.writeMessageEnd();
3913
+ output.flush();
3914
+ });
3915
+ } else {
3916
+ this._handler.GetTypeInfo(args.req, function (err, result) {
3917
+ var result_obj;
3918
+ if ((err === null || typeof err === 'undefined')) {
3919
+ result_obj = new TCLIService_GetTypeInfo_result((err !== null || typeof err === 'undefined') ? err : {success: result});
3920
+ output.writeMessageBegin("GetTypeInfo", Thrift.MessageType.REPLY, seqid);
3921
+ } else {
3922
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
3923
+ output.writeMessageBegin("GetTypeInfo", Thrift.MessageType.EXCEPTION, seqid);
3924
+ }
3925
+ result_obj.write(output);
3926
+ output.writeMessageEnd();
3927
+ output.flush();
3928
+ });
3929
+ }
3930
+ };
3931
+ TCLIServiceProcessor.prototype.process_GetCatalogs = function(seqid, input, output) {
3932
+ var args = new TCLIService_GetCatalogs_args();
3933
+ args.read(input);
3934
+ input.readMessageEnd();
3935
+ if (this._handler.GetCatalogs.length === 1) {
3936
+ Q.fcall(this._handler.GetCatalogs.bind(this._handler),
3937
+ args.req
3938
+ ).then(function(result) {
3939
+ var result_obj = new TCLIService_GetCatalogs_result({success: result});
3940
+ output.writeMessageBegin("GetCatalogs", Thrift.MessageType.REPLY, seqid);
3941
+ result_obj.write(output);
3942
+ output.writeMessageEnd();
3943
+ output.flush();
3944
+ }).catch(function (err) {
3945
+ var result;
3946
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
3947
+ output.writeMessageBegin("GetCatalogs", Thrift.MessageType.EXCEPTION, seqid);
3948
+ result.write(output);
3949
+ output.writeMessageEnd();
3950
+ output.flush();
3951
+ });
3952
+ } else {
3953
+ this._handler.GetCatalogs(args.req, function (err, result) {
3954
+ var result_obj;
3955
+ if ((err === null || typeof err === 'undefined')) {
3956
+ result_obj = new TCLIService_GetCatalogs_result((err !== null || typeof err === 'undefined') ? err : {success: result});
3957
+ output.writeMessageBegin("GetCatalogs", Thrift.MessageType.REPLY, seqid);
3958
+ } else {
3959
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
3960
+ output.writeMessageBegin("GetCatalogs", Thrift.MessageType.EXCEPTION, seqid);
3961
+ }
3962
+ result_obj.write(output);
3963
+ output.writeMessageEnd();
3964
+ output.flush();
3965
+ });
3966
+ }
3967
+ };
3968
+ TCLIServiceProcessor.prototype.process_GetSchemas = function(seqid, input, output) {
3969
+ var args = new TCLIService_GetSchemas_args();
3970
+ args.read(input);
3971
+ input.readMessageEnd();
3972
+ if (this._handler.GetSchemas.length === 1) {
3973
+ Q.fcall(this._handler.GetSchemas.bind(this._handler),
3974
+ args.req
3975
+ ).then(function(result) {
3976
+ var result_obj = new TCLIService_GetSchemas_result({success: result});
3977
+ output.writeMessageBegin("GetSchemas", Thrift.MessageType.REPLY, seqid);
3978
+ result_obj.write(output);
3979
+ output.writeMessageEnd();
3980
+ output.flush();
3981
+ }).catch(function (err) {
3982
+ var result;
3983
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
3984
+ output.writeMessageBegin("GetSchemas", Thrift.MessageType.EXCEPTION, seqid);
3985
+ result.write(output);
3986
+ output.writeMessageEnd();
3987
+ output.flush();
3988
+ });
3989
+ } else {
3990
+ this._handler.GetSchemas(args.req, function (err, result) {
3991
+ var result_obj;
3992
+ if ((err === null || typeof err === 'undefined')) {
3993
+ result_obj = new TCLIService_GetSchemas_result((err !== null || typeof err === 'undefined') ? err : {success: result});
3994
+ output.writeMessageBegin("GetSchemas", Thrift.MessageType.REPLY, seqid);
3995
+ } else {
3996
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
3997
+ output.writeMessageBegin("GetSchemas", Thrift.MessageType.EXCEPTION, seqid);
3998
+ }
3999
+ result_obj.write(output);
4000
+ output.writeMessageEnd();
4001
+ output.flush();
4002
+ });
4003
+ }
4004
+ };
4005
+ TCLIServiceProcessor.prototype.process_GetTables = function(seqid, input, output) {
4006
+ var args = new TCLIService_GetTables_args();
4007
+ args.read(input);
4008
+ input.readMessageEnd();
4009
+ if (this._handler.GetTables.length === 1) {
4010
+ Q.fcall(this._handler.GetTables.bind(this._handler),
4011
+ args.req
4012
+ ).then(function(result) {
4013
+ var result_obj = new TCLIService_GetTables_result({success: result});
4014
+ output.writeMessageBegin("GetTables", Thrift.MessageType.REPLY, seqid);
4015
+ result_obj.write(output);
4016
+ output.writeMessageEnd();
4017
+ output.flush();
4018
+ }).catch(function (err) {
4019
+ var result;
4020
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4021
+ output.writeMessageBegin("GetTables", Thrift.MessageType.EXCEPTION, seqid);
4022
+ result.write(output);
4023
+ output.writeMessageEnd();
4024
+ output.flush();
4025
+ });
4026
+ } else {
4027
+ this._handler.GetTables(args.req, function (err, result) {
4028
+ var result_obj;
4029
+ if ((err === null || typeof err === 'undefined')) {
4030
+ result_obj = new TCLIService_GetTables_result((err !== null || typeof err === 'undefined') ? err : {success: result});
4031
+ output.writeMessageBegin("GetTables", Thrift.MessageType.REPLY, seqid);
4032
+ } else {
4033
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4034
+ output.writeMessageBegin("GetTables", Thrift.MessageType.EXCEPTION, seqid);
4035
+ }
4036
+ result_obj.write(output);
4037
+ output.writeMessageEnd();
4038
+ output.flush();
4039
+ });
4040
+ }
4041
+ };
4042
+ TCLIServiceProcessor.prototype.process_GetTableTypes = function(seqid, input, output) {
4043
+ var args = new TCLIService_GetTableTypes_args();
4044
+ args.read(input);
4045
+ input.readMessageEnd();
4046
+ if (this._handler.GetTableTypes.length === 1) {
4047
+ Q.fcall(this._handler.GetTableTypes.bind(this._handler),
4048
+ args.req
4049
+ ).then(function(result) {
4050
+ var result_obj = new TCLIService_GetTableTypes_result({success: result});
4051
+ output.writeMessageBegin("GetTableTypes", Thrift.MessageType.REPLY, seqid);
4052
+ result_obj.write(output);
4053
+ output.writeMessageEnd();
4054
+ output.flush();
4055
+ }).catch(function (err) {
4056
+ var result;
4057
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4058
+ output.writeMessageBegin("GetTableTypes", Thrift.MessageType.EXCEPTION, seqid);
4059
+ result.write(output);
4060
+ output.writeMessageEnd();
4061
+ output.flush();
4062
+ });
4063
+ } else {
4064
+ this._handler.GetTableTypes(args.req, function (err, result) {
4065
+ var result_obj;
4066
+ if ((err === null || typeof err === 'undefined')) {
4067
+ result_obj = new TCLIService_GetTableTypes_result((err !== null || typeof err === 'undefined') ? err : {success: result});
4068
+ output.writeMessageBegin("GetTableTypes", Thrift.MessageType.REPLY, seqid);
4069
+ } else {
4070
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4071
+ output.writeMessageBegin("GetTableTypes", Thrift.MessageType.EXCEPTION, seqid);
4072
+ }
4073
+ result_obj.write(output);
4074
+ output.writeMessageEnd();
4075
+ output.flush();
4076
+ });
4077
+ }
4078
+ };
4079
+ TCLIServiceProcessor.prototype.process_GetColumns = function(seqid, input, output) {
4080
+ var args = new TCLIService_GetColumns_args();
4081
+ args.read(input);
4082
+ input.readMessageEnd();
4083
+ if (this._handler.GetColumns.length === 1) {
4084
+ Q.fcall(this._handler.GetColumns.bind(this._handler),
4085
+ args.req
4086
+ ).then(function(result) {
4087
+ var result_obj = new TCLIService_GetColumns_result({success: result});
4088
+ output.writeMessageBegin("GetColumns", Thrift.MessageType.REPLY, seqid);
4089
+ result_obj.write(output);
4090
+ output.writeMessageEnd();
4091
+ output.flush();
4092
+ }).catch(function (err) {
4093
+ var result;
4094
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4095
+ output.writeMessageBegin("GetColumns", Thrift.MessageType.EXCEPTION, seqid);
4096
+ result.write(output);
4097
+ output.writeMessageEnd();
4098
+ output.flush();
4099
+ });
4100
+ } else {
4101
+ this._handler.GetColumns(args.req, function (err, result) {
4102
+ var result_obj;
4103
+ if ((err === null || typeof err === 'undefined')) {
4104
+ result_obj = new TCLIService_GetColumns_result((err !== null || typeof err === 'undefined') ? err : {success: result});
4105
+ output.writeMessageBegin("GetColumns", Thrift.MessageType.REPLY, seqid);
4106
+ } else {
4107
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4108
+ output.writeMessageBegin("GetColumns", Thrift.MessageType.EXCEPTION, seqid);
4109
+ }
4110
+ result_obj.write(output);
4111
+ output.writeMessageEnd();
4112
+ output.flush();
4113
+ });
4114
+ }
4115
+ };
4116
+ TCLIServiceProcessor.prototype.process_GetFunctions = function(seqid, input, output) {
4117
+ var args = new TCLIService_GetFunctions_args();
4118
+ args.read(input);
4119
+ input.readMessageEnd();
4120
+ if (this._handler.GetFunctions.length === 1) {
4121
+ Q.fcall(this._handler.GetFunctions.bind(this._handler),
4122
+ args.req
4123
+ ).then(function(result) {
4124
+ var result_obj = new TCLIService_GetFunctions_result({success: result});
4125
+ output.writeMessageBegin("GetFunctions", Thrift.MessageType.REPLY, seqid);
4126
+ result_obj.write(output);
4127
+ output.writeMessageEnd();
4128
+ output.flush();
4129
+ }).catch(function (err) {
4130
+ var result;
4131
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4132
+ output.writeMessageBegin("GetFunctions", Thrift.MessageType.EXCEPTION, seqid);
4133
+ result.write(output);
4134
+ output.writeMessageEnd();
4135
+ output.flush();
4136
+ });
4137
+ } else {
4138
+ this._handler.GetFunctions(args.req, function (err, result) {
4139
+ var result_obj;
4140
+ if ((err === null || typeof err === 'undefined')) {
4141
+ result_obj = new TCLIService_GetFunctions_result((err !== null || typeof err === 'undefined') ? err : {success: result});
4142
+ output.writeMessageBegin("GetFunctions", Thrift.MessageType.REPLY, seqid);
4143
+ } else {
4144
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4145
+ output.writeMessageBegin("GetFunctions", Thrift.MessageType.EXCEPTION, seqid);
4146
+ }
4147
+ result_obj.write(output);
4148
+ output.writeMessageEnd();
4149
+ output.flush();
4150
+ });
4151
+ }
4152
+ };
4153
+ TCLIServiceProcessor.prototype.process_GetPrimaryKeys = function(seqid, input, output) {
4154
+ var args = new TCLIService_GetPrimaryKeys_args();
4155
+ args.read(input);
4156
+ input.readMessageEnd();
4157
+ if (this._handler.GetPrimaryKeys.length === 1) {
4158
+ Q.fcall(this._handler.GetPrimaryKeys.bind(this._handler),
4159
+ args.req
4160
+ ).then(function(result) {
4161
+ var result_obj = new TCLIService_GetPrimaryKeys_result({success: result});
4162
+ output.writeMessageBegin("GetPrimaryKeys", Thrift.MessageType.REPLY, seqid);
4163
+ result_obj.write(output);
4164
+ output.writeMessageEnd();
4165
+ output.flush();
4166
+ }).catch(function (err) {
4167
+ var result;
4168
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4169
+ output.writeMessageBegin("GetPrimaryKeys", Thrift.MessageType.EXCEPTION, seqid);
4170
+ result.write(output);
4171
+ output.writeMessageEnd();
4172
+ output.flush();
4173
+ });
4174
+ } else {
4175
+ this._handler.GetPrimaryKeys(args.req, function (err, result) {
4176
+ var result_obj;
4177
+ if ((err === null || typeof err === 'undefined')) {
4178
+ result_obj = new TCLIService_GetPrimaryKeys_result((err !== null || typeof err === 'undefined') ? err : {success: result});
4179
+ output.writeMessageBegin("GetPrimaryKeys", Thrift.MessageType.REPLY, seqid);
4180
+ } else {
4181
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4182
+ output.writeMessageBegin("GetPrimaryKeys", Thrift.MessageType.EXCEPTION, seqid);
4183
+ }
4184
+ result_obj.write(output);
4185
+ output.writeMessageEnd();
4186
+ output.flush();
4187
+ });
4188
+ }
4189
+ };
4190
+ TCLIServiceProcessor.prototype.process_GetCrossReference = function(seqid, input, output) {
4191
+ var args = new TCLIService_GetCrossReference_args();
4192
+ args.read(input);
4193
+ input.readMessageEnd();
4194
+ if (this._handler.GetCrossReference.length === 1) {
4195
+ Q.fcall(this._handler.GetCrossReference.bind(this._handler),
4196
+ args.req
4197
+ ).then(function(result) {
4198
+ var result_obj = new TCLIService_GetCrossReference_result({success: result});
4199
+ output.writeMessageBegin("GetCrossReference", Thrift.MessageType.REPLY, seqid);
4200
+ result_obj.write(output);
4201
+ output.writeMessageEnd();
4202
+ output.flush();
4203
+ }).catch(function (err) {
4204
+ var result;
4205
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4206
+ output.writeMessageBegin("GetCrossReference", Thrift.MessageType.EXCEPTION, seqid);
4207
+ result.write(output);
4208
+ output.writeMessageEnd();
4209
+ output.flush();
4210
+ });
4211
+ } else {
4212
+ this._handler.GetCrossReference(args.req, function (err, result) {
4213
+ var result_obj;
4214
+ if ((err === null || typeof err === 'undefined')) {
4215
+ result_obj = new TCLIService_GetCrossReference_result((err !== null || typeof err === 'undefined') ? err : {success: result});
4216
+ output.writeMessageBegin("GetCrossReference", Thrift.MessageType.REPLY, seqid);
4217
+ } else {
4218
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4219
+ output.writeMessageBegin("GetCrossReference", Thrift.MessageType.EXCEPTION, seqid);
4220
+ }
4221
+ result_obj.write(output);
4222
+ output.writeMessageEnd();
4223
+ output.flush();
4224
+ });
4225
+ }
4226
+ };
4227
+ TCLIServiceProcessor.prototype.process_GetOperationStatus = function(seqid, input, output) {
4228
+ var args = new TCLIService_GetOperationStatus_args();
4229
+ args.read(input);
4230
+ input.readMessageEnd();
4231
+ if (this._handler.GetOperationStatus.length === 1) {
4232
+ Q.fcall(this._handler.GetOperationStatus.bind(this._handler),
4233
+ args.req
4234
+ ).then(function(result) {
4235
+ var result_obj = new TCLIService_GetOperationStatus_result({success: result});
4236
+ output.writeMessageBegin("GetOperationStatus", Thrift.MessageType.REPLY, seqid);
4237
+ result_obj.write(output);
4238
+ output.writeMessageEnd();
4239
+ output.flush();
4240
+ }).catch(function (err) {
4241
+ var result;
4242
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4243
+ output.writeMessageBegin("GetOperationStatus", Thrift.MessageType.EXCEPTION, seqid);
4244
+ result.write(output);
4245
+ output.writeMessageEnd();
4246
+ output.flush();
4247
+ });
4248
+ } else {
4249
+ this._handler.GetOperationStatus(args.req, function (err, result) {
4250
+ var result_obj;
4251
+ if ((err === null || typeof err === 'undefined')) {
4252
+ result_obj = new TCLIService_GetOperationStatus_result((err !== null || typeof err === 'undefined') ? err : {success: result});
4253
+ output.writeMessageBegin("GetOperationStatus", Thrift.MessageType.REPLY, seqid);
4254
+ } else {
4255
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4256
+ output.writeMessageBegin("GetOperationStatus", Thrift.MessageType.EXCEPTION, seqid);
4257
+ }
4258
+ result_obj.write(output);
4259
+ output.writeMessageEnd();
4260
+ output.flush();
4261
+ });
4262
+ }
4263
+ };
4264
+ TCLIServiceProcessor.prototype.process_CancelOperation = function(seqid, input, output) {
4265
+ var args = new TCLIService_CancelOperation_args();
4266
+ args.read(input);
4267
+ input.readMessageEnd();
4268
+ if (this._handler.CancelOperation.length === 1) {
4269
+ Q.fcall(this._handler.CancelOperation.bind(this._handler),
4270
+ args.req
4271
+ ).then(function(result) {
4272
+ var result_obj = new TCLIService_CancelOperation_result({success: result});
4273
+ output.writeMessageBegin("CancelOperation", Thrift.MessageType.REPLY, seqid);
4274
+ result_obj.write(output);
4275
+ output.writeMessageEnd();
4276
+ output.flush();
4277
+ }).catch(function (err) {
4278
+ var result;
4279
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4280
+ output.writeMessageBegin("CancelOperation", Thrift.MessageType.EXCEPTION, seqid);
4281
+ result.write(output);
4282
+ output.writeMessageEnd();
4283
+ output.flush();
4284
+ });
4285
+ } else {
4286
+ this._handler.CancelOperation(args.req, function (err, result) {
4287
+ var result_obj;
4288
+ if ((err === null || typeof err === 'undefined')) {
4289
+ result_obj = new TCLIService_CancelOperation_result((err !== null || typeof err === 'undefined') ? err : {success: result});
4290
+ output.writeMessageBegin("CancelOperation", Thrift.MessageType.REPLY, seqid);
4291
+ } else {
4292
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4293
+ output.writeMessageBegin("CancelOperation", Thrift.MessageType.EXCEPTION, seqid);
4294
+ }
4295
+ result_obj.write(output);
4296
+ output.writeMessageEnd();
4297
+ output.flush();
4298
+ });
4299
+ }
4300
+ };
4301
+ TCLIServiceProcessor.prototype.process_CloseOperation = function(seqid, input, output) {
4302
+ var args = new TCLIService_CloseOperation_args();
4303
+ args.read(input);
4304
+ input.readMessageEnd();
4305
+ if (this._handler.CloseOperation.length === 1) {
4306
+ Q.fcall(this._handler.CloseOperation.bind(this._handler),
4307
+ args.req
4308
+ ).then(function(result) {
4309
+ var result_obj = new TCLIService_CloseOperation_result({success: result});
4310
+ output.writeMessageBegin("CloseOperation", Thrift.MessageType.REPLY, seqid);
4311
+ result_obj.write(output);
4312
+ output.writeMessageEnd();
4313
+ output.flush();
4314
+ }).catch(function (err) {
4315
+ var result;
4316
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4317
+ output.writeMessageBegin("CloseOperation", Thrift.MessageType.EXCEPTION, seqid);
4318
+ result.write(output);
4319
+ output.writeMessageEnd();
4320
+ output.flush();
4321
+ });
4322
+ } else {
4323
+ this._handler.CloseOperation(args.req, function (err, result) {
4324
+ var result_obj;
4325
+ if ((err === null || typeof err === 'undefined')) {
4326
+ result_obj = new TCLIService_CloseOperation_result((err !== null || typeof err === 'undefined') ? err : {success: result});
4327
+ output.writeMessageBegin("CloseOperation", Thrift.MessageType.REPLY, seqid);
4328
+ } else {
4329
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4330
+ output.writeMessageBegin("CloseOperation", Thrift.MessageType.EXCEPTION, seqid);
4331
+ }
4332
+ result_obj.write(output);
4333
+ output.writeMessageEnd();
4334
+ output.flush();
4335
+ });
4336
+ }
4337
+ };
4338
+ TCLIServiceProcessor.prototype.process_GetResultSetMetadata = function(seqid, input, output) {
4339
+ var args = new TCLIService_GetResultSetMetadata_args();
4340
+ args.read(input);
4341
+ input.readMessageEnd();
4342
+ if (this._handler.GetResultSetMetadata.length === 1) {
4343
+ Q.fcall(this._handler.GetResultSetMetadata.bind(this._handler),
4344
+ args.req
4345
+ ).then(function(result) {
4346
+ var result_obj = new TCLIService_GetResultSetMetadata_result({success: result});
4347
+ output.writeMessageBegin("GetResultSetMetadata", Thrift.MessageType.REPLY, seqid);
4348
+ result_obj.write(output);
4349
+ output.writeMessageEnd();
4350
+ output.flush();
4351
+ }).catch(function (err) {
4352
+ var result;
4353
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4354
+ output.writeMessageBegin("GetResultSetMetadata", Thrift.MessageType.EXCEPTION, seqid);
4355
+ result.write(output);
4356
+ output.writeMessageEnd();
4357
+ output.flush();
4358
+ });
4359
+ } else {
4360
+ this._handler.GetResultSetMetadata(args.req, function (err, result) {
4361
+ var result_obj;
4362
+ if ((err === null || typeof err === 'undefined')) {
4363
+ result_obj = new TCLIService_GetResultSetMetadata_result((err !== null || typeof err === 'undefined') ? err : {success: result});
4364
+ output.writeMessageBegin("GetResultSetMetadata", Thrift.MessageType.REPLY, seqid);
4365
+ } else {
4366
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4367
+ output.writeMessageBegin("GetResultSetMetadata", Thrift.MessageType.EXCEPTION, seqid);
4368
+ }
4369
+ result_obj.write(output);
4370
+ output.writeMessageEnd();
4371
+ output.flush();
4372
+ });
4373
+ }
4374
+ };
4375
+ TCLIServiceProcessor.prototype.process_FetchResults = function(seqid, input, output) {
4376
+ var args = new TCLIService_FetchResults_args();
4377
+ args.read(input);
4378
+ input.readMessageEnd();
4379
+ if (this._handler.FetchResults.length === 1) {
4380
+ Q.fcall(this._handler.FetchResults.bind(this._handler),
4381
+ args.req
4382
+ ).then(function(result) {
4383
+ var result_obj = new TCLIService_FetchResults_result({success: result});
4384
+ output.writeMessageBegin("FetchResults", Thrift.MessageType.REPLY, seqid);
4385
+ result_obj.write(output);
4386
+ output.writeMessageEnd();
4387
+ output.flush();
4388
+ }).catch(function (err) {
4389
+ var result;
4390
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4391
+ output.writeMessageBegin("FetchResults", Thrift.MessageType.EXCEPTION, seqid);
4392
+ result.write(output);
4393
+ output.writeMessageEnd();
4394
+ output.flush();
4395
+ });
4396
+ } else {
4397
+ this._handler.FetchResults(args.req, function (err, result) {
4398
+ var result_obj;
4399
+ if ((err === null || typeof err === 'undefined')) {
4400
+ result_obj = new TCLIService_FetchResults_result((err !== null || typeof err === 'undefined') ? err : {success: result});
4401
+ output.writeMessageBegin("FetchResults", Thrift.MessageType.REPLY, seqid);
4402
+ } else {
4403
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4404
+ output.writeMessageBegin("FetchResults", Thrift.MessageType.EXCEPTION, seqid);
4405
+ }
4406
+ result_obj.write(output);
4407
+ output.writeMessageEnd();
4408
+ output.flush();
4409
+ });
4410
+ }
4411
+ };
4412
+ TCLIServiceProcessor.prototype.process_GetDelegationToken = function(seqid, input, output) {
4413
+ var args = new TCLIService_GetDelegationToken_args();
4414
+ args.read(input);
4415
+ input.readMessageEnd();
4416
+ if (this._handler.GetDelegationToken.length === 1) {
4417
+ Q.fcall(this._handler.GetDelegationToken.bind(this._handler),
4418
+ args.req
4419
+ ).then(function(result) {
4420
+ var result_obj = new TCLIService_GetDelegationToken_result({success: result});
4421
+ output.writeMessageBegin("GetDelegationToken", Thrift.MessageType.REPLY, seqid);
4422
+ result_obj.write(output);
4423
+ output.writeMessageEnd();
4424
+ output.flush();
4425
+ }).catch(function (err) {
4426
+ var result;
4427
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4428
+ output.writeMessageBegin("GetDelegationToken", Thrift.MessageType.EXCEPTION, seqid);
4429
+ result.write(output);
4430
+ output.writeMessageEnd();
4431
+ output.flush();
4432
+ });
4433
+ } else {
4434
+ this._handler.GetDelegationToken(args.req, function (err, result) {
4435
+ var result_obj;
4436
+ if ((err === null || typeof err === 'undefined')) {
4437
+ result_obj = new TCLIService_GetDelegationToken_result((err !== null || typeof err === 'undefined') ? err : {success: result});
4438
+ output.writeMessageBegin("GetDelegationToken", Thrift.MessageType.REPLY, seqid);
4439
+ } else {
4440
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4441
+ output.writeMessageBegin("GetDelegationToken", Thrift.MessageType.EXCEPTION, seqid);
4442
+ }
4443
+ result_obj.write(output);
4444
+ output.writeMessageEnd();
4445
+ output.flush();
4446
+ });
4447
+ }
4448
+ };
4449
+ TCLIServiceProcessor.prototype.process_CancelDelegationToken = function(seqid, input, output) {
4450
+ var args = new TCLIService_CancelDelegationToken_args();
4451
+ args.read(input);
4452
+ input.readMessageEnd();
4453
+ if (this._handler.CancelDelegationToken.length === 1) {
4454
+ Q.fcall(this._handler.CancelDelegationToken.bind(this._handler),
4455
+ args.req
4456
+ ).then(function(result) {
4457
+ var result_obj = new TCLIService_CancelDelegationToken_result({success: result});
4458
+ output.writeMessageBegin("CancelDelegationToken", Thrift.MessageType.REPLY, seqid);
4459
+ result_obj.write(output);
4460
+ output.writeMessageEnd();
4461
+ output.flush();
4462
+ }).catch(function (err) {
4463
+ var result;
4464
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4465
+ output.writeMessageBegin("CancelDelegationToken", Thrift.MessageType.EXCEPTION, seqid);
4466
+ result.write(output);
4467
+ output.writeMessageEnd();
4468
+ output.flush();
4469
+ });
4470
+ } else {
4471
+ this._handler.CancelDelegationToken(args.req, function (err, result) {
4472
+ var result_obj;
4473
+ if ((err === null || typeof err === 'undefined')) {
4474
+ result_obj = new TCLIService_CancelDelegationToken_result((err !== null || typeof err === 'undefined') ? err : {success: result});
4475
+ output.writeMessageBegin("CancelDelegationToken", Thrift.MessageType.REPLY, seqid);
4476
+ } else {
4477
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4478
+ output.writeMessageBegin("CancelDelegationToken", Thrift.MessageType.EXCEPTION, seqid);
4479
+ }
4480
+ result_obj.write(output);
4481
+ output.writeMessageEnd();
4482
+ output.flush();
4483
+ });
4484
+ }
4485
+ };
4486
+ TCLIServiceProcessor.prototype.process_RenewDelegationToken = function(seqid, input, output) {
4487
+ var args = new TCLIService_RenewDelegationToken_args();
4488
+ args.read(input);
4489
+ input.readMessageEnd();
4490
+ if (this._handler.RenewDelegationToken.length === 1) {
4491
+ Q.fcall(this._handler.RenewDelegationToken.bind(this._handler),
4492
+ args.req
4493
+ ).then(function(result) {
4494
+ var result_obj = new TCLIService_RenewDelegationToken_result({success: result});
4495
+ output.writeMessageBegin("RenewDelegationToken", Thrift.MessageType.REPLY, seqid);
4496
+ result_obj.write(output);
4497
+ output.writeMessageEnd();
4498
+ output.flush();
4499
+ }).catch(function (err) {
4500
+ var result;
4501
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4502
+ output.writeMessageBegin("RenewDelegationToken", Thrift.MessageType.EXCEPTION, seqid);
4503
+ result.write(output);
4504
+ output.writeMessageEnd();
4505
+ output.flush();
4506
+ });
4507
+ } else {
4508
+ this._handler.RenewDelegationToken(args.req, function (err, result) {
4509
+ var result_obj;
4510
+ if ((err === null || typeof err === 'undefined')) {
4511
+ result_obj = new TCLIService_RenewDelegationToken_result((err !== null || typeof err === 'undefined') ? err : {success: result});
4512
+ output.writeMessageBegin("RenewDelegationToken", Thrift.MessageType.REPLY, seqid);
4513
+ } else {
4514
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
4515
+ output.writeMessageBegin("RenewDelegationToken", Thrift.MessageType.EXCEPTION, seqid);
4516
+ }
4517
+ result_obj.write(output);
4518
+ output.writeMessageEnd();
4519
+ output.flush();
4520
+ });
4521
+ }
4522
+ };
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
+ };