From bec6d7b7bf3f6eafd7abafad9f189c165d0c44a4 Mon Sep 17 00:00:00 2001 From: nithinkdb Date: Wed, 16 Aug 2023 16:15:25 -0700 Subject: [PATCH 1/2] Updated thrift files --- thrift/TCLIService.d.ts | 295 ++-- thrift/TCLIService.js | 2474 +++++++++++---------------------- thrift/TCLIService_types.d.ts | 1093 ++++++++------- thrift/TCLIService_types.js | 2259 +++++++++++++++++------------- 4 files changed, 2785 insertions(+), 3336 deletions(-) diff --git a/thrift/TCLIService.d.ts b/thrift/TCLIService.d.ts index 0efb76b2..fdffa2d0 100644 --- a/thrift/TCLIService.d.ts +++ b/thrift/TCLIService.d.ts @@ -4,210 +4,99 @@ // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING // -import thrift = require('thrift'); -import Thrift = thrift.Thrift; -import Q = thrift.Q; import Int64 = require('node-int64'); -import ttypes = require('./TCLIService_types'); -import TProtocolVersion = ttypes.TProtocolVersion -import TTypeId = ttypes.TTypeId -import TSparkRowSetType = ttypes.TSparkRowSetType -import TDBSqlCompressionCodec = ttypes.TDBSqlCompressionCodec -import TDBSqlArrowLayout = ttypes.TDBSqlArrowLayout -import TOperationIdempotencyType = ttypes.TOperationIdempotencyType -import TOperationTimeoutLevel = ttypes.TOperationTimeoutLevel -import TStatusCode = ttypes.TStatusCode -import TOperationState = ttypes.TOperationState -import TOperationType = ttypes.TOperationType -import TGetInfoType = ttypes.TGetInfoType -import TResultPersistenceMode = ttypes.TResultPersistenceMode -import TCacheLookupResult = ttypes.TCacheLookupResult -import TCloudFetchDisabledReason = ttypes.TCloudFetchDisabledReason -import TDBSqlManifestFileFormat = ttypes.TDBSqlManifestFileFormat -import TFetchOrientation = ttypes.TFetchOrientation -import TDBSqlFetchDisposition = ttypes.TDBSqlFetchDisposition -import TJobExecutionStatus = ttypes.TJobExecutionStatus -import PRIMITIVE_TYPES = ttypes.PRIMITIVE_TYPES -import COMPLEX_TYPES = ttypes.COMPLEX_TYPES -import COLLECTION_TYPES = ttypes.COLLECTION_TYPES -import TYPE_NAMES = ttypes.TYPE_NAMES -import CHARACTER_MAXIMUM_LENGTH = ttypes.CHARACTER_MAXIMUM_LENGTH -import PRECISION = ttypes.PRECISION -import SCALE = ttypes.SCALE -import TTypeQualifierValue = ttypes.TTypeQualifierValue -import TTypeQualifiers = ttypes.TTypeQualifiers -import TPrimitiveTypeEntry = ttypes.TPrimitiveTypeEntry -import TArrayTypeEntry = ttypes.TArrayTypeEntry -import TMapTypeEntry = ttypes.TMapTypeEntry -import TStructTypeEntry = ttypes.TStructTypeEntry -import TUnionTypeEntry = ttypes.TUnionTypeEntry -import TUserDefinedTypeEntry = ttypes.TUserDefinedTypeEntry -import TTypeEntry = ttypes.TTypeEntry -import TTypeDesc = ttypes.TTypeDesc -import TColumnDesc = ttypes.TColumnDesc -import TTableSchema = ttypes.TTableSchema -import TBoolValue = ttypes.TBoolValue -import TByteValue = ttypes.TByteValue -import TI16Value = ttypes.TI16Value -import TI32Value = ttypes.TI32Value -import TI64Value = ttypes.TI64Value -import TDoubleValue = ttypes.TDoubleValue -import TStringValue = ttypes.TStringValue -import TColumnValue = ttypes.TColumnValue -import TRow = ttypes.TRow -import TBoolColumn = ttypes.TBoolColumn -import TByteColumn = ttypes.TByteColumn -import TI16Column = ttypes.TI16Column -import TI32Column = ttypes.TI32Column -import TI64Column = ttypes.TI64Column -import TDoubleColumn = ttypes.TDoubleColumn -import TStringColumn = ttypes.TStringColumn -import TBinaryColumn = ttypes.TBinaryColumn -import TColumn = ttypes.TColumn -import TDBSqlJsonArrayFormat = ttypes.TDBSqlJsonArrayFormat -import TDBSqlCsvFormat = ttypes.TDBSqlCsvFormat -import TDBSqlArrowFormat = ttypes.TDBSqlArrowFormat -import TDBSqlResultFormat = ttypes.TDBSqlResultFormat -import TSparkArrowBatch = ttypes.TSparkArrowBatch -import TSparkArrowResultLink = ttypes.TSparkArrowResultLink -import TDBSqlCloudResultFile = ttypes.TDBSqlCloudResultFile -import TRowSet = ttypes.TRowSet -import TDBSqlTempView = ttypes.TDBSqlTempView -import TDBSqlSessionCapabilities = ttypes.TDBSqlSessionCapabilities -import TExpressionInfo = ttypes.TExpressionInfo -import TDBSqlConfValue = ttypes.TDBSqlConfValue -import TDBSqlSessionConf = ttypes.TDBSqlSessionConf -import TStatus = ttypes.TStatus -import TNamespace = ttypes.TNamespace -import THandleIdentifier = ttypes.THandleIdentifier -import TSessionHandle = ttypes.TSessionHandle -import TOperationHandle = ttypes.TOperationHandle -import TOpenSessionReq = ttypes.TOpenSessionReq -import TOpenSessionResp = ttypes.TOpenSessionResp -import TCloseSessionReq = ttypes.TCloseSessionReq -import TCloseSessionResp = ttypes.TCloseSessionResp -import TGetInfoValue = ttypes.TGetInfoValue -import TGetInfoReq = ttypes.TGetInfoReq -import TGetInfoResp = ttypes.TGetInfoResp -import TSparkGetDirectResults = ttypes.TSparkGetDirectResults -import TSparkDirectResults = ttypes.TSparkDirectResults -import TSparkArrowTypes = ttypes.TSparkArrowTypes -import TExecuteStatementReq = ttypes.TExecuteStatementReq -import TDBSqlStatement = ttypes.TDBSqlStatement -import TSparkParameterValue = ttypes.TSparkParameterValue -import TSparkParameter = ttypes.TSparkParameter -import TExecuteStatementResp = ttypes.TExecuteStatementResp -import TGetTypeInfoReq = ttypes.TGetTypeInfoReq -import TGetTypeInfoResp = ttypes.TGetTypeInfoResp -import TGetCatalogsReq = ttypes.TGetCatalogsReq -import TGetCatalogsResp = ttypes.TGetCatalogsResp -import TGetSchemasReq = ttypes.TGetSchemasReq -import TGetSchemasResp = ttypes.TGetSchemasResp -import TGetTablesReq = ttypes.TGetTablesReq -import TGetTablesResp = ttypes.TGetTablesResp -import TGetTableTypesReq = ttypes.TGetTableTypesReq -import TGetTableTypesResp = ttypes.TGetTableTypesResp -import TGetColumnsReq = ttypes.TGetColumnsReq -import TGetColumnsResp = ttypes.TGetColumnsResp -import TGetFunctionsReq = ttypes.TGetFunctionsReq -import TGetFunctionsResp = ttypes.TGetFunctionsResp -import TGetPrimaryKeysReq = ttypes.TGetPrimaryKeysReq -import TGetPrimaryKeysResp = ttypes.TGetPrimaryKeysResp -import TGetCrossReferenceReq = ttypes.TGetCrossReferenceReq -import TGetCrossReferenceResp = ttypes.TGetCrossReferenceResp -import TGetOperationStatusReq = ttypes.TGetOperationStatusReq -import TGetOperationStatusResp = ttypes.TGetOperationStatusResp -import TCancelOperationReq = ttypes.TCancelOperationReq -import TCancelOperationResp = ttypes.TCancelOperationResp -import TCloseOperationReq = ttypes.TCloseOperationReq -import TCloseOperationResp = ttypes.TCloseOperationResp -import TGetResultSetMetadataReq = ttypes.TGetResultSetMetadataReq -import TGetResultSetMetadataResp = ttypes.TGetResultSetMetadataResp -import TFetchResultsReq = ttypes.TFetchResultsReq -import TFetchResultsResp = ttypes.TFetchResultsResp -import TGetDelegationTokenReq = ttypes.TGetDelegationTokenReq -import TGetDelegationTokenResp = ttypes.TGetDelegationTokenResp -import TCancelDelegationTokenReq = ttypes.TCancelDelegationTokenReq -import TCancelDelegationTokenResp = ttypes.TCancelDelegationTokenResp -import TRenewDelegationTokenReq = ttypes.TRenewDelegationTokenReq -import TRenewDelegationTokenResp = ttypes.TRenewDelegationTokenResp -import TProgressUpdateResp = ttypes.TProgressUpdateResp - -declare class Client { - private output: thrift.TTransport; - private pClass: thrift.TProtocol; - private _seqid: number; - - constructor(output: thrift.TTransport, pClass: { new(trans: thrift.TTransport): thrift.TProtocol }); - - OpenSession(req: TOpenSessionReq, callback?: (error: void, response: TOpenSessionResp)=>void): void; - - CloseSession(req: TCloseSessionReq, callback?: (error: void, response: TCloseSessionResp)=>void): void; - - GetInfo(req: TGetInfoReq, callback?: (error: void, response: TGetInfoResp)=>void): void; - - ExecuteStatement(req: TExecuteStatementReq, callback?: (error: void, response: TExecuteStatementResp)=>void): void; - - GetTypeInfo(req: TGetTypeInfoReq, callback?: (error: void, response: TGetTypeInfoResp)=>void): void; - - GetCatalogs(req: TGetCatalogsReq, callback?: (error: void, response: TGetCatalogsResp)=>void): void; - - GetSchemas(req: TGetSchemasReq, callback?: (error: void, response: TGetSchemasResp)=>void): void; - - GetTables(req: TGetTablesReq, callback?: (error: void, response: TGetTablesResp)=>void): void; - - GetTableTypes(req: TGetTableTypesReq, callback?: (error: void, response: TGetTableTypesResp)=>void): void; - - GetColumns(req: TGetColumnsReq, callback?: (error: void, response: TGetColumnsResp)=>void): void; - - GetFunctions(req: TGetFunctionsReq, callback?: (error: void, response: TGetFunctionsResp)=>void): void; - - GetPrimaryKeys(req: TGetPrimaryKeysReq, callback?: (error: void, response: TGetPrimaryKeysResp)=>void): void; - - GetCrossReference(req: TGetCrossReferenceReq, callback?: (error: void, response: TGetCrossReferenceResp)=>void): void; - - GetOperationStatus(req: TGetOperationStatusReq, callback?: (error: void, response: TGetOperationStatusResp)=>void): void; - - CancelOperation(req: TCancelOperationReq, callback?: (error: void, response: TCancelOperationResp)=>void): void; - - CloseOperation(req: TCloseOperationReq, callback?: (error: void, response: TCloseOperationResp)=>void): void; - - GetResultSetMetadata(req: TGetResultSetMetadataReq, callback?: (error: void, response: TGetResultSetMetadataResp)=>void): void; - - FetchResults(req: TFetchResultsReq, callback?: (error: void, response: TFetchResultsResp)=>void): void; - - GetDelegationToken(req: TGetDelegationTokenReq, callback?: (error: void, response: TGetDelegationTokenResp)=>void): void; - - CancelDelegationToken(req: TCancelDelegationTokenReq, callback?: (error: void, response: TCancelDelegationTokenResp)=>void): void; - - RenewDelegationToken(req: TRenewDelegationTokenReq, callback?: (error: void, response: TRenewDelegationTokenResp)=>void): void; -} +import { TCLIService } from "./TCLIService_types"; + + +export declare class TCLIServiceClient { + input: Thrift.TJSONProtocol; + output: Thrift.TJSONProtocol; + seqid: number; + + constructor(input: Thrift.TJSONProtocol, output?: Thrift.TJSONProtocol); + + OpenSession(req: TOpenSessionReq): TOpenSessionResp; + + OpenSession(req: TOpenSessionReq, callback?: (data: TOpenSessionResp)=>void): void; + + CloseSession(req: TCloseSessionReq): TCloseSessionResp; + + CloseSession(req: TCloseSessionReq, callback?: (data: TCloseSessionResp)=>void): void; + + GetInfo(req: TGetInfoReq): TGetInfoResp; + + GetInfo(req: TGetInfoReq, callback?: (data: TGetInfoResp)=>void): void; + + ExecuteStatement(req: TExecuteStatementReq): TExecuteStatementResp; + + ExecuteStatement(req: TExecuteStatementReq, callback?: (data: TExecuteStatementResp)=>void): void; + + GetTypeInfo(req: TGetTypeInfoReq): TGetTypeInfoResp; + + GetTypeInfo(req: TGetTypeInfoReq, callback?: (data: TGetTypeInfoResp)=>void): void; + + GetCatalogs(req: TGetCatalogsReq): TGetCatalogsResp; + + GetCatalogs(req: TGetCatalogsReq, callback?: (data: TGetCatalogsResp)=>void): void; + + GetSchemas(req: TGetSchemasReq): TGetSchemasResp; + + GetSchemas(req: TGetSchemasReq, callback?: (data: TGetSchemasResp)=>void): void; + + GetTables(req: TGetTablesReq): TGetTablesResp; + + GetTables(req: TGetTablesReq, callback?: (data: TGetTablesResp)=>void): void; + + GetTableTypes(req: TGetTableTypesReq): TGetTableTypesResp; + + GetTableTypes(req: TGetTableTypesReq, callback?: (data: TGetTableTypesResp)=>void): void; + + GetColumns(req: TGetColumnsReq): TGetColumnsResp; + + GetColumns(req: TGetColumnsReq, callback?: (data: TGetColumnsResp)=>void): void; + + GetFunctions(req: TGetFunctionsReq): TGetFunctionsResp; + + GetFunctions(req: TGetFunctionsReq, callback?: (data: TGetFunctionsResp)=>void): void; + + GetPrimaryKeys(req: TGetPrimaryKeysReq): TGetPrimaryKeysResp; + + GetPrimaryKeys(req: TGetPrimaryKeysReq, callback?: (data: TGetPrimaryKeysResp)=>void): void; + + GetCrossReference(req: TGetCrossReferenceReq): TGetCrossReferenceResp; + + GetCrossReference(req: TGetCrossReferenceReq, callback?: (data: TGetCrossReferenceResp)=>void): void; + + GetOperationStatus(req: TGetOperationStatusReq): TGetOperationStatusResp; + + GetOperationStatus(req: TGetOperationStatusReq, callback?: (data: TGetOperationStatusResp)=>void): void; + + CancelOperation(req: TCancelOperationReq): TCancelOperationResp; + + CancelOperation(req: TCancelOperationReq, callback?: (data: TCancelOperationResp)=>void): void; + + CloseOperation(req: TCloseOperationReq): TCloseOperationResp; + + CloseOperation(req: TCloseOperationReq, callback?: (data: TCloseOperationResp)=>void): void; + + GetResultSetMetadata(req: TGetResultSetMetadataReq): TGetResultSetMetadataResp; + + GetResultSetMetadata(req: TGetResultSetMetadataReq, callback?: (data: TGetResultSetMetadataResp)=>void): void; + + FetchResults(req: TFetchResultsReq): TFetchResultsResp; + + FetchResults(req: TFetchResultsReq, callback?: (data: TFetchResultsResp)=>void): void; + + GetDelegationToken(req: TGetDelegationTokenReq): TGetDelegationTokenResp; + + GetDelegationToken(req: TGetDelegationTokenReq, callback?: (data: TGetDelegationTokenResp)=>void): void; + + CancelDelegationToken(req: TCancelDelegationTokenReq): TCancelDelegationTokenResp; + + CancelDelegationToken(req: TCancelDelegationTokenReq, callback?: (data: TCancelDelegationTokenResp)=>void): void; + + RenewDelegationToken(req: TRenewDelegationTokenReq): TRenewDelegationTokenResp; -declare class Processor { - private _handler: object; - - constructor(handler: object); - process(input: thrift.TProtocol, output: thrift.TProtocol): void; - process_OpenSession(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; - process_CloseSession(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; - process_GetInfo(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; - process_ExecuteStatement(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; - process_GetTypeInfo(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; - process_GetCatalogs(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; - process_GetSchemas(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; - process_GetTables(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; - process_GetTableTypes(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; - process_GetColumns(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; - process_GetFunctions(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; - process_GetPrimaryKeys(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; - process_GetCrossReference(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; - process_GetOperationStatus(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; - process_CancelOperation(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; - process_CloseOperation(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; - process_GetResultSetMetadata(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; - process_FetchResults(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; - process_GetDelegationToken(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; - process_CancelDelegationToken(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; - process_RenewDelegationToken(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + RenewDelegationToken(req: TRenewDelegationTokenReq, callback?: (data: TRenewDelegationTokenResp)=>void): void; } diff --git a/thrift/TCLIService.js b/thrift/TCLIService.js index f1056839..9371ccce 100644 --- a/thrift/TCLIService.js +++ b/thrift/TCLIService.js @@ -3,22 +3,18 @@ // // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING // -"use strict"; +if (typeof Int64 === 'undefined' && typeof require === 'function') { + var Int64 = require('node-int64'); +} -var thrift = require('thrift'); -var Thrift = thrift.Thrift; -var Q = thrift.Q; -var Int64 = require('node-int64'); - -var ttypes = require('./TCLIService_types'); //HELPER FUNCTIONS AND STRUCTURES -var TCLIService_OpenSession_args = function(args) { +TCLIService_OpenSession_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TOpenSessionReq(args.req); + this.req = new TOpenSessionReq(args.req); } } }; @@ -35,7 +31,7 @@ TCLIService_OpenSession_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TOpenSessionReq(); + this.req = new TOpenSessionReq(); this.req.read(input); } else { input.skip(ftype); @@ -65,11 +61,11 @@ TCLIService_OpenSession_args.prototype.write = function(output) { return; }; -var TCLIService_OpenSession_result = function(args) { +TCLIService_OpenSession_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TOpenSessionResp(args.success); + this.success = new TOpenSessionResp(args.success); } } }; @@ -86,7 +82,7 @@ TCLIService_OpenSession_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TOpenSessionResp(); + this.success = new TOpenSessionResp(); this.success.read(input); } else { input.skip(ftype); @@ -116,11 +112,11 @@ TCLIService_OpenSession_result.prototype.write = function(output) { return; }; -var TCLIService_CloseSession_args = function(args) { +TCLIService_CloseSession_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TCloseSessionReq(args.req); + this.req = new TCloseSessionReq(args.req); } } }; @@ -137,7 +133,7 @@ TCLIService_CloseSession_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TCloseSessionReq(); + this.req = new TCloseSessionReq(); this.req.read(input); } else { input.skip(ftype); @@ -167,11 +163,11 @@ TCLIService_CloseSession_args.prototype.write = function(output) { return; }; -var TCLIService_CloseSession_result = function(args) { +TCLIService_CloseSession_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TCloseSessionResp(args.success); + this.success = new TCloseSessionResp(args.success); } } }; @@ -188,7 +184,7 @@ TCLIService_CloseSession_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TCloseSessionResp(); + this.success = new TCloseSessionResp(); this.success.read(input); } else { input.skip(ftype); @@ -218,11 +214,11 @@ TCLIService_CloseSession_result.prototype.write = function(output) { return; }; -var TCLIService_GetInfo_args = function(args) { +TCLIService_GetInfo_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TGetInfoReq(args.req); + this.req = new TGetInfoReq(args.req); } } }; @@ -239,7 +235,7 @@ TCLIService_GetInfo_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TGetInfoReq(); + this.req = new TGetInfoReq(); this.req.read(input); } else { input.skip(ftype); @@ -269,11 +265,11 @@ TCLIService_GetInfo_args.prototype.write = function(output) { return; }; -var TCLIService_GetInfo_result = function(args) { +TCLIService_GetInfo_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TGetInfoResp(args.success); + this.success = new TGetInfoResp(args.success); } } }; @@ -290,7 +286,7 @@ TCLIService_GetInfo_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TGetInfoResp(); + this.success = new TGetInfoResp(); this.success.read(input); } else { input.skip(ftype); @@ -320,11 +316,11 @@ TCLIService_GetInfo_result.prototype.write = function(output) { return; }; -var TCLIService_ExecuteStatement_args = function(args) { +TCLIService_ExecuteStatement_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TExecuteStatementReq(args.req); + this.req = new TExecuteStatementReq(args.req); } } }; @@ -341,7 +337,7 @@ TCLIService_ExecuteStatement_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TExecuteStatementReq(); + this.req = new TExecuteStatementReq(); this.req.read(input); } else { input.skip(ftype); @@ -371,11 +367,11 @@ TCLIService_ExecuteStatement_args.prototype.write = function(output) { return; }; -var TCLIService_ExecuteStatement_result = function(args) { +TCLIService_ExecuteStatement_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TExecuteStatementResp(args.success); + this.success = new TExecuteStatementResp(args.success); } } }; @@ -392,7 +388,7 @@ TCLIService_ExecuteStatement_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TExecuteStatementResp(); + this.success = new TExecuteStatementResp(); this.success.read(input); } else { input.skip(ftype); @@ -422,11 +418,11 @@ TCLIService_ExecuteStatement_result.prototype.write = function(output) { return; }; -var TCLIService_GetTypeInfo_args = function(args) { +TCLIService_GetTypeInfo_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TGetTypeInfoReq(args.req); + this.req = new TGetTypeInfoReq(args.req); } } }; @@ -443,7 +439,7 @@ TCLIService_GetTypeInfo_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TGetTypeInfoReq(); + this.req = new TGetTypeInfoReq(); this.req.read(input); } else { input.skip(ftype); @@ -473,11 +469,11 @@ TCLIService_GetTypeInfo_args.prototype.write = function(output) { return; }; -var TCLIService_GetTypeInfo_result = function(args) { +TCLIService_GetTypeInfo_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TGetTypeInfoResp(args.success); + this.success = new TGetTypeInfoResp(args.success); } } }; @@ -494,7 +490,7 @@ TCLIService_GetTypeInfo_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TGetTypeInfoResp(); + this.success = new TGetTypeInfoResp(); this.success.read(input); } else { input.skip(ftype); @@ -524,11 +520,11 @@ TCLIService_GetTypeInfo_result.prototype.write = function(output) { return; }; -var TCLIService_GetCatalogs_args = function(args) { +TCLIService_GetCatalogs_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TGetCatalogsReq(args.req); + this.req = new TGetCatalogsReq(args.req); } } }; @@ -545,7 +541,7 @@ TCLIService_GetCatalogs_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TGetCatalogsReq(); + this.req = new TGetCatalogsReq(); this.req.read(input); } else { input.skip(ftype); @@ -575,11 +571,11 @@ TCLIService_GetCatalogs_args.prototype.write = function(output) { return; }; -var TCLIService_GetCatalogs_result = function(args) { +TCLIService_GetCatalogs_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TGetCatalogsResp(args.success); + this.success = new TGetCatalogsResp(args.success); } } }; @@ -596,7 +592,7 @@ TCLIService_GetCatalogs_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TGetCatalogsResp(); + this.success = new TGetCatalogsResp(); this.success.read(input); } else { input.skip(ftype); @@ -626,11 +622,11 @@ TCLIService_GetCatalogs_result.prototype.write = function(output) { return; }; -var TCLIService_GetSchemas_args = function(args) { +TCLIService_GetSchemas_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TGetSchemasReq(args.req); + this.req = new TGetSchemasReq(args.req); } } }; @@ -647,7 +643,7 @@ TCLIService_GetSchemas_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TGetSchemasReq(); + this.req = new TGetSchemasReq(); this.req.read(input); } else { input.skip(ftype); @@ -677,11 +673,11 @@ TCLIService_GetSchemas_args.prototype.write = function(output) { return; }; -var TCLIService_GetSchemas_result = function(args) { +TCLIService_GetSchemas_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TGetSchemasResp(args.success); + this.success = new TGetSchemasResp(args.success); } } }; @@ -698,7 +694,7 @@ TCLIService_GetSchemas_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TGetSchemasResp(); + this.success = new TGetSchemasResp(); this.success.read(input); } else { input.skip(ftype); @@ -728,11 +724,11 @@ TCLIService_GetSchemas_result.prototype.write = function(output) { return; }; -var TCLIService_GetTables_args = function(args) { +TCLIService_GetTables_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TGetTablesReq(args.req); + this.req = new TGetTablesReq(args.req); } } }; @@ -749,7 +745,7 @@ TCLIService_GetTables_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TGetTablesReq(); + this.req = new TGetTablesReq(); this.req.read(input); } else { input.skip(ftype); @@ -779,11 +775,11 @@ TCLIService_GetTables_args.prototype.write = function(output) { return; }; -var TCLIService_GetTables_result = function(args) { +TCLIService_GetTables_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TGetTablesResp(args.success); + this.success = new TGetTablesResp(args.success); } } }; @@ -800,7 +796,7 @@ TCLIService_GetTables_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TGetTablesResp(); + this.success = new TGetTablesResp(); this.success.read(input); } else { input.skip(ftype); @@ -830,11 +826,11 @@ TCLIService_GetTables_result.prototype.write = function(output) { return; }; -var TCLIService_GetTableTypes_args = function(args) { +TCLIService_GetTableTypes_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TGetTableTypesReq(args.req); + this.req = new TGetTableTypesReq(args.req); } } }; @@ -851,7 +847,7 @@ TCLIService_GetTableTypes_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TGetTableTypesReq(); + this.req = new TGetTableTypesReq(); this.req.read(input); } else { input.skip(ftype); @@ -881,11 +877,11 @@ TCLIService_GetTableTypes_args.prototype.write = function(output) { return; }; -var TCLIService_GetTableTypes_result = function(args) { +TCLIService_GetTableTypes_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TGetTableTypesResp(args.success); + this.success = new TGetTableTypesResp(args.success); } } }; @@ -902,7 +898,7 @@ TCLIService_GetTableTypes_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TGetTableTypesResp(); + this.success = new TGetTableTypesResp(); this.success.read(input); } else { input.skip(ftype); @@ -932,11 +928,11 @@ TCLIService_GetTableTypes_result.prototype.write = function(output) { return; }; -var TCLIService_GetColumns_args = function(args) { +TCLIService_GetColumns_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TGetColumnsReq(args.req); + this.req = new TGetColumnsReq(args.req); } } }; @@ -953,7 +949,7 @@ TCLIService_GetColumns_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TGetColumnsReq(); + this.req = new TGetColumnsReq(); this.req.read(input); } else { input.skip(ftype); @@ -983,11 +979,11 @@ TCLIService_GetColumns_args.prototype.write = function(output) { return; }; -var TCLIService_GetColumns_result = function(args) { +TCLIService_GetColumns_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TGetColumnsResp(args.success); + this.success = new TGetColumnsResp(args.success); } } }; @@ -1004,7 +1000,7 @@ TCLIService_GetColumns_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TGetColumnsResp(); + this.success = new TGetColumnsResp(); this.success.read(input); } else { input.skip(ftype); @@ -1034,11 +1030,11 @@ TCLIService_GetColumns_result.prototype.write = function(output) { return; }; -var TCLIService_GetFunctions_args = function(args) { +TCLIService_GetFunctions_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TGetFunctionsReq(args.req); + this.req = new TGetFunctionsReq(args.req); } } }; @@ -1055,7 +1051,7 @@ TCLIService_GetFunctions_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TGetFunctionsReq(); + this.req = new TGetFunctionsReq(); this.req.read(input); } else { input.skip(ftype); @@ -1085,11 +1081,11 @@ TCLIService_GetFunctions_args.prototype.write = function(output) { return; }; -var TCLIService_GetFunctions_result = function(args) { +TCLIService_GetFunctions_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TGetFunctionsResp(args.success); + this.success = new TGetFunctionsResp(args.success); } } }; @@ -1106,7 +1102,7 @@ TCLIService_GetFunctions_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TGetFunctionsResp(); + this.success = new TGetFunctionsResp(); this.success.read(input); } else { input.skip(ftype); @@ -1136,11 +1132,11 @@ TCLIService_GetFunctions_result.prototype.write = function(output) { return; }; -var TCLIService_GetPrimaryKeys_args = function(args) { +TCLIService_GetPrimaryKeys_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TGetPrimaryKeysReq(args.req); + this.req = new TGetPrimaryKeysReq(args.req); } } }; @@ -1157,7 +1153,7 @@ TCLIService_GetPrimaryKeys_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TGetPrimaryKeysReq(); + this.req = new TGetPrimaryKeysReq(); this.req.read(input); } else { input.skip(ftype); @@ -1187,11 +1183,11 @@ TCLIService_GetPrimaryKeys_args.prototype.write = function(output) { return; }; -var TCLIService_GetPrimaryKeys_result = function(args) { +TCLIService_GetPrimaryKeys_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TGetPrimaryKeysResp(args.success); + this.success = new TGetPrimaryKeysResp(args.success); } } }; @@ -1208,7 +1204,7 @@ TCLIService_GetPrimaryKeys_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TGetPrimaryKeysResp(); + this.success = new TGetPrimaryKeysResp(); this.success.read(input); } else { input.skip(ftype); @@ -1238,11 +1234,11 @@ TCLIService_GetPrimaryKeys_result.prototype.write = function(output) { return; }; -var TCLIService_GetCrossReference_args = function(args) { +TCLIService_GetCrossReference_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TGetCrossReferenceReq(args.req); + this.req = new TGetCrossReferenceReq(args.req); } } }; @@ -1259,7 +1255,7 @@ TCLIService_GetCrossReference_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TGetCrossReferenceReq(); + this.req = new TGetCrossReferenceReq(); this.req.read(input); } else { input.skip(ftype); @@ -1289,11 +1285,11 @@ TCLIService_GetCrossReference_args.prototype.write = function(output) { return; }; -var TCLIService_GetCrossReference_result = function(args) { +TCLIService_GetCrossReference_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TGetCrossReferenceResp(args.success); + this.success = new TGetCrossReferenceResp(args.success); } } }; @@ -1310,7 +1306,7 @@ TCLIService_GetCrossReference_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TGetCrossReferenceResp(); + this.success = new TGetCrossReferenceResp(); this.success.read(input); } else { input.skip(ftype); @@ -1340,11 +1336,11 @@ TCLIService_GetCrossReference_result.prototype.write = function(output) { return; }; -var TCLIService_GetOperationStatus_args = function(args) { +TCLIService_GetOperationStatus_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TGetOperationStatusReq(args.req); + this.req = new TGetOperationStatusReq(args.req); } } }; @@ -1361,7 +1357,7 @@ TCLIService_GetOperationStatus_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TGetOperationStatusReq(); + this.req = new TGetOperationStatusReq(); this.req.read(input); } else { input.skip(ftype); @@ -1391,11 +1387,11 @@ TCLIService_GetOperationStatus_args.prototype.write = function(output) { return; }; -var TCLIService_GetOperationStatus_result = function(args) { +TCLIService_GetOperationStatus_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TGetOperationStatusResp(args.success); + this.success = new TGetOperationStatusResp(args.success); } } }; @@ -1412,7 +1408,7 @@ TCLIService_GetOperationStatus_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TGetOperationStatusResp(); + this.success = new TGetOperationStatusResp(); this.success.read(input); } else { input.skip(ftype); @@ -1442,11 +1438,11 @@ TCLIService_GetOperationStatus_result.prototype.write = function(output) { return; }; -var TCLIService_CancelOperation_args = function(args) { +TCLIService_CancelOperation_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TCancelOperationReq(args.req); + this.req = new TCancelOperationReq(args.req); } } }; @@ -1463,7 +1459,7 @@ TCLIService_CancelOperation_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TCancelOperationReq(); + this.req = new TCancelOperationReq(); this.req.read(input); } else { input.skip(ftype); @@ -1493,11 +1489,11 @@ TCLIService_CancelOperation_args.prototype.write = function(output) { return; }; -var TCLIService_CancelOperation_result = function(args) { +TCLIService_CancelOperation_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TCancelOperationResp(args.success); + this.success = new TCancelOperationResp(args.success); } } }; @@ -1514,7 +1510,7 @@ TCLIService_CancelOperation_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TCancelOperationResp(); + this.success = new TCancelOperationResp(); this.success.read(input); } else { input.skip(ftype); @@ -1544,11 +1540,11 @@ TCLIService_CancelOperation_result.prototype.write = function(output) { return; }; -var TCLIService_CloseOperation_args = function(args) { +TCLIService_CloseOperation_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TCloseOperationReq(args.req); + this.req = new TCloseOperationReq(args.req); } } }; @@ -1565,7 +1561,7 @@ TCLIService_CloseOperation_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TCloseOperationReq(); + this.req = new TCloseOperationReq(); this.req.read(input); } else { input.skip(ftype); @@ -1595,11 +1591,11 @@ TCLIService_CloseOperation_args.prototype.write = function(output) { return; }; -var TCLIService_CloseOperation_result = function(args) { +TCLIService_CloseOperation_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TCloseOperationResp(args.success); + this.success = new TCloseOperationResp(args.success); } } }; @@ -1616,7 +1612,7 @@ TCLIService_CloseOperation_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TCloseOperationResp(); + this.success = new TCloseOperationResp(); this.success.read(input); } else { input.skip(ftype); @@ -1646,11 +1642,11 @@ TCLIService_CloseOperation_result.prototype.write = function(output) { return; }; -var TCLIService_GetResultSetMetadata_args = function(args) { +TCLIService_GetResultSetMetadata_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TGetResultSetMetadataReq(args.req); + this.req = new TGetResultSetMetadataReq(args.req); } } }; @@ -1667,7 +1663,7 @@ TCLIService_GetResultSetMetadata_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TGetResultSetMetadataReq(); + this.req = new TGetResultSetMetadataReq(); this.req.read(input); } else { input.skip(ftype); @@ -1697,11 +1693,11 @@ TCLIService_GetResultSetMetadata_args.prototype.write = function(output) { return; }; -var TCLIService_GetResultSetMetadata_result = function(args) { +TCLIService_GetResultSetMetadata_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TGetResultSetMetadataResp(args.success); + this.success = new TGetResultSetMetadataResp(args.success); } } }; @@ -1718,7 +1714,7 @@ TCLIService_GetResultSetMetadata_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TGetResultSetMetadataResp(); + this.success = new TGetResultSetMetadataResp(); this.success.read(input); } else { input.skip(ftype); @@ -1748,11 +1744,11 @@ TCLIService_GetResultSetMetadata_result.prototype.write = function(output) { return; }; -var TCLIService_FetchResults_args = function(args) { +TCLIService_FetchResults_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TFetchResultsReq(args.req); + this.req = new TFetchResultsReq(args.req); } } }; @@ -1769,7 +1765,7 @@ TCLIService_FetchResults_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TFetchResultsReq(); + this.req = new TFetchResultsReq(); this.req.read(input); } else { input.skip(ftype); @@ -1799,11 +1795,11 @@ TCLIService_FetchResults_args.prototype.write = function(output) { return; }; -var TCLIService_FetchResults_result = function(args) { +TCLIService_FetchResults_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TFetchResultsResp(args.success); + this.success = new TFetchResultsResp(args.success); } } }; @@ -1820,7 +1816,7 @@ TCLIService_FetchResults_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TFetchResultsResp(); + this.success = new TFetchResultsResp(); this.success.read(input); } else { input.skip(ftype); @@ -1850,11 +1846,11 @@ TCLIService_FetchResults_result.prototype.write = function(output) { return; }; -var TCLIService_GetDelegationToken_args = function(args) { +TCLIService_GetDelegationToken_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TGetDelegationTokenReq(args.req); + this.req = new TGetDelegationTokenReq(args.req); } } }; @@ -1871,7 +1867,7 @@ TCLIService_GetDelegationToken_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TGetDelegationTokenReq(); + this.req = new TGetDelegationTokenReq(); this.req.read(input); } else { input.skip(ftype); @@ -1901,11 +1897,11 @@ TCLIService_GetDelegationToken_args.prototype.write = function(output) { return; }; -var TCLIService_GetDelegationToken_result = function(args) { +TCLIService_GetDelegationToken_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TGetDelegationTokenResp(args.success); + this.success = new TGetDelegationTokenResp(args.success); } } }; @@ -1922,7 +1918,7 @@ TCLIService_GetDelegationToken_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TGetDelegationTokenResp(); + this.success = new TGetDelegationTokenResp(); this.success.read(input); } else { input.skip(ftype); @@ -1952,11 +1948,11 @@ TCLIService_GetDelegationToken_result.prototype.write = function(output) { return; }; -var TCLIService_CancelDelegationToken_args = function(args) { +TCLIService_CancelDelegationToken_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TCancelDelegationTokenReq(args.req); + this.req = new TCancelDelegationTokenReq(args.req); } } }; @@ -1973,7 +1969,7 @@ TCLIService_CancelDelegationToken_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TCancelDelegationTokenReq(); + this.req = new TCancelDelegationTokenReq(); this.req.read(input); } else { input.skip(ftype); @@ -2003,11 +1999,11 @@ TCLIService_CancelDelegationToken_args.prototype.write = function(output) { return; }; -var TCLIService_CancelDelegationToken_result = function(args) { +TCLIService_CancelDelegationToken_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TCancelDelegationTokenResp(args.success); + this.success = new TCancelDelegationTokenResp(args.success); } } }; @@ -2024,7 +2020,7 @@ TCLIService_CancelDelegationToken_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TCancelDelegationTokenResp(); + this.success = new TCancelDelegationTokenResp(); this.success.read(input); } else { input.skip(ftype); @@ -2054,11 +2050,11 @@ TCLIService_CancelDelegationToken_result.prototype.write = function(output) { return; }; -var TCLIService_RenewDelegationToken_args = function(args) { +TCLIService_RenewDelegationToken_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new ttypes.TRenewDelegationTokenReq(args.req); + this.req = new TRenewDelegationTokenReq(args.req); } } }; @@ -2075,7 +2071,7 @@ TCLIService_RenewDelegationToken_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new ttypes.TRenewDelegationTokenReq(); + this.req = new TRenewDelegationTokenReq(); this.req.read(input); } else { input.skip(ftype); @@ -2105,11 +2101,11 @@ TCLIService_RenewDelegationToken_args.prototype.write = function(output) { return; }; -var TCLIService_RenewDelegationToken_result = function(args) { +TCLIService_RenewDelegationToken_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new ttypes.TRenewDelegationTokenResp(args.success); + this.success = new TRenewDelegationTokenResp(args.success); } } }; @@ -2126,7 +2122,7 @@ TCLIService_RenewDelegationToken_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new ttypes.TRenewDelegationTokenResp(); + this.success = new TRenewDelegationTokenResp(); this.success.read(input); } else { input.skip(ftype); @@ -2156,2045 +2152,1227 @@ TCLIService_RenewDelegationToken_result.prototype.write = function(output) { return; }; -var TCLIServiceClient = exports.Client = function(output, pClass) { - this.output = output; - this.pClass = pClass; - this._seqid = 0; - this._reqs = {}; +TCLIServiceClient = function(input, output) { + this.input = input; + this.output = (!output) ? input : output; + this.seqid = 0; }; TCLIServiceClient.prototype = {}; -TCLIServiceClient.prototype.seqid = function() { return this._seqid; }; -TCLIServiceClient.prototype.new_seqid = function() { return this._seqid += 1; }; TCLIServiceClient.prototype.OpenSession = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_OpenSession(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_OpenSession(req); + this.send_OpenSession(req, callback); + if (!callback) { + return this.recv_OpenSession(); } }; -TCLIServiceClient.prototype.send_OpenSession = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_OpenSession = function(req, callback) { var params = { req: req }; var args = new TCLIService_OpenSession_args(params); try { - output.writeMessageBegin('OpenSession', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('OpenSession', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_OpenSession(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_OpenSession = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_OpenSession = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_OpenSession_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); + return result.success; } - return callback('OpenSession failed: unknown result'); + throw 'OpenSession failed: unknown result'; }; TCLIServiceClient.prototype.CloseSession = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_CloseSession(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_CloseSession(req); + this.send_CloseSession(req, callback); + if (!callback) { + return this.recv_CloseSession(); } }; -TCLIServiceClient.prototype.send_CloseSession = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_CloseSession = function(req, callback) { var params = { req: req }; var args = new TCLIService_CloseSession_args(params); try { - output.writeMessageBegin('CloseSession', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('CloseSession', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_CloseSession(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_CloseSession = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_CloseSession = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_CloseSession_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); + return result.success; } - return callback('CloseSession failed: unknown result'); + throw 'CloseSession failed: unknown result'; }; TCLIServiceClient.prototype.GetInfo = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_GetInfo(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_GetInfo(req); + this.send_GetInfo(req, callback); + if (!callback) { + return this.recv_GetInfo(); } }; -TCLIServiceClient.prototype.send_GetInfo = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_GetInfo = function(req, callback) { var params = { req: req }; var args = new TCLIService_GetInfo_args(params); try { - output.writeMessageBegin('GetInfo', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('GetInfo', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_GetInfo(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetInfo = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_GetInfo = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_GetInfo_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); + return result.success; } - return callback('GetInfo failed: unknown result'); + throw 'GetInfo failed: unknown result'; }; TCLIServiceClient.prototype.ExecuteStatement = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_ExecuteStatement(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_ExecuteStatement(req); + this.send_ExecuteStatement(req, callback); + if (!callback) { + return this.recv_ExecuteStatement(); } }; -TCLIServiceClient.prototype.send_ExecuteStatement = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_ExecuteStatement = function(req, callback) { var params = { req: req }; var args = new TCLIService_ExecuteStatement_args(params); try { - output.writeMessageBegin('ExecuteStatement', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('ExecuteStatement', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_ExecuteStatement(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_ExecuteStatement = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_ExecuteStatement = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_ExecuteStatement_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); + return result.success; } - return callback('ExecuteStatement failed: unknown result'); + throw 'ExecuteStatement failed: unknown result'; }; TCLIServiceClient.prototype.GetTypeInfo = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_GetTypeInfo(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_GetTypeInfo(req); + this.send_GetTypeInfo(req, callback); + if (!callback) { + return this.recv_GetTypeInfo(); } }; -TCLIServiceClient.prototype.send_GetTypeInfo = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_GetTypeInfo = function(req, callback) { var params = { req: req }; var args = new TCLIService_GetTypeInfo_args(params); try { - output.writeMessageBegin('GetTypeInfo', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('GetTypeInfo', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_GetTypeInfo(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetTypeInfo = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_GetTypeInfo = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_GetTypeInfo_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); + return result.success; } - return callback('GetTypeInfo failed: unknown result'); + throw 'GetTypeInfo failed: unknown result'; }; TCLIServiceClient.prototype.GetCatalogs = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_GetCatalogs(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_GetCatalogs(req); + this.send_GetCatalogs(req, callback); + if (!callback) { + return this.recv_GetCatalogs(); } }; -TCLIServiceClient.prototype.send_GetCatalogs = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_GetCatalogs = function(req, callback) { var params = { req: req }; var args = new TCLIService_GetCatalogs_args(params); try { - output.writeMessageBegin('GetCatalogs', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('GetCatalogs', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_GetCatalogs(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetCatalogs = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_GetCatalogs = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_GetCatalogs_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); + return result.success; } - return callback('GetCatalogs failed: unknown result'); + throw 'GetCatalogs failed: unknown result'; }; TCLIServiceClient.prototype.GetSchemas = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_GetSchemas(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_GetSchemas(req); + this.send_GetSchemas(req, callback); + if (!callback) { + return this.recv_GetSchemas(); } }; -TCLIServiceClient.prototype.send_GetSchemas = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_GetSchemas = function(req, callback) { var params = { req: req }; var args = new TCLIService_GetSchemas_args(params); try { - output.writeMessageBegin('GetSchemas', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('GetSchemas', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_GetSchemas(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetSchemas = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_GetSchemas = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_GetSchemas_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); + return result.success; } - return callback('GetSchemas failed: unknown result'); + throw 'GetSchemas failed: unknown result'; }; TCLIServiceClient.prototype.GetTables = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_GetTables(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_GetTables(req); + this.send_GetTables(req, callback); + if (!callback) { + return this.recv_GetTables(); } }; -TCLIServiceClient.prototype.send_GetTables = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_GetTables = function(req, callback) { var params = { req: req }; var args = new TCLIService_GetTables_args(params); try { - output.writeMessageBegin('GetTables', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('GetTables', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_GetTables(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetTables = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_GetTables = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_GetTables_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); + return result.success; } - return callback('GetTables failed: unknown result'); + throw 'GetTables failed: unknown result'; }; TCLIServiceClient.prototype.GetTableTypes = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_GetTableTypes(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_GetTableTypes(req); + this.send_GetTableTypes(req, callback); + if (!callback) { + return this.recv_GetTableTypes(); } }; -TCLIServiceClient.prototype.send_GetTableTypes = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_GetTableTypes = function(req, callback) { var params = { req: req }; var args = new TCLIService_GetTableTypes_args(params); try { - output.writeMessageBegin('GetTableTypes', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('GetTableTypes', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_GetTableTypes(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetTableTypes = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_GetTableTypes = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_GetTableTypes_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); + return result.success; } - return callback('GetTableTypes failed: unknown result'); + throw 'GetTableTypes failed: unknown result'; }; TCLIServiceClient.prototype.GetColumns = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_GetColumns(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_GetColumns(req); + this.send_GetColumns(req, callback); + if (!callback) { + return this.recv_GetColumns(); } }; -TCLIServiceClient.prototype.send_GetColumns = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_GetColumns = function(req, callback) { var params = { req: req }; var args = new TCLIService_GetColumns_args(params); try { - output.writeMessageBegin('GetColumns', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('GetColumns', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_GetColumns(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetColumns = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_GetColumns = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_GetColumns_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); + return result.success; } - return callback('GetColumns failed: unknown result'); + throw 'GetColumns failed: unknown result'; }; TCLIServiceClient.prototype.GetFunctions = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_GetFunctions(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_GetFunctions(req); + this.send_GetFunctions(req, callback); + if (!callback) { + return this.recv_GetFunctions(); } }; -TCLIServiceClient.prototype.send_GetFunctions = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_GetFunctions = function(req, callback) { var params = { req: req }; var args = new TCLIService_GetFunctions_args(params); try { - output.writeMessageBegin('GetFunctions', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('GetFunctions', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_GetFunctions(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetFunctions = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_GetFunctions = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_GetFunctions_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); + return result.success; } - return callback('GetFunctions failed: unknown result'); + throw 'GetFunctions failed: unknown result'; }; TCLIServiceClient.prototype.GetPrimaryKeys = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_GetPrimaryKeys(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_GetPrimaryKeys(req); + this.send_GetPrimaryKeys(req, callback); + if (!callback) { + return this.recv_GetPrimaryKeys(); } }; -TCLIServiceClient.prototype.send_GetPrimaryKeys = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_GetPrimaryKeys = function(req, callback) { var params = { req: req }; var args = new TCLIService_GetPrimaryKeys_args(params); try { - output.writeMessageBegin('GetPrimaryKeys', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('GetPrimaryKeys', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_GetPrimaryKeys(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetPrimaryKeys = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_GetPrimaryKeys = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_GetPrimaryKeys_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); + return result.success; } - return callback('GetPrimaryKeys failed: unknown result'); + throw 'GetPrimaryKeys failed: unknown result'; }; TCLIServiceClient.prototype.GetCrossReference = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_GetCrossReference(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_GetCrossReference(req); + this.send_GetCrossReference(req, callback); + if (!callback) { + return this.recv_GetCrossReference(); } }; -TCLIServiceClient.prototype.send_GetCrossReference = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_GetCrossReference = function(req, callback) { var params = { req: req }; var args = new TCLIService_GetCrossReference_args(params); try { - output.writeMessageBegin('GetCrossReference', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('GetCrossReference', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_GetCrossReference(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetCrossReference = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_GetCrossReference = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_GetCrossReference_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); + return result.success; } - return callback('GetCrossReference failed: unknown result'); + throw 'GetCrossReference failed: unknown result'; }; TCLIServiceClient.prototype.GetOperationStatus = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_GetOperationStatus(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_GetOperationStatus(req); + this.send_GetOperationStatus(req, callback); + if (!callback) { + return this.recv_GetOperationStatus(); } }; -TCLIServiceClient.prototype.send_GetOperationStatus = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_GetOperationStatus = function(req, callback) { var params = { req: req }; var args = new TCLIService_GetOperationStatus_args(params); try { - output.writeMessageBegin('GetOperationStatus', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('GetOperationStatus', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_GetOperationStatus(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetOperationStatus = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_GetOperationStatus = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_GetOperationStatus_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); + return result.success; } - return callback('GetOperationStatus failed: unknown result'); + throw 'GetOperationStatus failed: unknown result'; }; TCLIServiceClient.prototype.CancelOperation = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_CancelOperation(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_CancelOperation(req); + this.send_CancelOperation(req, callback); + if (!callback) { + return this.recv_CancelOperation(); } }; -TCLIServiceClient.prototype.send_CancelOperation = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_CancelOperation = function(req, callback) { var params = { req: req }; var args = new TCLIService_CancelOperation_args(params); try { - output.writeMessageBegin('CancelOperation', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('CancelOperation', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_CancelOperation(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_CancelOperation = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_CancelOperation = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_CancelOperation_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); + return result.success; } - return callback('CancelOperation failed: unknown result'); + throw 'CancelOperation failed: unknown result'; }; TCLIServiceClient.prototype.CloseOperation = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_CloseOperation(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_CloseOperation(req); + this.send_CloseOperation(req, callback); + if (!callback) { + return this.recv_CloseOperation(); } }; -TCLIServiceClient.prototype.send_CloseOperation = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_CloseOperation = function(req, callback) { var params = { req: req }; var args = new TCLIService_CloseOperation_args(params); try { - output.writeMessageBegin('CloseOperation', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('CloseOperation', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_CloseOperation(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_CloseOperation = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_CloseOperation = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_CloseOperation_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); + return result.success; } - return callback('CloseOperation failed: unknown result'); + throw 'CloseOperation failed: unknown result'; }; TCLIServiceClient.prototype.GetResultSetMetadata = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_GetResultSetMetadata(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_GetResultSetMetadata(req); + this.send_GetResultSetMetadata(req, callback); + if (!callback) { + return this.recv_GetResultSetMetadata(); } }; -TCLIServiceClient.prototype.send_GetResultSetMetadata = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_GetResultSetMetadata = function(req, callback) { var params = { req: req }; var args = new TCLIService_GetResultSetMetadata_args(params); try { - output.writeMessageBegin('GetResultSetMetadata', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('GetResultSetMetadata', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_GetResultSetMetadata(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetResultSetMetadata = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_GetResultSetMetadata = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_GetResultSetMetadata_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); + return result.success; } - return callback('GetResultSetMetadata failed: unknown result'); + throw 'GetResultSetMetadata failed: unknown result'; }; TCLIServiceClient.prototype.FetchResults = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_FetchResults(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_FetchResults(req); + this.send_FetchResults(req, callback); + if (!callback) { + return this.recv_FetchResults(); } }; -TCLIServiceClient.prototype.send_FetchResults = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_FetchResults = function(req, callback) { var params = { req: req }; var args = new TCLIService_FetchResults_args(params); try { - output.writeMessageBegin('FetchResults', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('FetchResults', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_FetchResults(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_FetchResults = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_FetchResults = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_FetchResults_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); + return result.success; } - return callback('FetchResults failed: unknown result'); + throw 'FetchResults failed: unknown result'; }; TCLIServiceClient.prototype.GetDelegationToken = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_GetDelegationToken(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_GetDelegationToken(req); + this.send_GetDelegationToken(req, callback); + if (!callback) { + return this.recv_GetDelegationToken(); } }; -TCLIServiceClient.prototype.send_GetDelegationToken = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_GetDelegationToken = function(req, callback) { var params = { req: req }; var args = new TCLIService_GetDelegationToken_args(params); try { - output.writeMessageBegin('GetDelegationToken', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('GetDelegationToken', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_GetDelegationToken(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetDelegationToken = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_GetDelegationToken = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_GetDelegationToken_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); + return result.success; } - return callback('GetDelegationToken failed: unknown result'); + throw 'GetDelegationToken failed: unknown result'; }; TCLIServiceClient.prototype.CancelDelegationToken = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_CancelDelegationToken(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_CancelDelegationToken(req); + this.send_CancelDelegationToken(req, callback); + if (!callback) { + return this.recv_CancelDelegationToken(); } }; -TCLIServiceClient.prototype.send_CancelDelegationToken = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_CancelDelegationToken = function(req, callback) { var params = { req: req }; var args = new TCLIService_CancelDelegationToken_args(params); try { - output.writeMessageBegin('CancelDelegationToken', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('CancelDelegationToken', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_CancelDelegationToken(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_CancelDelegationToken = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_CancelDelegationToken = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_CancelDelegationToken_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); + return result.success; } - return callback('CancelDelegationToken failed: unknown result'); + throw 'CancelDelegationToken failed: unknown result'; }; TCLIServiceClient.prototype.RenewDelegationToken = function(req, callback) { - this._seqid = this.new_seqid(); - if (callback === undefined) { - var _defer = Q.defer(); - this._reqs[this.seqid()] = function(error, result) { - if (error) { - _defer.reject(error); - } else { - _defer.resolve(result); - } - }; - this.send_RenewDelegationToken(req); - return _defer.promise; - } else { - this._reqs[this.seqid()] = callback; - this.send_RenewDelegationToken(req); + this.send_RenewDelegationToken(req, callback); + if (!callback) { + return this.recv_RenewDelegationToken(); } }; -TCLIServiceClient.prototype.send_RenewDelegationToken = function(req) { - var output = new this.pClass(this.output); +TCLIServiceClient.prototype.send_RenewDelegationToken = function(req, callback) { var params = { req: req }; var args = new TCLIService_RenewDelegationToken_args(params); try { - output.writeMessageBegin('RenewDelegationToken', Thrift.MessageType.CALL, this.seqid()); - args.write(output); - output.writeMessageEnd(); - return this.output.flush(); + this.output.writeMessageBegin('RenewDelegationToken', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_RenewDelegationToken(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } } catch (e) { - delete this._reqs[this.seqid()]; - if (typeof output.reset === 'function') { - output.reset(); + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_RenewDelegationToken = function(input,mtype,rseqid) { - var callback = this._reqs[rseqid] || function() {}; - delete this._reqs[rseqid]; +TCLIServiceClient.prototype.recv_RenewDelegationToken = function() { + var ret = this.input.readMessageBegin(); + var mtype = ret.mtype; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(input); - input.readMessageEnd(); - return callback(x); + x.read(this.input); + this.input.readMessageEnd(); + throw x; } var result = new TCLIService_RenewDelegationToken_result(); - result.read(input); - input.readMessageEnd(); + result.read(this.input); + this.input.readMessageEnd(); if (null !== result.success) { - return callback(null, result.success); - } - return callback('RenewDelegationToken failed: unknown result'); -}; -var TCLIServiceProcessor = exports.Processor = function(handler) { - this._handler = handler; -}; -TCLIServiceProcessor.prototype.process = function(input, output) { - var r = input.readMessageBegin(); - if (this['process_' + r.fname]) { - return this['process_' + r.fname].call(this, r.rseqid, input, output); - } else { - input.skip(Thrift.Type.STRUCT); - input.readMessageEnd(); - var x = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN_METHOD, 'Unknown function ' + r.fname); - output.writeMessageBegin(r.fname, Thrift.MessageType.EXCEPTION, r.rseqid); - x.write(output); - output.writeMessageEnd(); - output.flush(); - } -}; -TCLIServiceProcessor.prototype.process_OpenSession = function(seqid, input, output) { - var args = new TCLIService_OpenSession_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.OpenSession.length === 1) { - Q.fcall(this._handler.OpenSession.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_OpenSession_result({success: result}); - output.writeMessageBegin("OpenSession", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("OpenSession", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.OpenSession(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_OpenSession_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("OpenSession", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("OpenSession", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -TCLIServiceProcessor.prototype.process_CloseSession = function(seqid, input, output) { - var args = new TCLIService_CloseSession_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.CloseSession.length === 1) { - Q.fcall(this._handler.CloseSession.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_CloseSession_result({success: result}); - output.writeMessageBegin("CloseSession", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("CloseSession", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.CloseSession(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_CloseSession_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("CloseSession", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("CloseSession", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -TCLIServiceProcessor.prototype.process_GetInfo = function(seqid, input, output) { - var args = new TCLIService_GetInfo_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.GetInfo.length === 1) { - Q.fcall(this._handler.GetInfo.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_GetInfo_result({success: result}); - output.writeMessageBegin("GetInfo", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetInfo", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.GetInfo(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_GetInfo_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("GetInfo", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetInfo", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -TCLIServiceProcessor.prototype.process_ExecuteStatement = function(seqid, input, output) { - var args = new TCLIService_ExecuteStatement_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.ExecuteStatement.length === 1) { - Q.fcall(this._handler.ExecuteStatement.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_ExecuteStatement_result({success: result}); - output.writeMessageBegin("ExecuteStatement", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("ExecuteStatement", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.ExecuteStatement(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_ExecuteStatement_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("ExecuteStatement", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("ExecuteStatement", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -TCLIServiceProcessor.prototype.process_GetTypeInfo = function(seqid, input, output) { - var args = new TCLIService_GetTypeInfo_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.GetTypeInfo.length === 1) { - Q.fcall(this._handler.GetTypeInfo.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_GetTypeInfo_result({success: result}); - output.writeMessageBegin("GetTypeInfo", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetTypeInfo", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.GetTypeInfo(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_GetTypeInfo_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("GetTypeInfo", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetTypeInfo", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -TCLIServiceProcessor.prototype.process_GetCatalogs = function(seqid, input, output) { - var args = new TCLIService_GetCatalogs_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.GetCatalogs.length === 1) { - Q.fcall(this._handler.GetCatalogs.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_GetCatalogs_result({success: result}); - output.writeMessageBegin("GetCatalogs", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetCatalogs", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.GetCatalogs(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_GetCatalogs_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("GetCatalogs", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetCatalogs", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -TCLIServiceProcessor.prototype.process_GetSchemas = function(seqid, input, output) { - var args = new TCLIService_GetSchemas_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.GetSchemas.length === 1) { - Q.fcall(this._handler.GetSchemas.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_GetSchemas_result({success: result}); - output.writeMessageBegin("GetSchemas", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetSchemas", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.GetSchemas(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_GetSchemas_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("GetSchemas", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetSchemas", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -TCLIServiceProcessor.prototype.process_GetTables = function(seqid, input, output) { - var args = new TCLIService_GetTables_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.GetTables.length === 1) { - Q.fcall(this._handler.GetTables.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_GetTables_result({success: result}); - output.writeMessageBegin("GetTables", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetTables", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.GetTables(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_GetTables_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("GetTables", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetTables", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -TCLIServiceProcessor.prototype.process_GetTableTypes = function(seqid, input, output) { - var args = new TCLIService_GetTableTypes_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.GetTableTypes.length === 1) { - Q.fcall(this._handler.GetTableTypes.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_GetTableTypes_result({success: result}); - output.writeMessageBegin("GetTableTypes", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetTableTypes", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.GetTableTypes(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_GetTableTypes_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("GetTableTypes", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetTableTypes", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -TCLIServiceProcessor.prototype.process_GetColumns = function(seqid, input, output) { - var args = new TCLIService_GetColumns_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.GetColumns.length === 1) { - Q.fcall(this._handler.GetColumns.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_GetColumns_result({success: result}); - output.writeMessageBegin("GetColumns", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetColumns", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.GetColumns(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_GetColumns_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("GetColumns", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetColumns", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -TCLIServiceProcessor.prototype.process_GetFunctions = function(seqid, input, output) { - var args = new TCLIService_GetFunctions_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.GetFunctions.length === 1) { - Q.fcall(this._handler.GetFunctions.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_GetFunctions_result({success: result}); - output.writeMessageBegin("GetFunctions", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetFunctions", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.GetFunctions(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_GetFunctions_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("GetFunctions", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetFunctions", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -TCLIServiceProcessor.prototype.process_GetPrimaryKeys = function(seqid, input, output) { - var args = new TCLIService_GetPrimaryKeys_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.GetPrimaryKeys.length === 1) { - Q.fcall(this._handler.GetPrimaryKeys.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_GetPrimaryKeys_result({success: result}); - output.writeMessageBegin("GetPrimaryKeys", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetPrimaryKeys", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.GetPrimaryKeys(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_GetPrimaryKeys_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("GetPrimaryKeys", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetPrimaryKeys", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -TCLIServiceProcessor.prototype.process_GetCrossReference = function(seqid, input, output) { - var args = new TCLIService_GetCrossReference_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.GetCrossReference.length === 1) { - Q.fcall(this._handler.GetCrossReference.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_GetCrossReference_result({success: result}); - output.writeMessageBegin("GetCrossReference", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetCrossReference", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.GetCrossReference(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_GetCrossReference_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("GetCrossReference", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetCrossReference", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -TCLIServiceProcessor.prototype.process_GetOperationStatus = function(seqid, input, output) { - var args = new TCLIService_GetOperationStatus_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.GetOperationStatus.length === 1) { - Q.fcall(this._handler.GetOperationStatus.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_GetOperationStatus_result({success: result}); - output.writeMessageBegin("GetOperationStatus", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetOperationStatus", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.GetOperationStatus(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_GetOperationStatus_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("GetOperationStatus", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetOperationStatus", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -TCLIServiceProcessor.prototype.process_CancelOperation = function(seqid, input, output) { - var args = new TCLIService_CancelOperation_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.CancelOperation.length === 1) { - Q.fcall(this._handler.CancelOperation.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_CancelOperation_result({success: result}); - output.writeMessageBegin("CancelOperation", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("CancelOperation", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.CancelOperation(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_CancelOperation_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("CancelOperation", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("CancelOperation", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -TCLIServiceProcessor.prototype.process_CloseOperation = function(seqid, input, output) { - var args = new TCLIService_CloseOperation_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.CloseOperation.length === 1) { - Q.fcall(this._handler.CloseOperation.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_CloseOperation_result({success: result}); - output.writeMessageBegin("CloseOperation", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("CloseOperation", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.CloseOperation(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_CloseOperation_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("CloseOperation", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("CloseOperation", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -TCLIServiceProcessor.prototype.process_GetResultSetMetadata = function(seqid, input, output) { - var args = new TCLIService_GetResultSetMetadata_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.GetResultSetMetadata.length === 1) { - Q.fcall(this._handler.GetResultSetMetadata.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_GetResultSetMetadata_result({success: result}); - output.writeMessageBegin("GetResultSetMetadata", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetResultSetMetadata", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.GetResultSetMetadata(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_GetResultSetMetadata_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("GetResultSetMetadata", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetResultSetMetadata", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -TCLIServiceProcessor.prototype.process_FetchResults = function(seqid, input, output) { - var args = new TCLIService_FetchResults_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.FetchResults.length === 1) { - Q.fcall(this._handler.FetchResults.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_FetchResults_result({success: result}); - output.writeMessageBegin("FetchResults", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("FetchResults", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.FetchResults(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_FetchResults_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("FetchResults", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("FetchResults", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -TCLIServiceProcessor.prototype.process_GetDelegationToken = function(seqid, input, output) { - var args = new TCLIService_GetDelegationToken_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.GetDelegationToken.length === 1) { - Q.fcall(this._handler.GetDelegationToken.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_GetDelegationToken_result({success: result}); - output.writeMessageBegin("GetDelegationToken", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetDelegationToken", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.GetDelegationToken(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_GetDelegationToken_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("GetDelegationToken", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("GetDelegationToken", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -TCLIServiceProcessor.prototype.process_CancelDelegationToken = function(seqid, input, output) { - var args = new TCLIService_CancelDelegationToken_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.CancelDelegationToken.length === 1) { - Q.fcall(this._handler.CancelDelegationToken.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_CancelDelegationToken_result({success: result}); - output.writeMessageBegin("CancelDelegationToken", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("CancelDelegationToken", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.CancelDelegationToken(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_CancelDelegationToken_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("CancelDelegationToken", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("CancelDelegationToken", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } -}; -TCLIServiceProcessor.prototype.process_RenewDelegationToken = function(seqid, input, output) { - var args = new TCLIService_RenewDelegationToken_args(); - args.read(input); - input.readMessageEnd(); - if (this._handler.RenewDelegationToken.length === 1) { - Q.fcall(this._handler.RenewDelegationToken.bind(this._handler), - args.req - ).then(function(result) { - var result_obj = new TCLIService_RenewDelegationToken_result({success: result}); - output.writeMessageBegin("RenewDelegationToken", Thrift.MessageType.REPLY, seqid); - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }).catch(function (err) { - var result; - result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("RenewDelegationToken", Thrift.MessageType.EXCEPTION, seqid); - result.write(output); - output.writeMessageEnd(); - output.flush(); - }); - } else { - this._handler.RenewDelegationToken(args.req, function (err, result) { - var result_obj; - if ((err === null || typeof err === 'undefined')) { - result_obj = new TCLIService_RenewDelegationToken_result((err !== null || typeof err === 'undefined') ? err : {success: result}); - output.writeMessageBegin("RenewDelegationToken", Thrift.MessageType.REPLY, seqid); - } else { - result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); - output.writeMessageBegin("RenewDelegationToken", Thrift.MessageType.EXCEPTION, seqid); - } - result_obj.write(output); - output.writeMessageEnd(); - output.flush(); - }); + return result.success; } + throw 'RenewDelegationToken failed: unknown result'; }; diff --git a/thrift/TCLIService_types.d.ts b/thrift/TCLIService_types.d.ts index 23890017..11692e7a 100644 --- a/thrift/TCLIService_types.d.ts +++ b/thrift/TCLIService_types.d.ts @@ -3,13 +3,10 @@ // // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING // -import thrift = require('thrift'); -import Thrift = thrift.Thrift; -import Q = thrift.Q; import Int64 = require('node-int64'); -declare enum TProtocolVersion { +export declare enum TProtocolVersion { __HIVE_JDBC_WORKAROUND = -7, __TEST_PROTOCOL_VERSION = 65281, HIVE_CLI_SERVICE_PROTOCOL_V1 = 0, @@ -31,7 +28,7 @@ declare enum TProtocolVersion { SPARK_CLI_SERVICE_PROTOCOL_V7 = 42247, } -declare enum TTypeId { +export declare enum TTypeId { BOOLEAN_TYPE = 0, TINYINT_TYPE = 1, SMALLINT_TYPE = 2, @@ -56,36 +53,36 @@ declare enum TTypeId { INTERVAL_DAY_TIME_TYPE = 21, } -declare enum TSparkRowSetType { +export declare enum TSparkRowSetType { ARROW_BASED_SET = 0, COLUMN_BASED_SET = 1, ROW_BASED_SET = 2, URL_BASED_SET = 3, } -declare enum TDBSqlCompressionCodec { +export declare enum TDBSqlCompressionCodec { NONE = 0, LZ4_FRAME = 1, LZ4_BLOCK = 2, } -declare enum TDBSqlArrowLayout { +export declare enum TDBSqlArrowLayout { ARROW_BATCH = 0, ARROW_STREAMING = 1, } -declare enum TOperationIdempotencyType { +export declare enum TOperationIdempotencyType { UNKNOWN = 0, NON_IDEMPOTENT = 1, IDEMPOTENT = 2, } -declare enum TOperationTimeoutLevel { +export declare enum TOperationTimeoutLevel { CLUSTER = 0, SESSION = 1, } -declare enum TStatusCode { +export declare enum TStatusCode { SUCCESS_STATUS = 0, SUCCESS_WITH_INFO_STATUS = 1, STILL_EXECUTING_STATUS = 2, @@ -93,7 +90,7 @@ declare enum TStatusCode { INVALID_HANDLE_STATUS = 4, } -declare enum TOperationState { +export declare enum TOperationState { INITIALIZED_STATE = 0, RUNNING_STATE = 1, FINISHED_STATE = 2, @@ -105,7 +102,7 @@ declare enum TOperationState { TIMEDOUT_STATE = 8, } -declare enum TOperationType { +export declare enum TOperationType { EXECUTE_STATEMENT = 0, GET_TYPE_INFO = 1, GET_CATALOGS = 2, @@ -117,7 +114,7 @@ declare enum TOperationType { UNKNOWN = 8, } -declare enum TGetInfoType { +export declare enum TGetInfoType { CLI_MAX_DRIVER_CONNECTIONS = 0, CLI_MAX_CONCURRENT_ACTIVITIES = 1, CLI_DATA_SOURCE_NAME = 2, @@ -167,20 +164,20 @@ declare enum TGetInfoType { CLI_MAX_IDENTIFIER_LEN = 10005, } -declare enum TResultPersistenceMode { +export declare enum TResultPersistenceMode { ONLY_LARGE_RESULTS = 0, ALL_QUERY_RESULTS = 1, ALL_RESULTS = 2, } -declare enum TCacheLookupResult { +export declare enum TCacheLookupResult { CACHE_INELIGIBLE = 0, LOCAL_CACHE_HIT = 1, REMOTE_CACHE_HIT = 2, CACHE_MISS = 3, } -declare enum TCloudFetchDisabledReason { +export declare enum TCloudFetchDisabledReason { ARROW_SUPPORT = 0, CLOUD_FETCH_SUPPORT = 1, PROTOCOL_VERSION = 2, @@ -191,11 +188,11 @@ declare enum TCloudFetchDisabledReason { UNKNOWN = 7, } -declare enum TDBSqlManifestFileFormat { +export declare enum TDBSqlManifestFileFormat { THRIFT_GET_RESULT_SET_METADATA_RESP = 0, } -declare enum TFetchOrientation { +export declare enum TFetchOrientation { FETCH_NEXT = 0, FETCH_PRIOR = 1, FETCH_RELATIVE = 2, @@ -204,916 +201,936 @@ declare enum TFetchOrientation { FETCH_LAST = 5, } -declare enum TDBSqlFetchDisposition { +export declare enum TDBSqlFetchDisposition { DISPOSITION_UNSPECIFIED = 0, DISPOSITION_INLINE = 1, DISPOSITION_EXTERNAL_LINKS = 2, DISPOSITION_INTERNAL_DBFS = 3, } -declare enum TJobExecutionStatus { +export declare enum TJobExecutionStatus { IN_PROGRESS = 0, COMPLETE = 1, NOT_AVAILABLE = 2, } -declare class TTypeQualifierValue { - public i32Value?: number; - public stringValue?: string; +export declare class TTypeQualifierValue { + i32Value?: number; + stringValue?: string; constructor(args?: { i32Value?: number; stringValue?: string; }); } -declare class TTypeQualifiers { - public qualifiers: { [k: string]: TTypeQualifierValue; }; +export declare class TTypeQualifiers { + qualifiers: { [k: string]: TTypeQualifierValue; }; constructor(args?: { qualifiers: { [k: string]: TTypeQualifierValue; }; }); } -declare class TPrimitiveTypeEntry { - public type: TTypeId; - public typeQualifiers?: TTypeQualifiers; +export declare class TPrimitiveTypeEntry { + type: TTypeId; + typeQualifiers?: TTypeQualifiers; constructor(args?: { type: TTypeId; typeQualifiers?: TTypeQualifiers; }); } -declare class TArrayTypeEntry { - public objectTypePtr: number; +export declare class TArrayTypeEntry { + objectTypePtr: number; constructor(args?: { objectTypePtr: number; }); } -declare class TMapTypeEntry { - public keyTypePtr: number; - public valueTypePtr: number; +export declare class TMapTypeEntry { + keyTypePtr: number; + valueTypePtr: number; constructor(args?: { keyTypePtr: number; valueTypePtr: number; }); } -declare class TStructTypeEntry { - public nameToTypePtr: { [k: string]: number; }; +export declare class TStructTypeEntry { + nameToTypePtr: { [k: string]: number; }; constructor(args?: { nameToTypePtr: { [k: string]: number; }; }); } -declare class TUnionTypeEntry { - public nameToTypePtr: { [k: string]: number; }; +export declare class TUnionTypeEntry { + nameToTypePtr: { [k: string]: number; }; constructor(args?: { nameToTypePtr: { [k: string]: number; }; }); } -declare class TUserDefinedTypeEntry { - public typeClassName: string; +export declare class TUserDefinedTypeEntry { + typeClassName: string; constructor(args?: { typeClassName: string; }); } -declare class TTypeEntry { - public primitiveEntry?: TPrimitiveTypeEntry; - public arrayEntry?: TArrayTypeEntry; - public mapEntry?: TMapTypeEntry; - public structEntry?: TStructTypeEntry; - public unionEntry?: TUnionTypeEntry; - public userDefinedTypeEntry?: TUserDefinedTypeEntry; +export declare class TTypeEntry { + primitiveEntry?: TPrimitiveTypeEntry; + arrayEntry?: TArrayTypeEntry; + mapEntry?: TMapTypeEntry; + structEntry?: TStructTypeEntry; + unionEntry?: TUnionTypeEntry; + userDefinedTypeEntry?: TUserDefinedTypeEntry; constructor(args?: { primitiveEntry?: TPrimitiveTypeEntry; arrayEntry?: TArrayTypeEntry; mapEntry?: TMapTypeEntry; structEntry?: TStructTypeEntry; unionEntry?: TUnionTypeEntry; userDefinedTypeEntry?: TUserDefinedTypeEntry; }); } -declare class TTypeDesc { - public types: TTypeEntry[]; +export declare class TTypeDesc { + types: TTypeEntry[]; constructor(args?: { types: TTypeEntry[]; }); } -declare class TColumnDesc { - public columnName: string; - public typeDesc: TTypeDesc; - public position: number; - public comment?: string; +export declare class TColumnDesc { + columnName: string; + typeDesc: TTypeDesc; + position: number; + comment?: string; constructor(args?: { columnName: string; typeDesc: TTypeDesc; position: number; comment?: string; }); } -declare class TTableSchema { - public columns: TColumnDesc[]; +export declare class TTableSchema { + columns: TColumnDesc[]; constructor(args?: { columns: TColumnDesc[]; }); } -declare class TBoolValue { - public value?: boolean; +export declare class TBoolValue { + value?: boolean; constructor(args?: { value?: boolean; }); } -declare class TByteValue { - public value?: any; +export declare class TByteValue { + value?: any; constructor(args?: { value?: any; }); } -declare class TI16Value { - public value?: number; +export declare class TI16Value { + value?: number; constructor(args?: { value?: number; }); } -declare class TI32Value { - public value?: number; +export declare class TI32Value { + value?: number; constructor(args?: { value?: number; }); } -declare class TI64Value { - public value?: Int64; +export declare class TI64Value { + value?: Int64; constructor(args?: { value?: Int64; }); } -declare class TDoubleValue { - public value?: number; +export declare class TDoubleValue { + value?: number; constructor(args?: { value?: number; }); } -declare class TStringValue { - public value?: string; +export declare class TStringValue { + value?: string; constructor(args?: { value?: string; }); } -declare class TColumnValue { - public boolVal?: TBoolValue; - public byteVal?: TByteValue; - public i16Val?: TI16Value; - public i32Val?: TI32Value; - public i64Val?: TI64Value; - public doubleVal?: TDoubleValue; - public stringVal?: TStringValue; +export declare class TColumnValue { + boolVal?: TBoolValue; + byteVal?: TByteValue; + i16Val?: TI16Value; + i32Val?: TI32Value; + i64Val?: TI64Value; + doubleVal?: TDoubleValue; + stringVal?: TStringValue; constructor(args?: { boolVal?: TBoolValue; byteVal?: TByteValue; i16Val?: TI16Value; i32Val?: TI32Value; i64Val?: TI64Value; doubleVal?: TDoubleValue; stringVal?: TStringValue; }); } -declare class TRow { - public colVals: TColumnValue[]; +export declare class TRow { + colVals: TColumnValue[]; constructor(args?: { colVals: TColumnValue[]; }); } -declare class TBoolColumn { - public values: boolean[]; - public nulls: Buffer; +export declare class TBoolColumn { + values: boolean[]; + nulls: Buffer; constructor(args?: { values: boolean[]; nulls: Buffer; }); } -declare class TByteColumn { - public values: any[]; - public nulls: Buffer; +export declare class TByteColumn { + values: any[]; + nulls: Buffer; constructor(args?: { values: any[]; nulls: Buffer; }); } -declare class TI16Column { - public values: number[]; - public nulls: Buffer; +export declare class TI16Column { + values: number[]; + nulls: Buffer; constructor(args?: { values: number[]; nulls: Buffer; }); } -declare class TI32Column { - public values: number[]; - public nulls: Buffer; +export declare class TI32Column { + values: number[]; + nulls: Buffer; constructor(args?: { values: number[]; nulls: Buffer; }); } -declare class TI64Column { - public values: Int64[]; - public nulls: Buffer; +export declare class TI64Column { + values: Int64[]; + nulls: Buffer; constructor(args?: { values: Int64[]; nulls: Buffer; }); } -declare class TDoubleColumn { - public values: number[]; - public nulls: Buffer; +export declare class TDoubleColumn { + values: number[]; + nulls: Buffer; constructor(args?: { values: number[]; nulls: Buffer; }); } -declare class TStringColumn { - public values: string[]; - public nulls: Buffer; +export declare class TStringColumn { + values: string[]; + nulls: Buffer; constructor(args?: { values: string[]; nulls: Buffer; }); } -declare class TBinaryColumn { - public values: Buffer[]; - public nulls: Buffer; +export declare class TBinaryColumn { + values: Buffer[]; + nulls: Buffer; constructor(args?: { values: Buffer[]; nulls: Buffer; }); } -declare class TColumn { - public boolVal?: TBoolColumn; - public byteVal?: TByteColumn; - public i16Val?: TI16Column; - public i32Val?: TI32Column; - public i64Val?: TI64Column; - public doubleVal?: TDoubleColumn; - public stringVal?: TStringColumn; - public binaryVal?: TBinaryColumn; +export declare class TColumn { + boolVal?: TBoolColumn; + byteVal?: TByteColumn; + i16Val?: TI16Column; + i32Val?: TI32Column; + i64Val?: TI64Column; + doubleVal?: TDoubleColumn; + stringVal?: TStringColumn; + binaryVal?: TBinaryColumn; constructor(args?: { boolVal?: TBoolColumn; byteVal?: TByteColumn; i16Val?: TI16Column; i32Val?: TI32Column; i64Val?: TI64Column; doubleVal?: TDoubleColumn; stringVal?: TStringColumn; binaryVal?: TBinaryColumn; }); } -declare class TDBSqlJsonArrayFormat { - public compressionCodec?: TDBSqlCompressionCodec; +export declare class TDBSqlJsonArrayFormat { + compressionCodec?: TDBSqlCompressionCodec; constructor(args?: { compressionCodec?: TDBSqlCompressionCodec; }); } -declare class TDBSqlCsvFormat { - public compressionCodec?: TDBSqlCompressionCodec; +export declare class TDBSqlCsvFormat { + compressionCodec?: TDBSqlCompressionCodec; constructor(args?: { compressionCodec?: TDBSqlCompressionCodec; }); } -declare class TDBSqlArrowFormat { - public arrowLayout?: TDBSqlArrowLayout; - public compressionCodec?: TDBSqlCompressionCodec; +export declare class TDBSqlArrowFormat { + arrowLayout?: TDBSqlArrowLayout; + compressionCodec?: TDBSqlCompressionCodec; constructor(args?: { arrowLayout?: TDBSqlArrowLayout; compressionCodec?: TDBSqlCompressionCodec; }); } -declare class TDBSqlResultFormat { - public arrowFormat?: TDBSqlArrowFormat; - public csvFormat?: TDBSqlCsvFormat; - public jsonArrayFormat?: TDBSqlJsonArrayFormat; +export declare class TDBSqlResultFormat { + arrowFormat?: TDBSqlArrowFormat; + csvFormat?: TDBSqlCsvFormat; + jsonArrayFormat?: TDBSqlJsonArrayFormat; constructor(args?: { arrowFormat?: TDBSqlArrowFormat; csvFormat?: TDBSqlCsvFormat; jsonArrayFormat?: TDBSqlJsonArrayFormat; }); } -declare class TSparkArrowBatch { - public batch: Buffer; - public rowCount: Int64; +export declare class TSparkArrowBatch { + batch: Buffer; + rowCount: Int64; constructor(args?: { batch: Buffer; rowCount: Int64; }); } -declare class TSparkArrowResultLink { - public fileLink: string; - public expiryTime: Int64; - public startRowOffset: Int64; - public rowCount: Int64; - public bytesNum: Int64; +export declare class TSparkArrowResultLink { + fileLink: string; + expiryTime: Int64; + startRowOffset: Int64; + rowCount: Int64; + bytesNum: Int64; + httpHeaders?: { [k: string]: string; }; - constructor(args?: { fileLink: string; expiryTime: Int64; startRowOffset: Int64; rowCount: Int64; bytesNum: Int64; }); + constructor(args?: { fileLink: string; expiryTime: Int64; startRowOffset: Int64; rowCount: Int64; bytesNum: Int64; httpHeaders?: { [k: string]: string; }; }); } -declare class TDBSqlCloudResultFile { - public filePath?: string; - public startRowOffset?: Int64; - public rowCount?: Int64; - public uncompressedBytes?: Int64; - public compressedBytes?: Int64; - public fileLink?: string; - public linkExpiryTime?: Int64; +export declare class TDBSqlCloudResultFile { + filePath?: string; + startRowOffset?: Int64; + rowCount?: Int64; + uncompressedBytes?: Int64; + compressedBytes?: Int64; + fileLink?: string; + linkExpiryTime?: Int64; + httpHeaders?: { [k: string]: string; }; - constructor(args?: { filePath?: string; startRowOffset?: Int64; rowCount?: Int64; uncompressedBytes?: Int64; compressedBytes?: Int64; fileLink?: string; linkExpiryTime?: Int64; }); + constructor(args?: { filePath?: string; startRowOffset?: Int64; rowCount?: Int64; uncompressedBytes?: Int64; compressedBytes?: Int64; fileLink?: string; linkExpiryTime?: Int64; httpHeaders?: { [k: string]: string; }; }); } -declare class TRowSet { - public startRowOffset: Int64; - public rows: TRow[]; - public columns?: TColumn[]; - public binaryColumns?: Buffer; - public columnCount?: number; - public arrowBatches?: TSparkArrowBatch[]; - public resultLinks?: TSparkArrowResultLink[]; - public cloudFetchResults?: TDBSqlCloudResultFile[]; +export declare class TRowSet { + startRowOffset: Int64; + rows: TRow[]; + columns?: TColumn[]; + binaryColumns?: Buffer; + columnCount?: number; + arrowBatches?: TSparkArrowBatch[]; + resultLinks?: TSparkArrowResultLink[]; + cloudFetchResults?: TDBSqlCloudResultFile[]; constructor(args?: { startRowOffset: Int64; rows: TRow[]; columns?: TColumn[]; binaryColumns?: Buffer; columnCount?: number; arrowBatches?: TSparkArrowBatch[]; resultLinks?: TSparkArrowResultLink[]; cloudFetchResults?: TDBSqlCloudResultFile[]; }); } -declare class TDBSqlTempView { - public name?: string; - public sqlStatement?: string; - public properties?: { [k: string]: string; }; - public viewSchema?: string; +export declare class TDBSqlTempView { + name?: string; + sqlStatement?: string; + properties?: { [k: string]: string; }; + viewSchema?: string; constructor(args?: { name?: string; sqlStatement?: string; properties?: { [k: string]: string; }; viewSchema?: string; }); } -declare class TDBSqlSessionCapabilities { - public supportsMultipleCatalogs?: boolean; +export declare class TDBSqlSessionCapabilities { + supportsMultipleCatalogs?: boolean; constructor(args?: { supportsMultipleCatalogs?: boolean; }); } -declare class TExpressionInfo { - public className?: string; - public usage?: string; - public name?: string; - public extended?: string; - public db?: string; - public arguments?: string; - public examples?: string; - public note?: string; - public group?: string; - public since?: string; - public deprecated?: string; - public source?: string; +export declare class TExpressionInfo { + className?: string; + usage?: string; + name?: string; + extended?: string; + db?: string; + arguments?: string; + examples?: string; + note?: string; + group?: string; + since?: string; + deprecated?: string; + source?: string; constructor(args?: { className?: string; usage?: string; name?: string; extended?: string; db?: string; arguments?: string; examples?: string; note?: string; group?: string; since?: string; deprecated?: string; source?: string; }); } -declare class TDBSqlConfValue { - public value?: string; +export declare class TDBSqlConfValue { + value?: string; constructor(args?: { value?: string; }); } -declare class TDBSqlSessionConf { - public confs?: { [k: string]: string; }; - public tempViews?: TDBSqlTempView[]; - public currentDatabase?: string; - public currentCatalog?: string; - public sessionCapabilities?: TDBSqlSessionCapabilities; - public expressionsInfos?: TExpressionInfo[]; - public internalConfs?: { [k: string]: TDBSqlConfValue; }; +export declare class TDBSqlSessionConf { + confs?: { [k: string]: string; }; + tempViews?: TDBSqlTempView[]; + currentDatabase?: string; + currentCatalog?: string; + sessionCapabilities?: TDBSqlSessionCapabilities; + expressionsInfos?: TExpressionInfo[]; + internalConfs?: { [k: string]: TDBSqlConfValue; }; constructor(args?: { confs?: { [k: string]: string; }; tempViews?: TDBSqlTempView[]; currentDatabase?: string; currentCatalog?: string; sessionCapabilities?: TDBSqlSessionCapabilities; expressionsInfos?: TExpressionInfo[]; internalConfs?: { [k: string]: TDBSqlConfValue; }; }); } -declare class TStatus { - public statusCode: TStatusCode; - public infoMessages?: string[]; - public sqlState?: string; - public errorCode?: number; - public errorMessage?: string; - public displayMessage?: string; - public responseValidation?: Buffer; +export declare class TStatus { + statusCode: TStatusCode; + infoMessages?: string[]; + sqlState?: string; + errorCode?: number; + errorMessage?: string; + displayMessage?: string; + errorDetailsJson?: string; + responseValidation?: Buffer; - constructor(args?: { statusCode: TStatusCode; infoMessages?: string[]; sqlState?: string; errorCode?: number; errorMessage?: string; displayMessage?: string; responseValidation?: Buffer; }); + constructor(args?: { statusCode: TStatusCode; infoMessages?: string[]; sqlState?: string; errorCode?: number; errorMessage?: string; displayMessage?: string; errorDetailsJson?: string; responseValidation?: Buffer; }); } -declare class TNamespace { - public catalogName?: string; - public schemaName?: string; +export declare class TNamespace { + catalogName?: string; + schemaName?: string; constructor(args?: { catalogName?: string; schemaName?: string; }); } -declare class THandleIdentifier { - public guid: Buffer; - public secret: Buffer; - public executionVersion?: number; +export declare class THandleIdentifier { + guid: Buffer; + secret: Buffer; + executionVersion?: number; constructor(args?: { guid: Buffer; secret: Buffer; executionVersion?: number; }); } -declare class TSessionHandle { - public sessionId: THandleIdentifier; - public serverProtocolVersion?: TProtocolVersion; +export declare class TSessionHandle { + sessionId: THandleIdentifier; + serverProtocolVersion?: TProtocolVersion; constructor(args?: { sessionId: THandleIdentifier; serverProtocolVersion?: TProtocolVersion; }); } -declare class TOperationHandle { - public operationId: THandleIdentifier; - public operationType: TOperationType; - public hasResultSet: boolean; - public modifiedRowCount?: number; +export declare class TOperationHandle { + operationId: THandleIdentifier; + operationType: TOperationType; + hasResultSet: boolean; + modifiedRowCount?: number; constructor(args?: { operationId: THandleIdentifier; operationType: TOperationType; hasResultSet: boolean; modifiedRowCount?: number; }); } -declare class TOpenSessionReq { - public client_protocol?: TProtocolVersion; - public username?: string; - public password?: string; - public configuration?: { [k: string]: string; }; - public getInfos?: TGetInfoType[]; - public client_protocol_i64?: Int64; - public connectionProperties?: { [k: string]: string; }; - public initialNamespace?: TNamespace; - public canUseMultipleCatalogs?: boolean; - public sessionId?: THandleIdentifier; +export declare class TOpenSessionReq { + client_protocol?: TProtocolVersion; + username?: string; + password?: string; + configuration?: { [k: string]: string; }; + getInfos?: TGetInfoType[]; + client_protocol_i64?: Int64; + connectionProperties?: { [k: string]: string; }; + initialNamespace?: TNamespace; + canUseMultipleCatalogs?: boolean; + sessionId?: THandleIdentifier; constructor(args?: { client_protocol?: TProtocolVersion; username?: string; password?: string; configuration?: { [k: string]: string; }; getInfos?: TGetInfoType[]; client_protocol_i64?: Int64; connectionProperties?: { [k: string]: string; }; initialNamespace?: TNamespace; canUseMultipleCatalogs?: boolean; sessionId?: THandleIdentifier; }); } -declare class TOpenSessionResp { - public status: TStatus; - public serverProtocolVersion: TProtocolVersion; - public sessionHandle?: TSessionHandle; - public configuration?: { [k: string]: string; }; - public initialNamespace?: TNamespace; - public canUseMultipleCatalogs?: boolean; - public getInfos?: TGetInfoValue[]; +export declare class TOpenSessionResp { + status: TStatus; + serverProtocolVersion: TProtocolVersion; + sessionHandle?: TSessionHandle; + configuration?: { [k: string]: string; }; + initialNamespace?: TNamespace; + canUseMultipleCatalogs?: boolean; + getInfos?: TGetInfoValue[]; constructor(args?: { status: TStatus; serverProtocolVersion: TProtocolVersion; sessionHandle?: TSessionHandle; configuration?: { [k: string]: string; }; initialNamespace?: TNamespace; canUseMultipleCatalogs?: boolean; getInfos?: TGetInfoValue[]; }); } -declare class TCloseSessionReq { - public sessionHandle: TSessionHandle; +export declare class TCloseSessionReq { + sessionHandle: TSessionHandle; constructor(args?: { sessionHandle: TSessionHandle; }); } -declare class TCloseSessionResp { - public status: TStatus; +export declare class TCloseSessionResp { + status: TStatus; constructor(args?: { status: TStatus; }); } -declare class TGetInfoValue { - public stringValue?: string; - public smallIntValue?: number; - public integerBitmask?: number; - public integerFlag?: number; - public binaryValue?: number; - public lenValue?: Int64; +export declare class TGetInfoValue { + stringValue?: string; + smallIntValue?: number; + integerBitmask?: number; + integerFlag?: number; + binaryValue?: number; + lenValue?: Int64; constructor(args?: { stringValue?: string; smallIntValue?: number; integerBitmask?: number; integerFlag?: number; binaryValue?: number; lenValue?: Int64; }); } -declare class TGetInfoReq { - public sessionHandle: TSessionHandle; - public infoType: TGetInfoType; - public sessionConf?: TDBSqlSessionConf; +export declare class TGetInfoReq { + sessionHandle: TSessionHandle; + infoType: TGetInfoType; + sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; infoType: TGetInfoType; sessionConf?: TDBSqlSessionConf; }); } -declare class TGetInfoResp { - public status: TStatus; - public infoValue: TGetInfoValue; +export declare class TGetInfoResp { + status: TStatus; + infoValue: TGetInfoValue; constructor(args?: { status: TStatus; infoValue: TGetInfoValue; }); } -declare class TSparkGetDirectResults { - public maxRows: Int64; - public maxBytes?: Int64; +export declare class TSparkGetDirectResults { + maxRows: Int64; + maxBytes?: Int64; constructor(args?: { maxRows: Int64; maxBytes?: Int64; }); } -declare class TSparkDirectResults { - public operationStatus?: TGetOperationStatusResp; - public resultSetMetadata?: TGetResultSetMetadataResp; - public resultSet?: TFetchResultsResp; - public closeOperation?: TCloseOperationResp; +export declare class TSparkDirectResults { + operationStatus?: TGetOperationStatusResp; + resultSetMetadata?: TGetResultSetMetadataResp; + resultSet?: TFetchResultsResp; + closeOperation?: TCloseOperationResp; constructor(args?: { operationStatus?: TGetOperationStatusResp; resultSetMetadata?: TGetResultSetMetadataResp; resultSet?: TFetchResultsResp; closeOperation?: TCloseOperationResp; }); } -declare class TSparkArrowTypes { - public timestampAsArrow?: boolean; - public decimalAsArrow?: boolean; - public complexTypesAsArrow?: boolean; - public intervalTypesAsArrow?: boolean; - public nullTypeAsArrow?: boolean; +export declare class TSparkArrowTypes { + timestampAsArrow?: boolean; + decimalAsArrow?: boolean; + complexTypesAsArrow?: boolean; + intervalTypesAsArrow?: boolean; + nullTypeAsArrow?: boolean; constructor(args?: { timestampAsArrow?: boolean; decimalAsArrow?: boolean; complexTypesAsArrow?: boolean; intervalTypesAsArrow?: boolean; nullTypeAsArrow?: boolean; }); } -declare class TExecuteStatementReq { - public sessionHandle: TSessionHandle; - public statement: string; - public confOverlay?: { [k: string]: string; }; - public runAsync?: boolean; - public getDirectResults?: TSparkGetDirectResults; - public queryTimeout?: Int64; - public canReadArrowResult?: boolean; - public canDownloadResult?: boolean; - public canDecompressLZ4Result?: boolean; - public maxBytesPerFile?: Int64; - public useArrowNativeTypes?: TSparkArrowTypes; - public resultRowLimit?: Int64; - public parameters?: TSparkParameter[]; - public operationId?: THandleIdentifier; - public sessionConf?: TDBSqlSessionConf; - public rejectHighCostQueries?: boolean; - public estimatedCost?: number; - public executionVersion?: number; - public requestValidation?: Buffer; - public resultPersistenceMode?: TResultPersistenceMode; - public trimArrowBatchesToLimit?: boolean; - public fetchDisposition?: TDBSqlFetchDisposition; - public enforceResultPersistenceMode?: boolean; - public statementList?: TDBSqlStatement[]; - public persistResultManifest?: boolean; - public resultRetentionSeconds?: Int64; - public resultByteLimit?: Int64; - public resultDataFormat?: TDBSqlResultFormat; - public originatingClientIdentity?: string; - - constructor(args?: { sessionHandle: TSessionHandle; statement: string; confOverlay?: { [k: string]: string; }; runAsync?: boolean; getDirectResults?: TSparkGetDirectResults; queryTimeout?: Int64; canReadArrowResult?: boolean; canDownloadResult?: boolean; canDecompressLZ4Result?: boolean; maxBytesPerFile?: Int64; useArrowNativeTypes?: TSparkArrowTypes; resultRowLimit?: Int64; parameters?: TSparkParameter[]; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; rejectHighCostQueries?: boolean; estimatedCost?: number; executionVersion?: number; requestValidation?: Buffer; resultPersistenceMode?: TResultPersistenceMode; trimArrowBatchesToLimit?: boolean; fetchDisposition?: TDBSqlFetchDisposition; enforceResultPersistenceMode?: boolean; statementList?: TDBSqlStatement[]; persistResultManifest?: boolean; resultRetentionSeconds?: Int64; resultByteLimit?: Int64; resultDataFormat?: TDBSqlResultFormat; originatingClientIdentity?: string; }); -} - -declare class TDBSqlStatement { - public statement?: string; +export declare class TExecuteStatementReq { + sessionHandle: TSessionHandle; + statement: string; + confOverlay?: { [k: string]: string; }; + runAsync?: boolean; + getDirectResults?: TSparkGetDirectResults; + queryTimeout?: Int64; + canReadArrowResult?: boolean; + canDownloadResult?: boolean; + canDecompressLZ4Result?: boolean; + maxBytesPerFile?: Int64; + useArrowNativeTypes?: TSparkArrowTypes; + resultRowLimit?: Int64; + parameters?: TSparkParameter[]; + maxBytesPerBatch?: Int64; + statementConf?: TStatementConf; + operationId?: THandleIdentifier; + sessionConf?: TDBSqlSessionConf; + rejectHighCostQueries?: boolean; + estimatedCost?: number; + executionVersion?: number; + requestValidation?: Buffer; + resultPersistenceMode?: TResultPersistenceMode; + trimArrowBatchesToLimit?: boolean; + fetchDisposition?: TDBSqlFetchDisposition; + enforceResultPersistenceMode?: boolean; + statementList?: TDBSqlStatement[]; + persistResultManifest?: boolean; + resultRetentionSeconds?: Int64; + resultByteLimit?: Int64; + resultDataFormat?: TDBSqlResultFormat; + originatingClientIdentity?: string; + preferSingleFileResult?: boolean; + preferDriverOnlyUpload?: boolean; + enforceEmbeddedSchemaCorrectness?: boolean; + idempotencyToken?: string; + + constructor(args?: { sessionHandle: TSessionHandle; statement: string; confOverlay?: { [k: string]: string; }; runAsync?: boolean; getDirectResults?: TSparkGetDirectResults; queryTimeout?: Int64; canReadArrowResult?: boolean; canDownloadResult?: boolean; canDecompressLZ4Result?: boolean; maxBytesPerFile?: Int64; useArrowNativeTypes?: TSparkArrowTypes; resultRowLimit?: Int64; parameters?: TSparkParameter[]; maxBytesPerBatch?: Int64; statementConf?: TStatementConf; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; rejectHighCostQueries?: boolean; estimatedCost?: number; executionVersion?: number; requestValidation?: Buffer; resultPersistenceMode?: TResultPersistenceMode; trimArrowBatchesToLimit?: boolean; fetchDisposition?: TDBSqlFetchDisposition; enforceResultPersistenceMode?: boolean; statementList?: TDBSqlStatement[]; persistResultManifest?: boolean; resultRetentionSeconds?: Int64; resultByteLimit?: Int64; resultDataFormat?: TDBSqlResultFormat; originatingClientIdentity?: string; preferSingleFileResult?: boolean; preferDriverOnlyUpload?: boolean; enforceEmbeddedSchemaCorrectness?: boolean; idempotencyToken?: string; }); +} + +export declare class TDBSqlStatement { + statement?: string; constructor(args?: { statement?: string; }); } -declare class TSparkParameterValue { - public stringValue?: string; - public doubleValue?: number; - public booleanValue?: boolean; +export declare class TSparkParameterValue { + stringValue?: string; + doubleValue?: number; + booleanValue?: boolean; constructor(args?: { stringValue?: string; doubleValue?: number; booleanValue?: boolean; }); } -declare class TSparkParameter { - public ordinal?: number; - public name?: string; - public type?: string; - public value?: TSparkParameterValue; +export declare class TSparkParameter { + ordinal?: number; + name?: string; + type?: string; + value?: TSparkParameterValue; constructor(args?: { ordinal?: number; name?: string; type?: string; value?: TSparkParameterValue; }); } -declare class TExecuteStatementResp { - public status: TStatus; - public operationHandle?: TOperationHandle; - public directResults?: TSparkDirectResults; - public executionRejected?: boolean; - public maxClusterCapacity?: number; - public queryCost?: number; - public sessionConf?: TDBSqlSessionConf; - public currentClusterLoad?: number; - public idempotencyType?: TOperationIdempotencyType; - public remoteResultCacheEnabled?: boolean; - public isServerless?: boolean; - public operationHandles?: TOperationHandle[]; +export declare class TStatementConf { + sessionless?: boolean; + initialNamespace?: TNamespace; + client_protocol?: TProtocolVersion; + client_protocol_i64?: Int64; + + constructor(args?: { sessionless?: boolean; initialNamespace?: TNamespace; client_protocol?: TProtocolVersion; client_protocol_i64?: Int64; }); +} + +export declare class TExecuteStatementResp { + status: TStatus; + operationHandle?: TOperationHandle; + directResults?: TSparkDirectResults; + executionRejected?: boolean; + maxClusterCapacity?: number; + queryCost?: number; + sessionConf?: TDBSqlSessionConf; + currentClusterLoad?: number; + idempotencyType?: TOperationIdempotencyType; + remoteResultCacheEnabled?: boolean; + isServerless?: boolean; + operationHandles?: TOperationHandle[]; constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; executionRejected?: boolean; maxClusterCapacity?: number; queryCost?: number; sessionConf?: TDBSqlSessionConf; currentClusterLoad?: number; idempotencyType?: TOperationIdempotencyType; remoteResultCacheEnabled?: boolean; isServerless?: boolean; operationHandles?: TOperationHandle[]; }); } -declare class TGetTypeInfoReq { - public sessionHandle: TSessionHandle; - public getDirectResults?: TSparkGetDirectResults; - public runAsync?: boolean; - public operationId?: THandleIdentifier; - public sessionConf?: TDBSqlSessionConf; +export declare class TGetTypeInfoReq { + sessionHandle: TSessionHandle; + getDirectResults?: TSparkGetDirectResults; + runAsync?: boolean; + operationId?: THandleIdentifier; + sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; getDirectResults?: TSparkGetDirectResults; runAsync?: boolean; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; }); } -declare class TGetTypeInfoResp { - public status: TStatus; - public operationHandle?: TOperationHandle; - public directResults?: TSparkDirectResults; +export declare class TGetTypeInfoResp { + status: TStatus; + operationHandle?: TOperationHandle; + directResults?: TSparkDirectResults; constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; }); } -declare class TGetCatalogsReq { - public sessionHandle: TSessionHandle; - public getDirectResults?: TSparkGetDirectResults; - public runAsync?: boolean; - public operationId?: THandleIdentifier; - public sessionConf?: TDBSqlSessionConf; +export declare class TGetCatalogsReq { + sessionHandle: TSessionHandle; + getDirectResults?: TSparkGetDirectResults; + runAsync?: boolean; + operationId?: THandleIdentifier; + sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; getDirectResults?: TSparkGetDirectResults; runAsync?: boolean; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; }); } -declare class TGetCatalogsResp { - public status: TStatus; - public operationHandle?: TOperationHandle; - public directResults?: TSparkDirectResults; +export declare class TGetCatalogsResp { + status: TStatus; + operationHandle?: TOperationHandle; + directResults?: TSparkDirectResults; constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; }); } -declare class TGetSchemasReq { - public sessionHandle: TSessionHandle; - public catalogName?: string; - public schemaName?: string; - public getDirectResults?: TSparkGetDirectResults; - public runAsync?: boolean; - public operationId?: THandleIdentifier; - public sessionConf?: TDBSqlSessionConf; +export declare class TGetSchemasReq { + sessionHandle: TSessionHandle; + catalogName?: string; + schemaName?: string; + getDirectResults?: TSparkGetDirectResults; + runAsync?: boolean; + operationId?: THandleIdentifier; + sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; catalogName?: string; schemaName?: string; getDirectResults?: TSparkGetDirectResults; runAsync?: boolean; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; }); } -declare class TGetSchemasResp { - public status: TStatus; - public operationHandle?: TOperationHandle; - public directResults?: TSparkDirectResults; +export declare class TGetSchemasResp { + status: TStatus; + operationHandle?: TOperationHandle; + directResults?: TSparkDirectResults; constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; }); } -declare class TGetTablesReq { - public sessionHandle: TSessionHandle; - public catalogName?: string; - public schemaName?: string; - public tableName?: string; - public tableTypes?: string[]; - public getDirectResults?: TSparkGetDirectResults; - public runAsync?: boolean; - public operationId?: THandleIdentifier; - public sessionConf?: TDBSqlSessionConf; +export declare class TGetTablesReq { + sessionHandle: TSessionHandle; + catalogName?: string; + schemaName?: string; + tableName?: string; + tableTypes?: string[]; + getDirectResults?: TSparkGetDirectResults; + runAsync?: boolean; + operationId?: THandleIdentifier; + sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; catalogName?: string; schemaName?: string; tableName?: string; tableTypes?: string[]; getDirectResults?: TSparkGetDirectResults; runAsync?: boolean; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; }); } -declare class TGetTablesResp { - public status: TStatus; - public operationHandle?: TOperationHandle; - public directResults?: TSparkDirectResults; +export declare class TGetTablesResp { + status: TStatus; + operationHandle?: TOperationHandle; + directResults?: TSparkDirectResults; constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; }); } -declare class TGetTableTypesReq { - public sessionHandle: TSessionHandle; - public getDirectResults?: TSparkGetDirectResults; - public runAsync?: boolean; - public operationId?: THandleIdentifier; - public sessionConf?: TDBSqlSessionConf; +export declare class TGetTableTypesReq { + sessionHandle: TSessionHandle; + getDirectResults?: TSparkGetDirectResults; + runAsync?: boolean; + operationId?: THandleIdentifier; + sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; getDirectResults?: TSparkGetDirectResults; runAsync?: boolean; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; }); } -declare class TGetTableTypesResp { - public status: TStatus; - public operationHandle?: TOperationHandle; - public directResults?: TSparkDirectResults; +export declare class TGetTableTypesResp { + status: TStatus; + operationHandle?: TOperationHandle; + directResults?: TSparkDirectResults; constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; }); } -declare class TGetColumnsReq { - public sessionHandle: TSessionHandle; - public catalogName?: string; - public schemaName?: string; - public tableName?: string; - public columnName?: string; - public getDirectResults?: TSparkGetDirectResults; - public runAsync?: boolean; - public operationId?: THandleIdentifier; - public sessionConf?: TDBSqlSessionConf; +export declare class TGetColumnsReq { + sessionHandle: TSessionHandle; + catalogName?: string; + schemaName?: string; + tableName?: string; + columnName?: string; + getDirectResults?: TSparkGetDirectResults; + runAsync?: boolean; + operationId?: THandleIdentifier; + sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; catalogName?: string; schemaName?: string; tableName?: string; columnName?: string; getDirectResults?: TSparkGetDirectResults; runAsync?: boolean; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; }); } -declare class TGetColumnsResp { - public status: TStatus; - public operationHandle?: TOperationHandle; - public directResults?: TSparkDirectResults; +export declare class TGetColumnsResp { + status: TStatus; + operationHandle?: TOperationHandle; + directResults?: TSparkDirectResults; constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; }); } -declare class TGetFunctionsReq { - public sessionHandle: TSessionHandle; - public catalogName?: string; - public schemaName?: string; - public functionName: string; - public getDirectResults?: TSparkGetDirectResults; - public runAsync?: boolean; - public operationId?: THandleIdentifier; - public sessionConf?: TDBSqlSessionConf; +export declare class TGetFunctionsReq { + sessionHandle: TSessionHandle; + catalogName?: string; + schemaName?: string; + functionName: string; + getDirectResults?: TSparkGetDirectResults; + runAsync?: boolean; + operationId?: THandleIdentifier; + sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; catalogName?: string; schemaName?: string; functionName: string; getDirectResults?: TSparkGetDirectResults; runAsync?: boolean; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; }); } -declare class TGetFunctionsResp { - public status: TStatus; - public operationHandle?: TOperationHandle; - public directResults?: TSparkDirectResults; +export declare class TGetFunctionsResp { + status: TStatus; + operationHandle?: TOperationHandle; + directResults?: TSparkDirectResults; constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; }); } -declare class TGetPrimaryKeysReq { - public sessionHandle: TSessionHandle; - public catalogName?: string; - public schemaName?: string; - public tableName?: string; - public getDirectResults?: TSparkGetDirectResults; - public runAsync?: boolean; - public operationId?: THandleIdentifier; - public sessionConf?: TDBSqlSessionConf; +export declare class TGetPrimaryKeysReq { + sessionHandle: TSessionHandle; + catalogName?: string; + schemaName?: string; + tableName?: string; + getDirectResults?: TSparkGetDirectResults; + runAsync?: boolean; + operationId?: THandleIdentifier; + sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; catalogName?: string; schemaName?: string; tableName?: string; getDirectResults?: TSparkGetDirectResults; runAsync?: boolean; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; }); } -declare class TGetPrimaryKeysResp { - public status: TStatus; - public operationHandle?: TOperationHandle; - public directResults?: TSparkDirectResults; +export declare class TGetPrimaryKeysResp { + status: TStatus; + operationHandle?: TOperationHandle; + directResults?: TSparkDirectResults; constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; }); } -declare class TGetCrossReferenceReq { - public sessionHandle: TSessionHandle; - public parentCatalogName?: string; - public parentSchemaName?: string; - public parentTableName?: string; - public foreignCatalogName?: string; - public foreignSchemaName?: string; - public foreignTableName?: string; - public getDirectResults?: TSparkGetDirectResults; - public runAsync?: boolean; - public operationId?: THandleIdentifier; - public sessionConf?: TDBSqlSessionConf; +export declare class TGetCrossReferenceReq { + sessionHandle: TSessionHandle; + parentCatalogName?: string; + parentSchemaName?: string; + parentTableName?: string; + foreignCatalogName?: string; + foreignSchemaName?: string; + foreignTableName?: string; + getDirectResults?: TSparkGetDirectResults; + runAsync?: boolean; + operationId?: THandleIdentifier; + sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; parentCatalogName?: string; parentSchemaName?: string; parentTableName?: string; foreignCatalogName?: string; foreignSchemaName?: string; foreignTableName?: string; getDirectResults?: TSparkGetDirectResults; runAsync?: boolean; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; }); } -declare class TGetCrossReferenceResp { - public status: TStatus; - public operationHandle?: TOperationHandle; - public directResults?: TSparkDirectResults; +export declare class TGetCrossReferenceResp { + status: TStatus; + operationHandle?: TOperationHandle; + directResults?: TSparkDirectResults; constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; }); } -declare class TGetOperationStatusReq { - public operationHandle: TOperationHandle; - public getProgressUpdate?: boolean; +export declare class TGetOperationStatusReq { + operationHandle: TOperationHandle; + getProgressUpdate?: boolean; constructor(args?: { operationHandle: TOperationHandle; getProgressUpdate?: boolean; }); } -declare class TGetOperationStatusResp { - public status: TStatus; - public operationState?: TOperationState; - public sqlState?: string; - public errorCode?: number; - public errorMessage?: string; - public taskStatus?: string; - public operationStarted?: Int64; - public operationCompleted?: Int64; - public hasResultSet?: boolean; - public progressUpdateResponse?: TProgressUpdateResp; - public numModifiedRows?: Int64; - public displayMessage?: string; - public diagnosticInfo?: string; - public responseValidation?: Buffer; - public idempotencyType?: TOperationIdempotencyType; - public statementTimeout?: Int64; - public statementTimeoutLevel?: TOperationTimeoutLevel; - - constructor(args?: { status: TStatus; operationState?: TOperationState; sqlState?: string; errorCode?: number; errorMessage?: string; taskStatus?: string; operationStarted?: Int64; operationCompleted?: Int64; hasResultSet?: boolean; progressUpdateResponse?: TProgressUpdateResp; numModifiedRows?: Int64; displayMessage?: string; diagnosticInfo?: string; responseValidation?: Buffer; idempotencyType?: TOperationIdempotencyType; statementTimeout?: Int64; statementTimeoutLevel?: TOperationTimeoutLevel; }); -} - -declare class TCancelOperationReq { - public operationHandle: TOperationHandle; - public executionVersion?: number; - public replacedByNextAttempt?: boolean; +export declare class TGetOperationStatusResp { + status: TStatus; + operationState?: TOperationState; + sqlState?: string; + errorCode?: number; + errorMessage?: string; + taskStatus?: string; + operationStarted?: Int64; + operationCompleted?: Int64; + hasResultSet?: boolean; + progressUpdateResponse?: TProgressUpdateResp; + numModifiedRows?: Int64; + displayMessage?: string; + diagnosticInfo?: string; + errorDetailsJson?: string; + responseValidation?: Buffer; + idempotencyType?: TOperationIdempotencyType; + statementTimeout?: Int64; + statementTimeoutLevel?: TOperationTimeoutLevel; + + constructor(args?: { status: TStatus; operationState?: TOperationState; sqlState?: string; errorCode?: number; errorMessage?: string; taskStatus?: string; operationStarted?: Int64; operationCompleted?: Int64; hasResultSet?: boolean; progressUpdateResponse?: TProgressUpdateResp; numModifiedRows?: Int64; displayMessage?: string; diagnosticInfo?: string; errorDetailsJson?: string; responseValidation?: Buffer; idempotencyType?: TOperationIdempotencyType; statementTimeout?: Int64; statementTimeoutLevel?: TOperationTimeoutLevel; }); +} + +export declare class TCancelOperationReq { + operationHandle: TOperationHandle; + executionVersion?: number; + replacedByNextAttempt?: boolean; constructor(args?: { operationHandle: TOperationHandle; executionVersion?: number; replacedByNextAttempt?: boolean; }); } -declare class TCancelOperationResp { - public status: TStatus; +export declare class TCancelOperationResp { + status: TStatus; constructor(args?: { status: TStatus; }); } -declare class TCloseOperationReq { - public operationHandle: TOperationHandle; +export declare class TCloseOperationReq { + operationHandle: TOperationHandle; constructor(args?: { operationHandle: TOperationHandle; }); } -declare class TCloseOperationResp { - public status: TStatus; +export declare class TCloseOperationResp { + status: TStatus; constructor(args?: { status: TStatus; }); } -declare class TGetResultSetMetadataReq { - public operationHandle: TOperationHandle; - public includeCloudResultFiles?: boolean; +export declare class TGetResultSetMetadataReq { + operationHandle: TOperationHandle; + includeCloudResultFiles?: boolean; constructor(args?: { operationHandle: TOperationHandle; includeCloudResultFiles?: boolean; }); } -declare class TGetResultSetMetadataResp { - public status: TStatus; - public schema?: TTableSchema; - public resultFormat?: TSparkRowSetType; - public lz4Compressed?: boolean; - public arrowSchema?: Buffer; - public cacheLookupResult?: TCacheLookupResult; - public uncompressedBytes?: Int64; - public compressedBytes?: Int64; - public isStagingOperation?: boolean; - public reasonForNoCloudFetch?: TCloudFetchDisabledReason; - public resultFiles?: TDBSqlCloudResultFile[]; - public manifestFile?: string; - public manifestFileFormat?: TDBSqlManifestFileFormat; - public cacheLookupLatency?: Int64; - public remoteCacheMissReason?: string; - public fetchDisposition?: TDBSqlFetchDisposition; - public remoteResultCacheEnabled?: boolean; - public isServerless?: boolean; - public resultDataFormat?: TDBSqlResultFormat; - public truncatedByThriftLimit?: boolean; - - constructor(args?: { status: TStatus; schema?: TTableSchema; resultFormat?: TSparkRowSetType; lz4Compressed?: boolean; arrowSchema?: Buffer; cacheLookupResult?: TCacheLookupResult; uncompressedBytes?: Int64; compressedBytes?: Int64; isStagingOperation?: boolean; reasonForNoCloudFetch?: TCloudFetchDisabledReason; resultFiles?: TDBSqlCloudResultFile[]; manifestFile?: string; manifestFileFormat?: TDBSqlManifestFileFormat; cacheLookupLatency?: Int64; remoteCacheMissReason?: string; fetchDisposition?: TDBSqlFetchDisposition; remoteResultCacheEnabled?: boolean; isServerless?: boolean; resultDataFormat?: TDBSqlResultFormat; truncatedByThriftLimit?: boolean; }); -} - -declare class TFetchResultsReq { - public operationHandle: TOperationHandle; - public orientation?: TFetchOrientation; - public maxRows: Int64; - public fetchType?: number; - public maxBytes?: Int64; - public startRowOffset?: Int64; - public includeResultSetMetadata?: boolean; +export declare class TGetResultSetMetadataResp { + status: TStatus; + schema?: TTableSchema; + resultFormat?: TSparkRowSetType; + lz4Compressed?: boolean; + arrowSchema?: Buffer; + cacheLookupResult?: TCacheLookupResult; + uncompressedBytes?: Int64; + compressedBytes?: Int64; + isStagingOperation?: boolean; + reasonForNoCloudFetch?: TCloudFetchDisabledReason; + resultFiles?: TDBSqlCloudResultFile[]; + manifestFile?: string; + manifestFileFormat?: TDBSqlManifestFileFormat; + cacheLookupLatency?: Int64; + remoteCacheMissReason?: string; + fetchDisposition?: TDBSqlFetchDisposition; + remoteResultCacheEnabled?: boolean; + isServerless?: boolean; + resultDataFormat?: TDBSqlResultFormat; + truncatedByThriftLimit?: boolean; + resultByteLimit?: Int64; + + constructor(args?: { status: TStatus; schema?: TTableSchema; resultFormat?: TSparkRowSetType; lz4Compressed?: boolean; arrowSchema?: Buffer; cacheLookupResult?: TCacheLookupResult; uncompressedBytes?: Int64; compressedBytes?: Int64; isStagingOperation?: boolean; reasonForNoCloudFetch?: TCloudFetchDisabledReason; resultFiles?: TDBSqlCloudResultFile[]; manifestFile?: string; manifestFileFormat?: TDBSqlManifestFileFormat; cacheLookupLatency?: Int64; remoteCacheMissReason?: string; fetchDisposition?: TDBSqlFetchDisposition; remoteResultCacheEnabled?: boolean; isServerless?: boolean; resultDataFormat?: TDBSqlResultFormat; truncatedByThriftLimit?: boolean; resultByteLimit?: Int64; }); +} + +export declare class TFetchResultsReq { + operationHandle: TOperationHandle; + orientation?: TFetchOrientation; + maxRows: Int64; + fetchType?: number; + maxBytes?: Int64; + startRowOffset?: Int64; + includeResultSetMetadata?: boolean; constructor(args?: { operationHandle: TOperationHandle; orientation?: TFetchOrientation; maxRows: Int64; fetchType?: number; maxBytes?: Int64; startRowOffset?: Int64; includeResultSetMetadata?: boolean; }); } -declare class TFetchResultsResp { - public status: TStatus; - public hasMoreRows?: boolean; - public results?: TRowSet; - public resultSetMetadata?: TGetResultSetMetadataResp; - public responseValidation?: Buffer; +export declare class TFetchResultsResp { + status: TStatus; + hasMoreRows?: boolean; + results?: TRowSet; + resultSetMetadata?: TGetResultSetMetadataResp; + responseValidation?: Buffer; constructor(args?: { status: TStatus; hasMoreRows?: boolean; results?: TRowSet; resultSetMetadata?: TGetResultSetMetadataResp; responseValidation?: Buffer; }); } -declare class TGetDelegationTokenReq { - public sessionHandle: TSessionHandle; - public owner: string; - public renewer: string; - public sessionConf?: TDBSqlSessionConf; +export declare class TGetDelegationTokenReq { + sessionHandle: TSessionHandle; + owner: string; + renewer: string; + sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; owner: string; renewer: string; sessionConf?: TDBSqlSessionConf; }); } -declare class TGetDelegationTokenResp { - public status: TStatus; - public delegationToken?: string; +export declare class TGetDelegationTokenResp { + status: TStatus; + delegationToken?: string; constructor(args?: { status: TStatus; delegationToken?: string; }); } -declare class TCancelDelegationTokenReq { - public sessionHandle: TSessionHandle; - public delegationToken: string; - public sessionConf?: TDBSqlSessionConf; +export declare class TCancelDelegationTokenReq { + sessionHandle: TSessionHandle; + delegationToken: string; + sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; delegationToken: string; sessionConf?: TDBSqlSessionConf; }); } -declare class TCancelDelegationTokenResp { - public status: TStatus; +export declare class TCancelDelegationTokenResp { + status: TStatus; constructor(args?: { status: TStatus; }); } -declare class TRenewDelegationTokenReq { - public sessionHandle: TSessionHandle; - public delegationToken: string; - public sessionConf?: TDBSqlSessionConf; +export declare class TRenewDelegationTokenReq { + sessionHandle: TSessionHandle; + delegationToken: string; + sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; delegationToken: string; sessionConf?: TDBSqlSessionConf; }); } -declare class TRenewDelegationTokenResp { - public status: TStatus; +export declare class TRenewDelegationTokenResp { + status: TStatus; constructor(args?: { status: TStatus; }); } -declare class TProgressUpdateResp { - public headerNames: string[]; - public rows: string[][]; - public progressedPercentage: number; - public status: TJobExecutionStatus; - public footerSummary: string; - public startTime: Int64; +export declare class TProgressUpdateResp { + headerNames: string[]; + rows: string[][]; + progressedPercentage: number; + status: TJobExecutionStatus; + footerSummary: string; + startTime: Int64; constructor(args?: { headerNames: string[]; rows: string[][]; progressedPercentage: number; status: TJobExecutionStatus; footerSummary: string; startTime: Int64; }); } -declare var PRIMITIVE_TYPES: TTypeId[]; +export declare var PRIMITIVE_TYPES: TTypeId[]; -declare var COMPLEX_TYPES: TTypeId[]; +export declare var COMPLEX_TYPES: TTypeId[]; -declare var COLLECTION_TYPES: TTypeId[]; +export declare var COLLECTION_TYPES: TTypeId[]; -declare var TYPE_NAMES: { [k: number /*TTypeId*/]: string; }; +export declare var TYPE_NAMES: { [k: number /*TTypeId*/]: string; }; -declare var CHARACTER_MAXIMUM_LENGTH: string; +export declare var CHARACTER_MAXIMUM_LENGTH: string; -declare var PRECISION: string; +export declare var PRECISION: string; -declare var SCALE: string; +export declare var SCALE: string; diff --git a/thrift/TCLIService_types.js b/thrift/TCLIService_types.js index 3e09415b..d40c8ae0 100644 --- a/thrift/TCLIService_types.js +++ b/thrift/TCLIService_types.js @@ -3,16 +3,12 @@ // // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING // -"use strict"; +if (typeof Int64 === 'undefined' && typeof require === 'function') { + var Int64 = require('node-int64'); +} -var thrift = require('thrift'); -var Thrift = thrift.Thrift; -var Q = thrift.Q; -var Int64 = require('node-int64'); - -var ttypes = module.exports = {}; -ttypes.TProtocolVersion = { +TProtocolVersion = { '-7' : '__HIVE_JDBC_WORKAROUND', '__HIVE_JDBC_WORKAROUND' : -7, '65281' : '__TEST_PROTOCOL_VERSION', @@ -52,7 +48,7 @@ ttypes.TProtocolVersion = { '42247' : 'SPARK_CLI_SERVICE_PROTOCOL_V7', 'SPARK_CLI_SERVICE_PROTOCOL_V7' : 42247 }; -ttypes.TTypeId = { +TTypeId = { '0' : 'BOOLEAN_TYPE', 'BOOLEAN_TYPE' : 0, '1' : 'TINYINT_TYPE', @@ -98,7 +94,7 @@ ttypes.TTypeId = { '21' : 'INTERVAL_DAY_TIME_TYPE', 'INTERVAL_DAY_TIME_TYPE' : 21 }; -ttypes.TSparkRowSetType = { +TSparkRowSetType = { '0' : 'ARROW_BASED_SET', 'ARROW_BASED_SET' : 0, '1' : 'COLUMN_BASED_SET', @@ -108,7 +104,7 @@ ttypes.TSparkRowSetType = { '3' : 'URL_BASED_SET', 'URL_BASED_SET' : 3 }; -ttypes.TDBSqlCompressionCodec = { +TDBSqlCompressionCodec = { '0' : 'NONE', 'NONE' : 0, '1' : 'LZ4_FRAME', @@ -116,13 +112,13 @@ ttypes.TDBSqlCompressionCodec = { '2' : 'LZ4_BLOCK', 'LZ4_BLOCK' : 2 }; -ttypes.TDBSqlArrowLayout = { +TDBSqlArrowLayout = { '0' : 'ARROW_BATCH', 'ARROW_BATCH' : 0, '1' : 'ARROW_STREAMING', 'ARROW_STREAMING' : 1 }; -ttypes.TOperationIdempotencyType = { +TOperationIdempotencyType = { '0' : 'UNKNOWN', 'UNKNOWN' : 0, '1' : 'NON_IDEMPOTENT', @@ -130,13 +126,13 @@ ttypes.TOperationIdempotencyType = { '2' : 'IDEMPOTENT', 'IDEMPOTENT' : 2 }; -ttypes.TOperationTimeoutLevel = { +TOperationTimeoutLevel = { '0' : 'CLUSTER', 'CLUSTER' : 0, '1' : 'SESSION', 'SESSION' : 1 }; -ttypes.TStatusCode = { +TStatusCode = { '0' : 'SUCCESS_STATUS', 'SUCCESS_STATUS' : 0, '1' : 'SUCCESS_WITH_INFO_STATUS', @@ -148,7 +144,7 @@ ttypes.TStatusCode = { '4' : 'INVALID_HANDLE_STATUS', 'INVALID_HANDLE_STATUS' : 4 }; -ttypes.TOperationState = { +TOperationState = { '0' : 'INITIALIZED_STATE', 'INITIALIZED_STATE' : 0, '1' : 'RUNNING_STATE', @@ -168,7 +164,7 @@ ttypes.TOperationState = { '8' : 'TIMEDOUT_STATE', 'TIMEDOUT_STATE' : 8 }; -ttypes.TOperationType = { +TOperationType = { '0' : 'EXECUTE_STATEMENT', 'EXECUTE_STATEMENT' : 0, '1' : 'GET_TYPE_INFO', @@ -188,7 +184,7 @@ ttypes.TOperationType = { '8' : 'UNKNOWN', 'UNKNOWN' : 8 }; -ttypes.TGetInfoType = { +TGetInfoType = { '0' : 'CLI_MAX_DRIVER_CONNECTIONS', 'CLI_MAX_DRIVER_CONNECTIONS' : 0, '1' : 'CLI_MAX_CONCURRENT_ACTIVITIES', @@ -284,7 +280,7 @@ ttypes.TGetInfoType = { '10005' : 'CLI_MAX_IDENTIFIER_LEN', 'CLI_MAX_IDENTIFIER_LEN' : 10005 }; -ttypes.TResultPersistenceMode = { +TResultPersistenceMode = { '0' : 'ONLY_LARGE_RESULTS', 'ONLY_LARGE_RESULTS' : 0, '1' : 'ALL_QUERY_RESULTS', @@ -292,7 +288,7 @@ ttypes.TResultPersistenceMode = { '2' : 'ALL_RESULTS', 'ALL_RESULTS' : 2 }; -ttypes.TCacheLookupResult = { +TCacheLookupResult = { '0' : 'CACHE_INELIGIBLE', 'CACHE_INELIGIBLE' : 0, '1' : 'LOCAL_CACHE_HIT', @@ -302,7 +298,7 @@ ttypes.TCacheLookupResult = { '3' : 'CACHE_MISS', 'CACHE_MISS' : 3 }; -ttypes.TCloudFetchDisabledReason = { +TCloudFetchDisabledReason = { '0' : 'ARROW_SUPPORT', 'ARROW_SUPPORT' : 0, '1' : 'CLOUD_FETCH_SUPPORT', @@ -320,11 +316,11 @@ ttypes.TCloudFetchDisabledReason = { '7' : 'UNKNOWN', 'UNKNOWN' : 7 }; -ttypes.TDBSqlManifestFileFormat = { +TDBSqlManifestFileFormat = { '0' : 'THRIFT_GET_RESULT_SET_METADATA_RESP', 'THRIFT_GET_RESULT_SET_METADATA_RESP' : 0 }; -ttypes.TFetchOrientation = { +TFetchOrientation = { '0' : 'FETCH_NEXT', 'FETCH_NEXT' : 0, '1' : 'FETCH_PRIOR', @@ -338,7 +334,7 @@ ttypes.TFetchOrientation = { '5' : 'FETCH_LAST', 'FETCH_LAST' : 5 }; -ttypes.TDBSqlFetchDisposition = { +TDBSqlFetchDisposition = { '0' : 'DISPOSITION_UNSPECIFIED', 'DISPOSITION_UNSPECIFIED' : 0, '1' : 'DISPOSITION_INLINE', @@ -348,7 +344,7 @@ ttypes.TDBSqlFetchDisposition = { '3' : 'DISPOSITION_INTERNAL_DBFS', 'DISPOSITION_INTERNAL_DBFS' : 3 }; -ttypes.TJobExecutionStatus = { +TJobExecutionStatus = { '0' : 'IN_PROGRESS', 'IN_PROGRESS' : 0, '1' : 'COMPLETE', @@ -356,7 +352,7 @@ ttypes.TJobExecutionStatus = { '2' : 'NOT_AVAILABLE', 'NOT_AVAILABLE' : 2 }; -var TTypeQualifierValue = module.exports.TTypeQualifierValue = function(args) { +TTypeQualifierValue = function(args) { this.i32Value = null; this.stringValue = null; if (args) { @@ -381,14 +377,14 @@ TTypeQualifierValue.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.i32Value = input.readI32(); + this.i32Value = input.readI32().value; } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { - this.stringValue = input.readString(); + this.stringValue = input.readString().value; } else { input.skip(ftype); } @@ -419,11 +415,11 @@ TTypeQualifierValue.prototype.write = function(output) { return; }; -var TTypeQualifiers = module.exports.TTypeQualifiers = function(args) { +TTypeQualifiers = function(args) { this.qualifiers = null; if (args) { if (args.qualifiers !== undefined && args.qualifiers !== null) { - this.qualifiers = Thrift.copyMap(args.qualifiers, [ttypes.TTypeQualifierValue]); + this.qualifiers = Thrift.copyMap(args.qualifiers, [TTypeQualifierValue]); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field qualifiers is unset!'); } @@ -446,10 +442,15 @@ TTypeQualifiers.prototype.read = function(input) { var _rtmp31 = input.readMapBegin(); var _size0 = _rtmp31.size || 0; for (var _i2 = 0; _i2 < _size0; ++_i2) { + if (_i2 > 0 ) { + if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { + input.rstack.pop(); + } + } var key3 = null; var val4 = null; - key3 = input.readString(); - val4 = new ttypes.TTypeQualifierValue(); + key3 = input.readString().value; + val4 = new TTypeQualifierValue(); val4.read(input); this.qualifiers[key3] = val4; } @@ -490,7 +491,7 @@ TTypeQualifiers.prototype.write = function(output) { return; }; -var TPrimitiveTypeEntry = module.exports.TPrimitiveTypeEntry = function(args) { +TPrimitiveTypeEntry = function(args) { this.type = null; this.typeQualifiers = null; if (args) { @@ -500,7 +501,7 @@ var TPrimitiveTypeEntry = module.exports.TPrimitiveTypeEntry = function(args) { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field type is unset!'); } if (args.typeQualifiers !== undefined && args.typeQualifiers !== null) { - this.typeQualifiers = new ttypes.TTypeQualifiers(args.typeQualifiers); + this.typeQualifiers = new TTypeQualifiers(args.typeQualifiers); } } }; @@ -517,14 +518,14 @@ TPrimitiveTypeEntry.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.type = input.readI32(); + this.type = input.readI32().value; } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.typeQualifiers = new ttypes.TTypeQualifiers(); + this.typeQualifiers = new TTypeQualifiers(); this.typeQualifiers.read(input); } else { input.skip(ftype); @@ -556,7 +557,7 @@ TPrimitiveTypeEntry.prototype.write = function(output) { return; }; -var TArrayTypeEntry = module.exports.TArrayTypeEntry = function(args) { +TArrayTypeEntry = function(args) { this.objectTypePtr = null; if (args) { if (args.objectTypePtr !== undefined && args.objectTypePtr !== null) { @@ -579,7 +580,7 @@ TArrayTypeEntry.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.objectTypePtr = input.readI32(); + this.objectTypePtr = input.readI32().value; } else { input.skip(ftype); } @@ -608,7 +609,7 @@ TArrayTypeEntry.prototype.write = function(output) { return; }; -var TMapTypeEntry = module.exports.TMapTypeEntry = function(args) { +TMapTypeEntry = function(args) { this.keyTypePtr = null; this.valueTypePtr = null; if (args) { @@ -637,14 +638,14 @@ TMapTypeEntry.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.keyTypePtr = input.readI32(); + this.keyTypePtr = input.readI32().value; } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I32) { - this.valueTypePtr = input.readI32(); + this.valueTypePtr = input.readI32().value; } else { input.skip(ftype); } @@ -675,7 +676,7 @@ TMapTypeEntry.prototype.write = function(output) { return; }; -var TStructTypeEntry = module.exports.TStructTypeEntry = function(args) { +TStructTypeEntry = function(args) { this.nameToTypePtr = null; if (args) { if (args.nameToTypePtr !== undefined && args.nameToTypePtr !== null) { @@ -702,10 +703,15 @@ TStructTypeEntry.prototype.read = function(input) { var _rtmp38 = input.readMapBegin(); var _size7 = _rtmp38.size || 0; for (var _i9 = 0; _i9 < _size7; ++_i9) { + if (_i9 > 0 ) { + if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { + input.rstack.pop(); + } + } var key10 = null; var val11 = null; - key10 = input.readString(); - val11 = input.readI32(); + key10 = input.readString().value; + val11 = input.readI32().value; this.nameToTypePtr[key10] = val11; } input.readMapEnd(); @@ -745,7 +751,7 @@ TStructTypeEntry.prototype.write = function(output) { return; }; -var TUnionTypeEntry = module.exports.TUnionTypeEntry = function(args) { +TUnionTypeEntry = function(args) { this.nameToTypePtr = null; if (args) { if (args.nameToTypePtr !== undefined && args.nameToTypePtr !== null) { @@ -772,10 +778,15 @@ TUnionTypeEntry.prototype.read = function(input) { var _rtmp315 = input.readMapBegin(); var _size14 = _rtmp315.size || 0; for (var _i16 = 0; _i16 < _size14; ++_i16) { + if (_i16 > 0 ) { + if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { + input.rstack.pop(); + } + } var key17 = null; var val18 = null; - key17 = input.readString(); - val18 = input.readI32(); + key17 = input.readString().value; + val18 = input.readI32().value; this.nameToTypePtr[key17] = val18; } input.readMapEnd(); @@ -815,7 +826,7 @@ TUnionTypeEntry.prototype.write = function(output) { return; }; -var TUserDefinedTypeEntry = module.exports.TUserDefinedTypeEntry = function(args) { +TUserDefinedTypeEntry = function(args) { this.typeClassName = null; if (args) { if (args.typeClassName !== undefined && args.typeClassName !== null) { @@ -838,7 +849,7 @@ TUserDefinedTypeEntry.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.typeClassName = input.readString(); + this.typeClassName = input.readString().value; } else { input.skip(ftype); } @@ -867,7 +878,7 @@ TUserDefinedTypeEntry.prototype.write = function(output) { return; }; -var TTypeEntry = module.exports.TTypeEntry = function(args) { +TTypeEntry = function(args) { this.primitiveEntry = null; this.arrayEntry = null; this.mapEntry = null; @@ -876,22 +887,22 @@ var TTypeEntry = module.exports.TTypeEntry = function(args) { this.userDefinedTypeEntry = null; if (args) { if (args.primitiveEntry !== undefined && args.primitiveEntry !== null) { - this.primitiveEntry = new ttypes.TPrimitiveTypeEntry(args.primitiveEntry); + this.primitiveEntry = new TPrimitiveTypeEntry(args.primitiveEntry); } if (args.arrayEntry !== undefined && args.arrayEntry !== null) { - this.arrayEntry = new ttypes.TArrayTypeEntry(args.arrayEntry); + this.arrayEntry = new TArrayTypeEntry(args.arrayEntry); } if (args.mapEntry !== undefined && args.mapEntry !== null) { - this.mapEntry = new ttypes.TMapTypeEntry(args.mapEntry); + this.mapEntry = new TMapTypeEntry(args.mapEntry); } if (args.structEntry !== undefined && args.structEntry !== null) { - this.structEntry = new ttypes.TStructTypeEntry(args.structEntry); + this.structEntry = new TStructTypeEntry(args.structEntry); } if (args.unionEntry !== undefined && args.unionEntry !== null) { - this.unionEntry = new ttypes.TUnionTypeEntry(args.unionEntry); + this.unionEntry = new TUnionTypeEntry(args.unionEntry); } if (args.userDefinedTypeEntry !== undefined && args.userDefinedTypeEntry !== null) { - this.userDefinedTypeEntry = new ttypes.TUserDefinedTypeEntry(args.userDefinedTypeEntry); + this.userDefinedTypeEntry = new TUserDefinedTypeEntry(args.userDefinedTypeEntry); } } }; @@ -908,7 +919,7 @@ TTypeEntry.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.primitiveEntry = new ttypes.TPrimitiveTypeEntry(); + this.primitiveEntry = new TPrimitiveTypeEntry(); this.primitiveEntry.read(input); } else { input.skip(ftype); @@ -916,7 +927,7 @@ TTypeEntry.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.arrayEntry = new ttypes.TArrayTypeEntry(); + this.arrayEntry = new TArrayTypeEntry(); this.arrayEntry.read(input); } else { input.skip(ftype); @@ -924,7 +935,7 @@ TTypeEntry.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.STRUCT) { - this.mapEntry = new ttypes.TMapTypeEntry(); + this.mapEntry = new TMapTypeEntry(); this.mapEntry.read(input); } else { input.skip(ftype); @@ -932,7 +943,7 @@ TTypeEntry.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.STRUCT) { - this.structEntry = new ttypes.TStructTypeEntry(); + this.structEntry = new TStructTypeEntry(); this.structEntry.read(input); } else { input.skip(ftype); @@ -940,7 +951,7 @@ TTypeEntry.prototype.read = function(input) { break; case 5: if (ftype == Thrift.Type.STRUCT) { - this.unionEntry = new ttypes.TUnionTypeEntry(); + this.unionEntry = new TUnionTypeEntry(); this.unionEntry.read(input); } else { input.skip(ftype); @@ -948,7 +959,7 @@ TTypeEntry.prototype.read = function(input) { break; case 6: if (ftype == Thrift.Type.STRUCT) { - this.userDefinedTypeEntry = new ttypes.TUserDefinedTypeEntry(); + this.userDefinedTypeEntry = new TUserDefinedTypeEntry(); this.userDefinedTypeEntry.read(input); } else { input.skip(ftype); @@ -1000,11 +1011,11 @@ TTypeEntry.prototype.write = function(output) { return; }; -var TTypeDesc = module.exports.TTypeDesc = function(args) { +TTypeDesc = function(args) { this.types = null; if (args) { if (args.types !== undefined && args.types !== null) { - this.types = Thrift.copyList(args.types, [ttypes.TTypeEntry]); + this.types = Thrift.copyList(args.types, [TTypeEntry]); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field types is unset!'); } @@ -1028,7 +1039,7 @@ TTypeDesc.prototype.read = function(input) { var _size21 = _rtmp322.size || 0; for (var _i23 = 0; _i23 < _size21; ++_i23) { var elem24 = null; - elem24 = new ttypes.TTypeEntry(); + elem24 = new TTypeEntry(); elem24.read(input); this.types.push(elem24); } @@ -1068,7 +1079,7 @@ TTypeDesc.prototype.write = function(output) { return; }; -var TColumnDesc = module.exports.TColumnDesc = function(args) { +TColumnDesc = function(args) { this.columnName = null; this.typeDesc = null; this.position = null; @@ -1080,7 +1091,7 @@ var TColumnDesc = module.exports.TColumnDesc = function(args) { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field columnName is unset!'); } if (args.typeDesc !== undefined && args.typeDesc !== null) { - this.typeDesc = new ttypes.TTypeDesc(args.typeDesc); + this.typeDesc = new TTypeDesc(args.typeDesc); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field typeDesc is unset!'); } @@ -1107,14 +1118,14 @@ TColumnDesc.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.columnName = input.readString(); + this.columnName = input.readString().value; } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.typeDesc = new ttypes.TTypeDesc(); + this.typeDesc = new TTypeDesc(); this.typeDesc.read(input); } else { input.skip(ftype); @@ -1122,14 +1133,14 @@ TColumnDesc.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.I32) { - this.position = input.readI32(); + this.position = input.readI32().value; } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { - this.comment = input.readString(); + this.comment = input.readString().value; } else { input.skip(ftype); } @@ -1170,11 +1181,11 @@ TColumnDesc.prototype.write = function(output) { return; }; -var TTableSchema = module.exports.TTableSchema = function(args) { +TTableSchema = function(args) { this.columns = null; if (args) { if (args.columns !== undefined && args.columns !== null) { - this.columns = Thrift.copyList(args.columns, [ttypes.TColumnDesc]); + this.columns = Thrift.copyList(args.columns, [TColumnDesc]); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field columns is unset!'); } @@ -1198,7 +1209,7 @@ TTableSchema.prototype.read = function(input) { var _size26 = _rtmp327.size || 0; for (var _i28 = 0; _i28 < _size26; ++_i28) { var elem29 = null; - elem29 = new ttypes.TColumnDesc(); + elem29 = new TColumnDesc(); elem29.read(input); this.columns.push(elem29); } @@ -1238,7 +1249,7 @@ TTableSchema.prototype.write = function(output) { return; }; -var TBoolValue = module.exports.TBoolValue = function(args) { +TBoolValue = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { @@ -1259,7 +1270,7 @@ TBoolValue.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.BOOL) { - this.value = input.readBool(); + this.value = input.readBool().value; } else { input.skip(ftype); } @@ -1288,7 +1299,7 @@ TBoolValue.prototype.write = function(output) { return; }; -var TByteValue = module.exports.TByteValue = function(args) { +TByteValue = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { @@ -1309,7 +1320,7 @@ TByteValue.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.BYTE) { - this.value = input.readByte(); + this.value = input.readByte().value; } else { input.skip(ftype); } @@ -1338,7 +1349,7 @@ TByteValue.prototype.write = function(output) { return; }; -var TI16Value = module.exports.TI16Value = function(args) { +TI16Value = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { @@ -1359,7 +1370,7 @@ TI16Value.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I16) { - this.value = input.readI16(); + this.value = input.readI16().value; } else { input.skip(ftype); } @@ -1388,7 +1399,7 @@ TI16Value.prototype.write = function(output) { return; }; -var TI32Value = module.exports.TI32Value = function(args) { +TI32Value = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { @@ -1409,7 +1420,7 @@ TI32Value.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.value = input.readI32(); + this.value = input.readI32().value; } else { input.skip(ftype); } @@ -1438,7 +1449,7 @@ TI32Value.prototype.write = function(output) { return; }; -var TI64Value = module.exports.TI64Value = function(args) { +TI64Value = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { @@ -1459,7 +1470,7 @@ TI64Value.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I64) { - this.value = input.readI64(); + this.value = input.readI64().value; } else { input.skip(ftype); } @@ -1488,7 +1499,7 @@ TI64Value.prototype.write = function(output) { return; }; -var TDoubleValue = module.exports.TDoubleValue = function(args) { +TDoubleValue = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { @@ -1509,7 +1520,7 @@ TDoubleValue.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.DOUBLE) { - this.value = input.readDouble(); + this.value = input.readDouble().value; } else { input.skip(ftype); } @@ -1538,7 +1549,7 @@ TDoubleValue.prototype.write = function(output) { return; }; -var TStringValue = module.exports.TStringValue = function(args) { +TStringValue = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { @@ -1559,7 +1570,7 @@ TStringValue.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.value = input.readString(); + this.value = input.readString().value; } else { input.skip(ftype); } @@ -1588,7 +1599,7 @@ TStringValue.prototype.write = function(output) { return; }; -var TColumnValue = module.exports.TColumnValue = function(args) { +TColumnValue = function(args) { this.boolVal = null; this.byteVal = null; this.i16Val = null; @@ -1598,25 +1609,25 @@ var TColumnValue = module.exports.TColumnValue = function(args) { this.stringVal = null; if (args) { if (args.boolVal !== undefined && args.boolVal !== null) { - this.boolVal = new ttypes.TBoolValue(args.boolVal); + this.boolVal = new TBoolValue(args.boolVal); } if (args.byteVal !== undefined && args.byteVal !== null) { - this.byteVal = new ttypes.TByteValue(args.byteVal); + this.byteVal = new TByteValue(args.byteVal); } if (args.i16Val !== undefined && args.i16Val !== null) { - this.i16Val = new ttypes.TI16Value(args.i16Val); + this.i16Val = new TI16Value(args.i16Val); } if (args.i32Val !== undefined && args.i32Val !== null) { - this.i32Val = new ttypes.TI32Value(args.i32Val); + this.i32Val = new TI32Value(args.i32Val); } if (args.i64Val !== undefined && args.i64Val !== null) { - this.i64Val = new ttypes.TI64Value(args.i64Val); + this.i64Val = new TI64Value(args.i64Val); } if (args.doubleVal !== undefined && args.doubleVal !== null) { - this.doubleVal = new ttypes.TDoubleValue(args.doubleVal); + this.doubleVal = new TDoubleValue(args.doubleVal); } if (args.stringVal !== undefined && args.stringVal !== null) { - this.stringVal = new ttypes.TStringValue(args.stringVal); + this.stringVal = new TStringValue(args.stringVal); } } }; @@ -1633,7 +1644,7 @@ TColumnValue.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.boolVal = new ttypes.TBoolValue(); + this.boolVal = new TBoolValue(); this.boolVal.read(input); } else { input.skip(ftype); @@ -1641,7 +1652,7 @@ TColumnValue.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.byteVal = new ttypes.TByteValue(); + this.byteVal = new TByteValue(); this.byteVal.read(input); } else { input.skip(ftype); @@ -1649,7 +1660,7 @@ TColumnValue.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.STRUCT) { - this.i16Val = new ttypes.TI16Value(); + this.i16Val = new TI16Value(); this.i16Val.read(input); } else { input.skip(ftype); @@ -1657,7 +1668,7 @@ TColumnValue.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.STRUCT) { - this.i32Val = new ttypes.TI32Value(); + this.i32Val = new TI32Value(); this.i32Val.read(input); } else { input.skip(ftype); @@ -1665,7 +1676,7 @@ TColumnValue.prototype.read = function(input) { break; case 5: if (ftype == Thrift.Type.STRUCT) { - this.i64Val = new ttypes.TI64Value(); + this.i64Val = new TI64Value(); this.i64Val.read(input); } else { input.skip(ftype); @@ -1673,7 +1684,7 @@ TColumnValue.prototype.read = function(input) { break; case 6: if (ftype == Thrift.Type.STRUCT) { - this.doubleVal = new ttypes.TDoubleValue(); + this.doubleVal = new TDoubleValue(); this.doubleVal.read(input); } else { input.skip(ftype); @@ -1681,7 +1692,7 @@ TColumnValue.prototype.read = function(input) { break; case 7: if (ftype == Thrift.Type.STRUCT) { - this.stringVal = new ttypes.TStringValue(); + this.stringVal = new TStringValue(); this.stringVal.read(input); } else { input.skip(ftype); @@ -1738,11 +1749,11 @@ TColumnValue.prototype.write = function(output) { return; }; -var TRow = module.exports.TRow = function(args) { +TRow = function(args) { this.colVals = null; if (args) { if (args.colVals !== undefined && args.colVals !== null) { - this.colVals = Thrift.copyList(args.colVals, [ttypes.TColumnValue]); + this.colVals = Thrift.copyList(args.colVals, [TColumnValue]); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field colVals is unset!'); } @@ -1766,7 +1777,7 @@ TRow.prototype.read = function(input) { var _size31 = _rtmp332.size || 0; for (var _i33 = 0; _i33 < _size31; ++_i33) { var elem34 = null; - elem34 = new ttypes.TColumnValue(); + elem34 = new TColumnValue(); elem34.read(input); this.colVals.push(elem34); } @@ -1806,7 +1817,7 @@ TRow.prototype.write = function(output) { return; }; -var TBoolColumn = module.exports.TBoolColumn = function(args) { +TBoolColumn = function(args) { this.values = null; this.nulls = null; if (args) { @@ -1840,7 +1851,7 @@ TBoolColumn.prototype.read = function(input) { var _size36 = _rtmp337.size || 0; for (var _i38 = 0; _i38 < _size36; ++_i38) { var elem39 = null; - elem39 = input.readBool(); + elem39 = input.readBool().value; this.values.push(elem39); } input.readListEnd(); @@ -1850,7 +1861,7 @@ TBoolColumn.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.nulls = input.readBinary(); + this.nulls = input.readBinary().value; } else { input.skip(ftype); } @@ -1888,7 +1899,7 @@ TBoolColumn.prototype.write = function(output) { return; }; -var TByteColumn = module.exports.TByteColumn = function(args) { +TByteColumn = function(args) { this.values = null; this.nulls = null; if (args) { @@ -1922,7 +1933,7 @@ TByteColumn.prototype.read = function(input) { var _size41 = _rtmp342.size || 0; for (var _i43 = 0; _i43 < _size41; ++_i43) { var elem44 = null; - elem44 = input.readByte(); + elem44 = input.readByte().value; this.values.push(elem44); } input.readListEnd(); @@ -1932,7 +1943,7 @@ TByteColumn.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.nulls = input.readBinary(); + this.nulls = input.readBinary().value; } else { input.skip(ftype); } @@ -1970,7 +1981,7 @@ TByteColumn.prototype.write = function(output) { return; }; -var TI16Column = module.exports.TI16Column = function(args) { +TI16Column = function(args) { this.values = null; this.nulls = null; if (args) { @@ -2004,7 +2015,7 @@ TI16Column.prototype.read = function(input) { var _size46 = _rtmp347.size || 0; for (var _i48 = 0; _i48 < _size46; ++_i48) { var elem49 = null; - elem49 = input.readI16(); + elem49 = input.readI16().value; this.values.push(elem49); } input.readListEnd(); @@ -2014,7 +2025,7 @@ TI16Column.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.nulls = input.readBinary(); + this.nulls = input.readBinary().value; } else { input.skip(ftype); } @@ -2052,7 +2063,7 @@ TI16Column.prototype.write = function(output) { return; }; -var TI32Column = module.exports.TI32Column = function(args) { +TI32Column = function(args) { this.values = null; this.nulls = null; if (args) { @@ -2086,7 +2097,7 @@ TI32Column.prototype.read = function(input) { var _size51 = _rtmp352.size || 0; for (var _i53 = 0; _i53 < _size51; ++_i53) { var elem54 = null; - elem54 = input.readI32(); + elem54 = input.readI32().value; this.values.push(elem54); } input.readListEnd(); @@ -2096,7 +2107,7 @@ TI32Column.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.nulls = input.readBinary(); + this.nulls = input.readBinary().value; } else { input.skip(ftype); } @@ -2134,7 +2145,7 @@ TI32Column.prototype.write = function(output) { return; }; -var TI64Column = module.exports.TI64Column = function(args) { +TI64Column = function(args) { this.values = null; this.nulls = null; if (args) { @@ -2168,7 +2179,7 @@ TI64Column.prototype.read = function(input) { var _size56 = _rtmp357.size || 0; for (var _i58 = 0; _i58 < _size56; ++_i58) { var elem59 = null; - elem59 = input.readI64(); + elem59 = input.readI64().value; this.values.push(elem59); } input.readListEnd(); @@ -2178,7 +2189,7 @@ TI64Column.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.nulls = input.readBinary(); + this.nulls = input.readBinary().value; } else { input.skip(ftype); } @@ -2216,7 +2227,7 @@ TI64Column.prototype.write = function(output) { return; }; -var TDoubleColumn = module.exports.TDoubleColumn = function(args) { +TDoubleColumn = function(args) { this.values = null; this.nulls = null; if (args) { @@ -2250,7 +2261,7 @@ TDoubleColumn.prototype.read = function(input) { var _size61 = _rtmp362.size || 0; for (var _i63 = 0; _i63 < _size61; ++_i63) { var elem64 = null; - elem64 = input.readDouble(); + elem64 = input.readDouble().value; this.values.push(elem64); } input.readListEnd(); @@ -2260,7 +2271,7 @@ TDoubleColumn.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.nulls = input.readBinary(); + this.nulls = input.readBinary().value; } else { input.skip(ftype); } @@ -2298,7 +2309,7 @@ TDoubleColumn.prototype.write = function(output) { return; }; -var TStringColumn = module.exports.TStringColumn = function(args) { +TStringColumn = function(args) { this.values = null; this.nulls = null; if (args) { @@ -2332,7 +2343,7 @@ TStringColumn.prototype.read = function(input) { var _size66 = _rtmp367.size || 0; for (var _i68 = 0; _i68 < _size66; ++_i68) { var elem69 = null; - elem69 = input.readString(); + elem69 = input.readString().value; this.values.push(elem69); } input.readListEnd(); @@ -2342,7 +2353,7 @@ TStringColumn.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.nulls = input.readBinary(); + this.nulls = input.readBinary().value; } else { input.skip(ftype); } @@ -2380,7 +2391,7 @@ TStringColumn.prototype.write = function(output) { return; }; -var TBinaryColumn = module.exports.TBinaryColumn = function(args) { +TBinaryColumn = function(args) { this.values = null; this.nulls = null; if (args) { @@ -2414,7 +2425,7 @@ TBinaryColumn.prototype.read = function(input) { var _size71 = _rtmp372.size || 0; for (var _i73 = 0; _i73 < _size71; ++_i73) { var elem74 = null; - elem74 = input.readBinary(); + elem74 = input.readBinary().value; this.values.push(elem74); } input.readListEnd(); @@ -2424,7 +2435,7 @@ TBinaryColumn.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.nulls = input.readBinary(); + this.nulls = input.readBinary().value; } else { input.skip(ftype); } @@ -2462,7 +2473,7 @@ TBinaryColumn.prototype.write = function(output) { return; }; -var TColumn = module.exports.TColumn = function(args) { +TColumn = function(args) { this.boolVal = null; this.byteVal = null; this.i16Val = null; @@ -2473,28 +2484,28 @@ var TColumn = module.exports.TColumn = function(args) { this.binaryVal = null; if (args) { if (args.boolVal !== undefined && args.boolVal !== null) { - this.boolVal = new ttypes.TBoolColumn(args.boolVal); + this.boolVal = new TBoolColumn(args.boolVal); } if (args.byteVal !== undefined && args.byteVal !== null) { - this.byteVal = new ttypes.TByteColumn(args.byteVal); + this.byteVal = new TByteColumn(args.byteVal); } if (args.i16Val !== undefined && args.i16Val !== null) { - this.i16Val = new ttypes.TI16Column(args.i16Val); + this.i16Val = new TI16Column(args.i16Val); } if (args.i32Val !== undefined && args.i32Val !== null) { - this.i32Val = new ttypes.TI32Column(args.i32Val); + this.i32Val = new TI32Column(args.i32Val); } if (args.i64Val !== undefined && args.i64Val !== null) { - this.i64Val = new ttypes.TI64Column(args.i64Val); + this.i64Val = new TI64Column(args.i64Val); } if (args.doubleVal !== undefined && args.doubleVal !== null) { - this.doubleVal = new ttypes.TDoubleColumn(args.doubleVal); + this.doubleVal = new TDoubleColumn(args.doubleVal); } if (args.stringVal !== undefined && args.stringVal !== null) { - this.stringVal = new ttypes.TStringColumn(args.stringVal); + this.stringVal = new TStringColumn(args.stringVal); } if (args.binaryVal !== undefined && args.binaryVal !== null) { - this.binaryVal = new ttypes.TBinaryColumn(args.binaryVal); + this.binaryVal = new TBinaryColumn(args.binaryVal); } } }; @@ -2511,7 +2522,7 @@ TColumn.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.boolVal = new ttypes.TBoolColumn(); + this.boolVal = new TBoolColumn(); this.boolVal.read(input); } else { input.skip(ftype); @@ -2519,7 +2530,7 @@ TColumn.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.byteVal = new ttypes.TByteColumn(); + this.byteVal = new TByteColumn(); this.byteVal.read(input); } else { input.skip(ftype); @@ -2527,7 +2538,7 @@ TColumn.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.STRUCT) { - this.i16Val = new ttypes.TI16Column(); + this.i16Val = new TI16Column(); this.i16Val.read(input); } else { input.skip(ftype); @@ -2535,7 +2546,7 @@ TColumn.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.STRUCT) { - this.i32Val = new ttypes.TI32Column(); + this.i32Val = new TI32Column(); this.i32Val.read(input); } else { input.skip(ftype); @@ -2543,7 +2554,7 @@ TColumn.prototype.read = function(input) { break; case 5: if (ftype == Thrift.Type.STRUCT) { - this.i64Val = new ttypes.TI64Column(); + this.i64Val = new TI64Column(); this.i64Val.read(input); } else { input.skip(ftype); @@ -2551,7 +2562,7 @@ TColumn.prototype.read = function(input) { break; case 6: if (ftype == Thrift.Type.STRUCT) { - this.doubleVal = new ttypes.TDoubleColumn(); + this.doubleVal = new TDoubleColumn(); this.doubleVal.read(input); } else { input.skip(ftype); @@ -2559,7 +2570,7 @@ TColumn.prototype.read = function(input) { break; case 7: if (ftype == Thrift.Type.STRUCT) { - this.stringVal = new ttypes.TStringColumn(); + this.stringVal = new TStringColumn(); this.stringVal.read(input); } else { input.skip(ftype); @@ -2567,7 +2578,7 @@ TColumn.prototype.read = function(input) { break; case 8: if (ftype == Thrift.Type.STRUCT) { - this.binaryVal = new ttypes.TBinaryColumn(); + this.binaryVal = new TBinaryColumn(); this.binaryVal.read(input); } else { input.skip(ftype); @@ -2629,7 +2640,7 @@ TColumn.prototype.write = function(output) { return; }; -var TDBSqlJsonArrayFormat = module.exports.TDBSqlJsonArrayFormat = function(args) { +TDBSqlJsonArrayFormat = function(args) { this.compressionCodec = null; if (args) { if (args.compressionCodec !== undefined && args.compressionCodec !== null) { @@ -2650,7 +2661,7 @@ TDBSqlJsonArrayFormat.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.compressionCodec = input.readI32(); + this.compressionCodec = input.readI32().value; } else { input.skip(ftype); } @@ -2679,7 +2690,7 @@ TDBSqlJsonArrayFormat.prototype.write = function(output) { return; }; -var TDBSqlCsvFormat = module.exports.TDBSqlCsvFormat = function(args) { +TDBSqlCsvFormat = function(args) { this.compressionCodec = null; if (args) { if (args.compressionCodec !== undefined && args.compressionCodec !== null) { @@ -2700,7 +2711,7 @@ TDBSqlCsvFormat.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.compressionCodec = input.readI32(); + this.compressionCodec = input.readI32().value; } else { input.skip(ftype); } @@ -2729,7 +2740,7 @@ TDBSqlCsvFormat.prototype.write = function(output) { return; }; -var TDBSqlArrowFormat = module.exports.TDBSqlArrowFormat = function(args) { +TDBSqlArrowFormat = function(args) { this.arrowLayout = null; this.compressionCodec = null; if (args) { @@ -2754,14 +2765,14 @@ TDBSqlArrowFormat.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.arrowLayout = input.readI32(); + this.arrowLayout = input.readI32().value; } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I32) { - this.compressionCodec = input.readI32(); + this.compressionCodec = input.readI32().value; } else { input.skip(ftype); } @@ -2792,19 +2803,19 @@ TDBSqlArrowFormat.prototype.write = function(output) { return; }; -var TDBSqlResultFormat = module.exports.TDBSqlResultFormat = function(args) { +TDBSqlResultFormat = function(args) { this.arrowFormat = null; this.csvFormat = null; this.jsonArrayFormat = null; if (args) { if (args.arrowFormat !== undefined && args.arrowFormat !== null) { - this.arrowFormat = new ttypes.TDBSqlArrowFormat(args.arrowFormat); + this.arrowFormat = new TDBSqlArrowFormat(args.arrowFormat); } if (args.csvFormat !== undefined && args.csvFormat !== null) { - this.csvFormat = new ttypes.TDBSqlCsvFormat(args.csvFormat); + this.csvFormat = new TDBSqlCsvFormat(args.csvFormat); } if (args.jsonArrayFormat !== undefined && args.jsonArrayFormat !== null) { - this.jsonArrayFormat = new ttypes.TDBSqlJsonArrayFormat(args.jsonArrayFormat); + this.jsonArrayFormat = new TDBSqlJsonArrayFormat(args.jsonArrayFormat); } } }; @@ -2821,7 +2832,7 @@ TDBSqlResultFormat.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.arrowFormat = new ttypes.TDBSqlArrowFormat(); + this.arrowFormat = new TDBSqlArrowFormat(); this.arrowFormat.read(input); } else { input.skip(ftype); @@ -2829,7 +2840,7 @@ TDBSqlResultFormat.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.csvFormat = new ttypes.TDBSqlCsvFormat(); + this.csvFormat = new TDBSqlCsvFormat(); this.csvFormat.read(input); } else { input.skip(ftype); @@ -2837,7 +2848,7 @@ TDBSqlResultFormat.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.STRUCT) { - this.jsonArrayFormat = new ttypes.TDBSqlJsonArrayFormat(); + this.jsonArrayFormat = new TDBSqlJsonArrayFormat(); this.jsonArrayFormat.read(input); } else { input.skip(ftype); @@ -2874,7 +2885,7 @@ TDBSqlResultFormat.prototype.write = function(output) { return; }; -var TSparkArrowBatch = module.exports.TSparkArrowBatch = function(args) { +TSparkArrowBatch = function(args) { this.batch = null; this.rowCount = null; if (args) { @@ -2903,14 +2914,14 @@ TSparkArrowBatch.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.batch = input.readBinary(); + this.batch = input.readBinary().value; } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I64) { - this.rowCount = input.readI64(); + this.rowCount = input.readI64().value; } else { input.skip(ftype); } @@ -2941,12 +2952,13 @@ TSparkArrowBatch.prototype.write = function(output) { return; }; -var TSparkArrowResultLink = module.exports.TSparkArrowResultLink = function(args) { +TSparkArrowResultLink = function(args) { this.fileLink = null; this.expiryTime = null; this.startRowOffset = null; this.rowCount = null; this.bytesNum = null; + this.httpHeaders = null; if (args) { if (args.fileLink !== undefined && args.fileLink !== null) { this.fileLink = args.fileLink; @@ -2973,6 +2985,9 @@ var TSparkArrowResultLink = module.exports.TSparkArrowResultLink = function(args } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field bytesNum is unset!'); } + if (args.httpHeaders !== undefined && args.httpHeaders !== null) { + this.httpHeaders = Thrift.copyMap(args.httpHeaders, [null]); + } } }; TSparkArrowResultLink.prototype = {}; @@ -2988,35 +3003,57 @@ TSparkArrowResultLink.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.fileLink = input.readString(); + this.fileLink = input.readString().value; } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I64) { - this.expiryTime = input.readI64(); + this.expiryTime = input.readI64().value; } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I64) { - this.startRowOffset = input.readI64(); + this.startRowOffset = input.readI64().value; } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I64) { - this.rowCount = input.readI64(); + this.rowCount = input.readI64().value; } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.I64) { - this.bytesNum = input.readI64(); + this.bytesNum = input.readI64().value; + } else { + input.skip(ftype); + } + break; + case 6: + if (ftype == Thrift.Type.MAP) { + this.httpHeaders = {}; + var _rtmp377 = input.readMapBegin(); + var _size76 = _rtmp377.size || 0; + for (var _i78 = 0; _i78 < _size76; ++_i78) { + if (_i78 > 0 ) { + if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { + input.rstack.pop(); + } + } + var key79 = null; + var val80 = null; + key79 = input.readString().value; + val80 = input.readString().value; + this.httpHeaders[key79] = val80; + } + input.readMapEnd(); } else { input.skip(ftype); } @@ -3057,12 +3094,25 @@ TSparkArrowResultLink.prototype.write = function(output) { output.writeI64(this.bytesNum); output.writeFieldEnd(); } + if (this.httpHeaders !== null && this.httpHeaders !== undefined) { + output.writeFieldBegin('httpHeaders', Thrift.Type.MAP, 6); + output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.httpHeaders)); + for (var kiter81 in this.httpHeaders) { + if (this.httpHeaders.hasOwnProperty(kiter81)) { + var viter82 = this.httpHeaders[kiter81]; + output.writeString(kiter81); + output.writeString(viter82); + } + } + output.writeMapEnd(); + output.writeFieldEnd(); + } output.writeFieldStop(); output.writeStructEnd(); return; }; -var TDBSqlCloudResultFile = module.exports.TDBSqlCloudResultFile = function(args) { +TDBSqlCloudResultFile = function(args) { this.filePath = null; this.startRowOffset = null; this.rowCount = null; @@ -3070,6 +3120,7 @@ var TDBSqlCloudResultFile = module.exports.TDBSqlCloudResultFile = function(args this.compressedBytes = null; this.fileLink = null; this.linkExpiryTime = null; + this.httpHeaders = null; if (args) { if (args.filePath !== undefined && args.filePath !== null) { this.filePath = args.filePath; @@ -3092,6 +3143,9 @@ var TDBSqlCloudResultFile = module.exports.TDBSqlCloudResultFile = function(args if (args.linkExpiryTime !== undefined && args.linkExpiryTime !== null) { this.linkExpiryTime = args.linkExpiryTime; } + if (args.httpHeaders !== undefined && args.httpHeaders !== null) { + this.httpHeaders = Thrift.copyMap(args.httpHeaders, [null]); + } } }; TDBSqlCloudResultFile.prototype = {}; @@ -3107,49 +3161,71 @@ TDBSqlCloudResultFile.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.filePath = input.readString(); + this.filePath = input.readString().value; } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I64) { - this.startRowOffset = input.readI64(); + this.startRowOffset = input.readI64().value; } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I64) { - this.rowCount = input.readI64(); + this.rowCount = input.readI64().value; } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I64) { - this.uncompressedBytes = input.readI64(); + this.uncompressedBytes = input.readI64().value; } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.I64) { - this.compressedBytes = input.readI64(); + this.compressedBytes = input.readI64().value; } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRING) { - this.fileLink = input.readString(); + this.fileLink = input.readString().value; } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.I64) { - this.linkExpiryTime = input.readI64(); + this.linkExpiryTime = input.readI64().value; + } else { + input.skip(ftype); + } + break; + case 8: + if (ftype == Thrift.Type.MAP) { + this.httpHeaders = {}; + var _rtmp384 = input.readMapBegin(); + var _size83 = _rtmp384.size || 0; + for (var _i85 = 0; _i85 < _size83; ++_i85) { + if (_i85 > 0 ) { + if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { + input.rstack.pop(); + } + } + var key86 = null; + var val87 = null; + key86 = input.readString().value; + val87 = input.readString().value; + this.httpHeaders[key86] = val87; + } + input.readMapEnd(); } else { input.skip(ftype); } @@ -3200,12 +3276,25 @@ TDBSqlCloudResultFile.prototype.write = function(output) { output.writeI64(this.linkExpiryTime); output.writeFieldEnd(); } + if (this.httpHeaders !== null && this.httpHeaders !== undefined) { + output.writeFieldBegin('httpHeaders', Thrift.Type.MAP, 8); + output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.httpHeaders)); + for (var kiter88 in this.httpHeaders) { + if (this.httpHeaders.hasOwnProperty(kiter88)) { + var viter89 = this.httpHeaders[kiter88]; + output.writeString(kiter88); + output.writeString(viter89); + } + } + output.writeMapEnd(); + output.writeFieldEnd(); + } output.writeFieldStop(); output.writeStructEnd(); return; }; -var TRowSet = module.exports.TRowSet = function(args) { +TRowSet = function(args) { this.startRowOffset = null; this.rows = null; this.columns = null; @@ -3221,12 +3310,12 @@ var TRowSet = module.exports.TRowSet = function(args) { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field startRowOffset is unset!'); } if (args.rows !== undefined && args.rows !== null) { - this.rows = Thrift.copyList(args.rows, [ttypes.TRow]); + this.rows = Thrift.copyList(args.rows, [TRow]); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field rows is unset!'); } if (args.columns !== undefined && args.columns !== null) { - this.columns = Thrift.copyList(args.columns, [ttypes.TColumn]); + this.columns = Thrift.copyList(args.columns, [TColumn]); } if (args.binaryColumns !== undefined && args.binaryColumns !== null) { this.binaryColumns = args.binaryColumns; @@ -3235,13 +3324,13 @@ var TRowSet = module.exports.TRowSet = function(args) { this.columnCount = args.columnCount; } if (args.arrowBatches !== undefined && args.arrowBatches !== null) { - this.arrowBatches = Thrift.copyList(args.arrowBatches, [ttypes.TSparkArrowBatch]); + this.arrowBatches = Thrift.copyList(args.arrowBatches, [TSparkArrowBatch]); } if (args.resultLinks !== undefined && args.resultLinks !== null) { - this.resultLinks = Thrift.copyList(args.resultLinks, [ttypes.TSparkArrowResultLink]); + this.resultLinks = Thrift.copyList(args.resultLinks, [TSparkArrowResultLink]); } if (args.cloudFetchResults !== undefined && args.cloudFetchResults !== null) { - this.cloudFetchResults = Thrift.copyList(args.cloudFetchResults, [ttypes.TDBSqlCloudResultFile]); + this.cloudFetchResults = Thrift.copyList(args.cloudFetchResults, [TDBSqlCloudResultFile]); } } }; @@ -3258,7 +3347,7 @@ TRowSet.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I64) { - this.startRowOffset = input.readI64(); + this.startRowOffset = input.readI64().value; } else { input.skip(ftype); } @@ -3266,13 +3355,13 @@ TRowSet.prototype.read = function(input) { case 2: if (ftype == Thrift.Type.LIST) { this.rows = []; - var _rtmp377 = input.readListBegin(); - var _size76 = _rtmp377.size || 0; - for (var _i78 = 0; _i78 < _size76; ++_i78) { - var elem79 = null; - elem79 = new ttypes.TRow(); - elem79.read(input); - this.rows.push(elem79); + var _rtmp391 = input.readListBegin(); + var _size90 = _rtmp391.size || 0; + for (var _i92 = 0; _i92 < _size90; ++_i92) { + var elem93 = null; + elem93 = new TRow(); + elem93.read(input); + this.rows.push(elem93); } input.readListEnd(); } else { @@ -3282,13 +3371,13 @@ TRowSet.prototype.read = function(input) { case 3: if (ftype == Thrift.Type.LIST) { this.columns = []; - var _rtmp381 = input.readListBegin(); - var _size80 = _rtmp381.size || 0; - for (var _i82 = 0; _i82 < _size80; ++_i82) { - var elem83 = null; - elem83 = new ttypes.TColumn(); - elem83.read(input); - this.columns.push(elem83); + var _rtmp395 = input.readListBegin(); + var _size94 = _rtmp395.size || 0; + for (var _i96 = 0; _i96 < _size94; ++_i96) { + var elem97 = null; + elem97 = new TColumn(); + elem97.read(input); + this.columns.push(elem97); } input.readListEnd(); } else { @@ -3297,14 +3386,14 @@ TRowSet.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.STRING) { - this.binaryColumns = input.readBinary(); + this.binaryColumns = input.readBinary().value; } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.I32) { - this.columnCount = input.readI32(); + this.columnCount = input.readI32().value; } else { input.skip(ftype); } @@ -3312,13 +3401,13 @@ TRowSet.prototype.read = function(input) { case 1281: if (ftype == Thrift.Type.LIST) { this.arrowBatches = []; - var _rtmp385 = input.readListBegin(); - var _size84 = _rtmp385.size || 0; - for (var _i86 = 0; _i86 < _size84; ++_i86) { - var elem87 = null; - elem87 = new ttypes.TSparkArrowBatch(); - elem87.read(input); - this.arrowBatches.push(elem87); + var _rtmp399 = input.readListBegin(); + var _size98 = _rtmp399.size || 0; + for (var _i100 = 0; _i100 < _size98; ++_i100) { + var elem101 = null; + elem101 = new TSparkArrowBatch(); + elem101.read(input); + this.arrowBatches.push(elem101); } input.readListEnd(); } else { @@ -3328,13 +3417,13 @@ TRowSet.prototype.read = function(input) { case 1282: if (ftype == Thrift.Type.LIST) { this.resultLinks = []; - var _rtmp389 = input.readListBegin(); - var _size88 = _rtmp389.size || 0; - for (var _i90 = 0; _i90 < _size88; ++_i90) { - var elem91 = null; - elem91 = new ttypes.TSparkArrowResultLink(); - elem91.read(input); - this.resultLinks.push(elem91); + var _rtmp3103 = input.readListBegin(); + var _size102 = _rtmp3103.size || 0; + for (var _i104 = 0; _i104 < _size102; ++_i104) { + var elem105 = null; + elem105 = new TSparkArrowResultLink(); + elem105.read(input); + this.resultLinks.push(elem105); } input.readListEnd(); } else { @@ -3344,13 +3433,13 @@ TRowSet.prototype.read = function(input) { case 3329: if (ftype == Thrift.Type.LIST) { this.cloudFetchResults = []; - var _rtmp393 = input.readListBegin(); - var _size92 = _rtmp393.size || 0; - for (var _i94 = 0; _i94 < _size92; ++_i94) { - var elem95 = null; - elem95 = new ttypes.TDBSqlCloudResultFile(); - elem95.read(input); - this.cloudFetchResults.push(elem95); + var _rtmp3107 = input.readListBegin(); + var _size106 = _rtmp3107.size || 0; + for (var _i108 = 0; _i108 < _size106; ++_i108) { + var elem109 = null; + elem109 = new TDBSqlCloudResultFile(); + elem109.read(input); + this.cloudFetchResults.push(elem109); } input.readListEnd(); } else { @@ -3376,10 +3465,10 @@ TRowSet.prototype.write = function(output) { if (this.rows !== null && this.rows !== undefined) { output.writeFieldBegin('rows', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRUCT, this.rows.length); - for (var iter96 in this.rows) { - if (this.rows.hasOwnProperty(iter96)) { - iter96 = this.rows[iter96]; - iter96.write(output); + for (var iter110 in this.rows) { + if (this.rows.hasOwnProperty(iter110)) { + iter110 = this.rows[iter110]; + iter110.write(output); } } output.writeListEnd(); @@ -3388,10 +3477,10 @@ TRowSet.prototype.write = function(output) { if (this.columns !== null && this.columns !== undefined) { output.writeFieldBegin('columns', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRUCT, this.columns.length); - for (var iter97 in this.columns) { - if (this.columns.hasOwnProperty(iter97)) { - iter97 = this.columns[iter97]; - iter97.write(output); + for (var iter111 in this.columns) { + if (this.columns.hasOwnProperty(iter111)) { + iter111 = this.columns[iter111]; + iter111.write(output); } } output.writeListEnd(); @@ -3410,10 +3499,10 @@ TRowSet.prototype.write = function(output) { if (this.arrowBatches !== null && this.arrowBatches !== undefined) { output.writeFieldBegin('arrowBatches', Thrift.Type.LIST, 1281); output.writeListBegin(Thrift.Type.STRUCT, this.arrowBatches.length); - for (var iter98 in this.arrowBatches) { - if (this.arrowBatches.hasOwnProperty(iter98)) { - iter98 = this.arrowBatches[iter98]; - iter98.write(output); + for (var iter112 in this.arrowBatches) { + if (this.arrowBatches.hasOwnProperty(iter112)) { + iter112 = this.arrowBatches[iter112]; + iter112.write(output); } } output.writeListEnd(); @@ -3422,10 +3511,10 @@ TRowSet.prototype.write = function(output) { if (this.resultLinks !== null && this.resultLinks !== undefined) { output.writeFieldBegin('resultLinks', Thrift.Type.LIST, 1282); output.writeListBegin(Thrift.Type.STRUCT, this.resultLinks.length); - for (var iter99 in this.resultLinks) { - if (this.resultLinks.hasOwnProperty(iter99)) { - iter99 = this.resultLinks[iter99]; - iter99.write(output); + for (var iter113 in this.resultLinks) { + if (this.resultLinks.hasOwnProperty(iter113)) { + iter113 = this.resultLinks[iter113]; + iter113.write(output); } } output.writeListEnd(); @@ -3434,10 +3523,10 @@ TRowSet.prototype.write = function(output) { if (this.cloudFetchResults !== null && this.cloudFetchResults !== undefined) { output.writeFieldBegin('cloudFetchResults', Thrift.Type.LIST, 3329); output.writeListBegin(Thrift.Type.STRUCT, this.cloudFetchResults.length); - for (var iter100 in this.cloudFetchResults) { - if (this.cloudFetchResults.hasOwnProperty(iter100)) { - iter100 = this.cloudFetchResults[iter100]; - iter100.write(output); + for (var iter114 in this.cloudFetchResults) { + if (this.cloudFetchResults.hasOwnProperty(iter114)) { + iter114 = this.cloudFetchResults[iter114]; + iter114.write(output); } } output.writeListEnd(); @@ -3448,7 +3537,7 @@ TRowSet.prototype.write = function(output) { return; }; -var TDBSqlTempView = module.exports.TDBSqlTempView = function(args) { +TDBSqlTempView = function(args) { this.name = null; this.sqlStatement = null; this.properties = null; @@ -3481,14 +3570,14 @@ TDBSqlTempView.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.name = input.readString(); + this.name = input.readString().value; } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { - this.sqlStatement = input.readString(); + this.sqlStatement = input.readString().value; } else { input.skip(ftype); } @@ -3496,14 +3585,19 @@ TDBSqlTempView.prototype.read = function(input) { case 3: if (ftype == Thrift.Type.MAP) { this.properties = {}; - var _rtmp3102 = input.readMapBegin(); - var _size101 = _rtmp3102.size || 0; - for (var _i103 = 0; _i103 < _size101; ++_i103) { - var key104 = null; - var val105 = null; - key104 = input.readString(); - val105 = input.readString(); - this.properties[key104] = val105; + var _rtmp3116 = input.readMapBegin(); + var _size115 = _rtmp3116.size || 0; + for (var _i117 = 0; _i117 < _size115; ++_i117) { + if (_i117 > 0 ) { + if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { + input.rstack.pop(); + } + } + var key118 = null; + var val119 = null; + key118 = input.readString().value; + val119 = input.readString().value; + this.properties[key118] = val119; } input.readMapEnd(); } else { @@ -3512,7 +3606,7 @@ TDBSqlTempView.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.STRING) { - this.viewSchema = input.readString(); + this.viewSchema = input.readString().value; } else { input.skip(ftype); } @@ -3541,11 +3635,11 @@ TDBSqlTempView.prototype.write = function(output) { if (this.properties !== null && this.properties !== undefined) { output.writeFieldBegin('properties', Thrift.Type.MAP, 3); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.properties)); - for (var kiter106 in this.properties) { - if (this.properties.hasOwnProperty(kiter106)) { - var viter107 = this.properties[kiter106]; - output.writeString(kiter106); - output.writeString(viter107); + for (var kiter120 in this.properties) { + if (this.properties.hasOwnProperty(kiter120)) { + var viter121 = this.properties[kiter120]; + output.writeString(kiter120); + output.writeString(viter121); } } output.writeMapEnd(); @@ -3561,7 +3655,7 @@ TDBSqlTempView.prototype.write = function(output) { return; }; -var TDBSqlSessionCapabilities = module.exports.TDBSqlSessionCapabilities = function(args) { +TDBSqlSessionCapabilities = function(args) { this.supportsMultipleCatalogs = null; if (args) { if (args.supportsMultipleCatalogs !== undefined && args.supportsMultipleCatalogs !== null) { @@ -3582,7 +3676,7 @@ TDBSqlSessionCapabilities.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.BOOL) { - this.supportsMultipleCatalogs = input.readBool(); + this.supportsMultipleCatalogs = input.readBool().value; } else { input.skip(ftype); } @@ -3611,7 +3705,7 @@ TDBSqlSessionCapabilities.prototype.write = function(output) { return; }; -var TExpressionInfo = module.exports.TExpressionInfo = function(args) { +TExpressionInfo = function(args) { this.className = null; this.usage = null; this.name = null; @@ -3676,84 +3770,84 @@ TExpressionInfo.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.className = input.readString(); + this.className = input.readString().value; } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { - this.usage = input.readString(); + this.usage = input.readString().value; } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.name = input.readString(); + this.name = input.readString().value; } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { - this.extended = input.readString(); + this.extended = input.readString().value; } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { - this.db = input.readString(); + this.db = input.readString().value; } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRING) { - this.arguments = input.readString(); + this.arguments = input.readString().value; } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.STRING) { - this.examples = input.readString(); + this.examples = input.readString().value; } else { input.skip(ftype); } break; case 8: if (ftype == Thrift.Type.STRING) { - this.note = input.readString(); + this.note = input.readString().value; } else { input.skip(ftype); } break; case 9: if (ftype == Thrift.Type.STRING) { - this.group = input.readString(); + this.group = input.readString().value; } else { input.skip(ftype); } break; case 10: if (ftype == Thrift.Type.STRING) { - this.since = input.readString(); + this.since = input.readString().value; } else { input.skip(ftype); } break; case 11: if (ftype == Thrift.Type.STRING) { - this.deprecated = input.readString(); + this.deprecated = input.readString().value; } else { input.skip(ftype); } break; case 12: if (ftype == Thrift.Type.STRING) { - this.source = input.readString(); + this.source = input.readString().value; } else { input.skip(ftype); } @@ -3834,7 +3928,7 @@ TExpressionInfo.prototype.write = function(output) { return; }; -var TDBSqlConfValue = module.exports.TDBSqlConfValue = function(args) { +TDBSqlConfValue = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { @@ -3855,7 +3949,7 @@ TDBSqlConfValue.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.value = input.readString(); + this.value = input.readString().value; } else { input.skip(ftype); } @@ -3884,7 +3978,7 @@ TDBSqlConfValue.prototype.write = function(output) { return; }; -var TDBSqlSessionConf = module.exports.TDBSqlSessionConf = function(args) { +TDBSqlSessionConf = function(args) { this.confs = null; this.tempViews = null; this.currentDatabase = null; @@ -3897,7 +3991,7 @@ var TDBSqlSessionConf = module.exports.TDBSqlSessionConf = function(args) { this.confs = Thrift.copyMap(args.confs, [null]); } if (args.tempViews !== undefined && args.tempViews !== null) { - this.tempViews = Thrift.copyList(args.tempViews, [ttypes.TDBSqlTempView]); + this.tempViews = Thrift.copyList(args.tempViews, [TDBSqlTempView]); } if (args.currentDatabase !== undefined && args.currentDatabase !== null) { this.currentDatabase = args.currentDatabase; @@ -3906,13 +4000,13 @@ var TDBSqlSessionConf = module.exports.TDBSqlSessionConf = function(args) { this.currentCatalog = args.currentCatalog; } if (args.sessionCapabilities !== undefined && args.sessionCapabilities !== null) { - this.sessionCapabilities = new ttypes.TDBSqlSessionCapabilities(args.sessionCapabilities); + this.sessionCapabilities = new TDBSqlSessionCapabilities(args.sessionCapabilities); } if (args.expressionsInfos !== undefined && args.expressionsInfos !== null) { - this.expressionsInfos = Thrift.copyList(args.expressionsInfos, [ttypes.TExpressionInfo]); + this.expressionsInfos = Thrift.copyList(args.expressionsInfos, [TExpressionInfo]); } if (args.internalConfs !== undefined && args.internalConfs !== null) { - this.internalConfs = Thrift.copyMap(args.internalConfs, [ttypes.TDBSqlConfValue]); + this.internalConfs = Thrift.copyMap(args.internalConfs, [TDBSqlConfValue]); } } }; @@ -3930,14 +4024,19 @@ TDBSqlSessionConf.prototype.read = function(input) { case 1: if (ftype == Thrift.Type.MAP) { this.confs = {}; - var _rtmp3109 = input.readMapBegin(); - var _size108 = _rtmp3109.size || 0; - for (var _i110 = 0; _i110 < _size108; ++_i110) { - var key111 = null; - var val112 = null; - key111 = input.readString(); - val112 = input.readString(); - this.confs[key111] = val112; + var _rtmp3123 = input.readMapBegin(); + var _size122 = _rtmp3123.size || 0; + for (var _i124 = 0; _i124 < _size122; ++_i124) { + if (_i124 > 0 ) { + if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { + input.rstack.pop(); + } + } + var key125 = null; + var val126 = null; + key125 = input.readString().value; + val126 = input.readString().value; + this.confs[key125] = val126; } input.readMapEnd(); } else { @@ -3947,13 +4046,13 @@ TDBSqlSessionConf.prototype.read = function(input) { case 2: if (ftype == Thrift.Type.LIST) { this.tempViews = []; - var _rtmp3114 = input.readListBegin(); - var _size113 = _rtmp3114.size || 0; - for (var _i115 = 0; _i115 < _size113; ++_i115) { - var elem116 = null; - elem116 = new ttypes.TDBSqlTempView(); - elem116.read(input); - this.tempViews.push(elem116); + var _rtmp3128 = input.readListBegin(); + var _size127 = _rtmp3128.size || 0; + for (var _i129 = 0; _i129 < _size127; ++_i129) { + var elem130 = null; + elem130 = new TDBSqlTempView(); + elem130.read(input); + this.tempViews.push(elem130); } input.readListEnd(); } else { @@ -3962,21 +4061,21 @@ TDBSqlSessionConf.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.STRING) { - this.currentDatabase = input.readString(); + this.currentDatabase = input.readString().value; } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { - this.currentCatalog = input.readString(); + this.currentCatalog = input.readString().value; } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRUCT) { - this.sessionCapabilities = new ttypes.TDBSqlSessionCapabilities(); + this.sessionCapabilities = new TDBSqlSessionCapabilities(); this.sessionCapabilities.read(input); } else { input.skip(ftype); @@ -3985,13 +4084,13 @@ TDBSqlSessionConf.prototype.read = function(input) { case 6: if (ftype == Thrift.Type.LIST) { this.expressionsInfos = []; - var _rtmp3118 = input.readListBegin(); - var _size117 = _rtmp3118.size || 0; - for (var _i119 = 0; _i119 < _size117; ++_i119) { - var elem120 = null; - elem120 = new ttypes.TExpressionInfo(); - elem120.read(input); - this.expressionsInfos.push(elem120); + var _rtmp3132 = input.readListBegin(); + var _size131 = _rtmp3132.size || 0; + for (var _i133 = 0; _i133 < _size131; ++_i133) { + var elem134 = null; + elem134 = new TExpressionInfo(); + elem134.read(input); + this.expressionsInfos.push(elem134); } input.readListEnd(); } else { @@ -4001,15 +4100,20 @@ TDBSqlSessionConf.prototype.read = function(input) { case 7: if (ftype == Thrift.Type.MAP) { this.internalConfs = {}; - var _rtmp3122 = input.readMapBegin(); - var _size121 = _rtmp3122.size || 0; - for (var _i123 = 0; _i123 < _size121; ++_i123) { - var key124 = null; - var val125 = null; - key124 = input.readString(); - val125 = new ttypes.TDBSqlConfValue(); - val125.read(input); - this.internalConfs[key124] = val125; + var _rtmp3136 = input.readMapBegin(); + var _size135 = _rtmp3136.size || 0; + for (var _i137 = 0; _i137 < _size135; ++_i137) { + if (_i137 > 0 ) { + if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { + input.rstack.pop(); + } + } + var key138 = null; + var val139 = null; + key138 = input.readString().value; + val139 = new TDBSqlConfValue(); + val139.read(input); + this.internalConfs[key138] = val139; } input.readMapEnd(); } else { @@ -4030,11 +4134,11 @@ TDBSqlSessionConf.prototype.write = function(output) { if (this.confs !== null && this.confs !== undefined) { output.writeFieldBegin('confs', Thrift.Type.MAP, 1); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.confs)); - for (var kiter126 in this.confs) { - if (this.confs.hasOwnProperty(kiter126)) { - var viter127 = this.confs[kiter126]; - output.writeString(kiter126); - output.writeString(viter127); + for (var kiter140 in this.confs) { + if (this.confs.hasOwnProperty(kiter140)) { + var viter141 = this.confs[kiter140]; + output.writeString(kiter140); + output.writeString(viter141); } } output.writeMapEnd(); @@ -4043,10 +4147,10 @@ TDBSqlSessionConf.prototype.write = function(output) { if (this.tempViews !== null && this.tempViews !== undefined) { output.writeFieldBegin('tempViews', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRUCT, this.tempViews.length); - for (var iter128 in this.tempViews) { - if (this.tempViews.hasOwnProperty(iter128)) { - iter128 = this.tempViews[iter128]; - iter128.write(output); + for (var iter142 in this.tempViews) { + if (this.tempViews.hasOwnProperty(iter142)) { + iter142 = this.tempViews[iter142]; + iter142.write(output); } } output.writeListEnd(); @@ -4070,10 +4174,10 @@ TDBSqlSessionConf.prototype.write = function(output) { if (this.expressionsInfos !== null && this.expressionsInfos !== undefined) { output.writeFieldBegin('expressionsInfos', Thrift.Type.LIST, 6); output.writeListBegin(Thrift.Type.STRUCT, this.expressionsInfos.length); - for (var iter129 in this.expressionsInfos) { - if (this.expressionsInfos.hasOwnProperty(iter129)) { - iter129 = this.expressionsInfos[iter129]; - iter129.write(output); + for (var iter143 in this.expressionsInfos) { + if (this.expressionsInfos.hasOwnProperty(iter143)) { + iter143 = this.expressionsInfos[iter143]; + iter143.write(output); } } output.writeListEnd(); @@ -4082,11 +4186,11 @@ TDBSqlSessionConf.prototype.write = function(output) { if (this.internalConfs !== null && this.internalConfs !== undefined) { output.writeFieldBegin('internalConfs', Thrift.Type.MAP, 7); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.internalConfs)); - for (var kiter130 in this.internalConfs) { - if (this.internalConfs.hasOwnProperty(kiter130)) { - var viter131 = this.internalConfs[kiter130]; - output.writeString(kiter130); - viter131.write(output); + for (var kiter144 in this.internalConfs) { + if (this.internalConfs.hasOwnProperty(kiter144)) { + var viter145 = this.internalConfs[kiter144]; + output.writeString(kiter144); + viter145.write(output); } } output.writeMapEnd(); @@ -4097,13 +4201,14 @@ TDBSqlSessionConf.prototype.write = function(output) { return; }; -var TStatus = module.exports.TStatus = function(args) { +TStatus = function(args) { this.statusCode = null; this.infoMessages = null; this.sqlState = null; this.errorCode = null; this.errorMessage = null; this.displayMessage = null; + this.errorDetailsJson = null; this.responseValidation = null; if (args) { if (args.statusCode !== undefined && args.statusCode !== null) { @@ -4126,6 +4231,9 @@ var TStatus = module.exports.TStatus = function(args) { if (args.displayMessage !== undefined && args.displayMessage !== null) { this.displayMessage = args.displayMessage; } + if (args.errorDetailsJson !== undefined && args.errorDetailsJson !== null) { + this.errorDetailsJson = args.errorDetailsJson; + } if (args.responseValidation !== undefined && args.responseValidation !== null) { this.responseValidation = args.responseValidation; } @@ -4144,7 +4252,7 @@ TStatus.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.statusCode = input.readI32(); + this.statusCode = input.readI32().value; } else { input.skip(ftype); } @@ -4152,12 +4260,12 @@ TStatus.prototype.read = function(input) { case 2: if (ftype == Thrift.Type.LIST) { this.infoMessages = []; - var _rtmp3133 = input.readListBegin(); - var _size132 = _rtmp3133.size || 0; - for (var _i134 = 0; _i134 < _size132; ++_i134) { - var elem135 = null; - elem135 = input.readString(); - this.infoMessages.push(elem135); + var _rtmp3147 = input.readListBegin(); + var _size146 = _rtmp3147.size || 0; + for (var _i148 = 0; _i148 < _size146; ++_i148) { + var elem149 = null; + elem149 = input.readString().value; + this.infoMessages.push(elem149); } input.readListEnd(); } else { @@ -4166,35 +4274,42 @@ TStatus.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.STRING) { - this.sqlState = input.readString(); + this.sqlState = input.readString().value; } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { - this.errorCode = input.readI32(); + this.errorCode = input.readI32().value; } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { - this.errorMessage = input.readString(); + this.errorMessage = input.readString().value; } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRING) { - this.displayMessage = input.readString(); + this.displayMessage = input.readString().value; + } else { + input.skip(ftype); + } + break; + case 1281: + if (ftype == Thrift.Type.STRING) { + this.errorDetailsJson = input.readString().value; } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRING) { - this.responseValidation = input.readBinary(); + this.responseValidation = input.readBinary().value; } else { input.skip(ftype); } @@ -4218,10 +4333,10 @@ TStatus.prototype.write = function(output) { if (this.infoMessages !== null && this.infoMessages !== undefined) { output.writeFieldBegin('infoMessages', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRING, this.infoMessages.length); - for (var iter136 in this.infoMessages) { - if (this.infoMessages.hasOwnProperty(iter136)) { - iter136 = this.infoMessages[iter136]; - output.writeString(iter136); + for (var iter150 in this.infoMessages) { + if (this.infoMessages.hasOwnProperty(iter150)) { + iter150 = this.infoMessages[iter150]; + output.writeString(iter150); } } output.writeListEnd(); @@ -4247,6 +4362,11 @@ TStatus.prototype.write = function(output) { output.writeString(this.displayMessage); output.writeFieldEnd(); } + if (this.errorDetailsJson !== null && this.errorDetailsJson !== undefined) { + output.writeFieldBegin('errorDetailsJson', Thrift.Type.STRING, 1281); + output.writeString(this.errorDetailsJson); + output.writeFieldEnd(); + } if (this.responseValidation !== null && this.responseValidation !== undefined) { output.writeFieldBegin('responseValidation', Thrift.Type.STRING, 3329); output.writeBinary(this.responseValidation); @@ -4257,7 +4377,7 @@ TStatus.prototype.write = function(output) { return; }; -var TNamespace = module.exports.TNamespace = function(args) { +TNamespace = function(args) { this.catalogName = null; this.schemaName = null; if (args) { @@ -4282,14 +4402,14 @@ TNamespace.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.catalogName = input.readString(); + this.catalogName = input.readString().value; } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { - this.schemaName = input.readString(); + this.schemaName = input.readString().value; } else { input.skip(ftype); } @@ -4320,7 +4440,7 @@ TNamespace.prototype.write = function(output) { return; }; -var THandleIdentifier = module.exports.THandleIdentifier = function(args) { +THandleIdentifier = function(args) { this.guid = null; this.secret = null; this.executionVersion = null; @@ -4353,21 +4473,21 @@ THandleIdentifier.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.guid = input.readBinary(); + this.guid = input.readBinary().value; } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { - this.secret = input.readBinary(); + this.secret = input.readBinary().value; } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.I16) { - this.executionVersion = input.readI16(); + this.executionVersion = input.readI16().value; } else { input.skip(ftype); } @@ -4403,12 +4523,12 @@ THandleIdentifier.prototype.write = function(output) { return; }; -var TSessionHandle = module.exports.TSessionHandle = function(args) { +TSessionHandle = function(args) { this.sessionId = null; this.serverProtocolVersion = null; if (args) { if (args.sessionId !== undefined && args.sessionId !== null) { - this.sessionId = new ttypes.THandleIdentifier(args.sessionId); + this.sessionId = new THandleIdentifier(args.sessionId); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionId is unset!'); } @@ -4430,7 +4550,7 @@ TSessionHandle.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionId = new ttypes.THandleIdentifier(); + this.sessionId = new THandleIdentifier(); this.sessionId.read(input); } else { input.skip(ftype); @@ -4438,7 +4558,7 @@ TSessionHandle.prototype.read = function(input) { break; case 3329: if (ftype == Thrift.Type.I32) { - this.serverProtocolVersion = input.readI32(); + this.serverProtocolVersion = input.readI32().value; } else { input.skip(ftype); } @@ -4469,14 +4589,14 @@ TSessionHandle.prototype.write = function(output) { return; }; -var TOperationHandle = module.exports.TOperationHandle = function(args) { +TOperationHandle = function(args) { this.operationId = null; this.operationType = null; this.hasResultSet = null; this.modifiedRowCount = null; if (args) { if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new ttypes.THandleIdentifier(args.operationId); + this.operationId = new THandleIdentifier(args.operationId); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field operationId is unset!'); } @@ -4508,7 +4628,7 @@ TOperationHandle.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new ttypes.THandleIdentifier(); + this.operationId = new THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -4516,21 +4636,21 @@ TOperationHandle.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.I32) { - this.operationType = input.readI32(); + this.operationType = input.readI32().value; } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.BOOL) { - this.hasResultSet = input.readBool(); + this.hasResultSet = input.readBool().value; } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.DOUBLE) { - this.modifiedRowCount = input.readDouble(); + this.modifiedRowCount = input.readDouble().value; } else { input.skip(ftype); } @@ -4571,7 +4691,7 @@ TOperationHandle.prototype.write = function(output) { return; }; -var TOpenSessionReq = module.exports.TOpenSessionReq = function(args) { +TOpenSessionReq = function(args) { this.client_protocol = -7; this.username = null; this.password = null; @@ -4605,13 +4725,13 @@ var TOpenSessionReq = module.exports.TOpenSessionReq = function(args) { this.connectionProperties = Thrift.copyMap(args.connectionProperties, [null]); } if (args.initialNamespace !== undefined && args.initialNamespace !== null) { - this.initialNamespace = new ttypes.TNamespace(args.initialNamespace); + this.initialNamespace = new TNamespace(args.initialNamespace); } if (args.canUseMultipleCatalogs !== undefined && args.canUseMultipleCatalogs !== null) { this.canUseMultipleCatalogs = args.canUseMultipleCatalogs; } if (args.sessionId !== undefined && args.sessionId !== null) { - this.sessionId = new ttypes.THandleIdentifier(args.sessionId); + this.sessionId = new THandleIdentifier(args.sessionId); } } }; @@ -4628,21 +4748,21 @@ TOpenSessionReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.client_protocol = input.readI32(); + this.client_protocol = input.readI32().value; } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { - this.username = input.readString(); + this.username = input.readString().value; } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.password = input.readString(); + this.password = input.readString().value; } else { input.skip(ftype); } @@ -4650,14 +4770,19 @@ TOpenSessionReq.prototype.read = function(input) { case 4: if (ftype == Thrift.Type.MAP) { this.configuration = {}; - var _rtmp3138 = input.readMapBegin(); - var _size137 = _rtmp3138.size || 0; - for (var _i139 = 0; _i139 < _size137; ++_i139) { - var key140 = null; - var val141 = null; - key140 = input.readString(); - val141 = input.readString(); - this.configuration[key140] = val141; + var _rtmp3152 = input.readMapBegin(); + var _size151 = _rtmp3152.size || 0; + for (var _i153 = 0; _i153 < _size151; ++_i153) { + if (_i153 > 0 ) { + if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { + input.rstack.pop(); + } + } + var key154 = null; + var val155 = null; + key154 = input.readString().value; + val155 = input.readString().value; + this.configuration[key154] = val155; } input.readMapEnd(); } else { @@ -4667,12 +4792,12 @@ TOpenSessionReq.prototype.read = function(input) { case 1281: if (ftype == Thrift.Type.LIST) { this.getInfos = []; - var _rtmp3143 = input.readListBegin(); - var _size142 = _rtmp3143.size || 0; - for (var _i144 = 0; _i144 < _size142; ++_i144) { - var elem145 = null; - elem145 = input.readI32(); - this.getInfos.push(elem145); + var _rtmp3157 = input.readListBegin(); + var _size156 = _rtmp3157.size || 0; + for (var _i158 = 0; _i158 < _size156; ++_i158) { + var elem159 = null; + elem159 = input.readI32().value; + this.getInfos.push(elem159); } input.readListEnd(); } else { @@ -4681,7 +4806,7 @@ TOpenSessionReq.prototype.read = function(input) { break; case 1282: if (ftype == Thrift.Type.I64) { - this.client_protocol_i64 = input.readI64(); + this.client_protocol_i64 = input.readI64().value; } else { input.skip(ftype); } @@ -4689,14 +4814,19 @@ TOpenSessionReq.prototype.read = function(input) { case 1283: if (ftype == Thrift.Type.MAP) { this.connectionProperties = {}; - var _rtmp3147 = input.readMapBegin(); - var _size146 = _rtmp3147.size || 0; - for (var _i148 = 0; _i148 < _size146; ++_i148) { - var key149 = null; - var val150 = null; - key149 = input.readString(); - val150 = input.readString(); - this.connectionProperties[key149] = val150; + var _rtmp3161 = input.readMapBegin(); + var _size160 = _rtmp3161.size || 0; + for (var _i162 = 0; _i162 < _size160; ++_i162) { + if (_i162 > 0 ) { + if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { + input.rstack.pop(); + } + } + var key163 = null; + var val164 = null; + key163 = input.readString().value; + val164 = input.readString().value; + this.connectionProperties[key163] = val164; } input.readMapEnd(); } else { @@ -4705,7 +4835,7 @@ TOpenSessionReq.prototype.read = function(input) { break; case 1284: if (ftype == Thrift.Type.STRUCT) { - this.initialNamespace = new ttypes.TNamespace(); + this.initialNamespace = new TNamespace(); this.initialNamespace.read(input); } else { input.skip(ftype); @@ -4713,14 +4843,14 @@ TOpenSessionReq.prototype.read = function(input) { break; case 1285: if (ftype == Thrift.Type.BOOL) { - this.canUseMultipleCatalogs = input.readBool(); + this.canUseMultipleCatalogs = input.readBool().value; } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.sessionId = new ttypes.THandleIdentifier(); + this.sessionId = new THandleIdentifier(); this.sessionId.read(input); } else { input.skip(ftype); @@ -4755,11 +4885,11 @@ TOpenSessionReq.prototype.write = function(output) { if (this.configuration !== null && this.configuration !== undefined) { output.writeFieldBegin('configuration', Thrift.Type.MAP, 4); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.configuration)); - for (var kiter151 in this.configuration) { - if (this.configuration.hasOwnProperty(kiter151)) { - var viter152 = this.configuration[kiter151]; - output.writeString(kiter151); - output.writeString(viter152); + for (var kiter165 in this.configuration) { + if (this.configuration.hasOwnProperty(kiter165)) { + var viter166 = this.configuration[kiter165]; + output.writeString(kiter165); + output.writeString(viter166); } } output.writeMapEnd(); @@ -4768,10 +4898,10 @@ TOpenSessionReq.prototype.write = function(output) { if (this.getInfos !== null && this.getInfos !== undefined) { output.writeFieldBegin('getInfos', Thrift.Type.LIST, 1281); output.writeListBegin(Thrift.Type.I32, this.getInfos.length); - for (var iter153 in this.getInfos) { - if (this.getInfos.hasOwnProperty(iter153)) { - iter153 = this.getInfos[iter153]; - output.writeI32(iter153); + for (var iter167 in this.getInfos) { + if (this.getInfos.hasOwnProperty(iter167)) { + iter167 = this.getInfos[iter167]; + output.writeI32(iter167); } } output.writeListEnd(); @@ -4785,11 +4915,11 @@ TOpenSessionReq.prototype.write = function(output) { if (this.connectionProperties !== null && this.connectionProperties !== undefined) { output.writeFieldBegin('connectionProperties', Thrift.Type.MAP, 1283); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.connectionProperties)); - for (var kiter154 in this.connectionProperties) { - if (this.connectionProperties.hasOwnProperty(kiter154)) { - var viter155 = this.connectionProperties[kiter154]; - output.writeString(kiter154); - output.writeString(viter155); + for (var kiter168 in this.connectionProperties) { + if (this.connectionProperties.hasOwnProperty(kiter168)) { + var viter169 = this.connectionProperties[kiter168]; + output.writeString(kiter168); + output.writeString(viter169); } } output.writeMapEnd(); @@ -4815,7 +4945,7 @@ TOpenSessionReq.prototype.write = function(output) { return; }; -var TOpenSessionResp = module.exports.TOpenSessionResp = function(args) { +TOpenSessionResp = function(args) { this.status = null; this.serverProtocolVersion = null; this.sessionHandle = null; @@ -4825,7 +4955,7 @@ var TOpenSessionResp = module.exports.TOpenSessionResp = function(args) { this.getInfos = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } @@ -4835,13 +4965,13 @@ var TOpenSessionResp = module.exports.TOpenSessionResp = function(args) { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field serverProtocolVersion is unset!'); } if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); + this.sessionHandle = new TSessionHandle(args.sessionHandle); } if (args.configuration !== undefined && args.configuration !== null) { this.configuration = Thrift.copyMap(args.configuration, [null]); } if (args.initialNamespace !== undefined && args.initialNamespace !== null) { - this.initialNamespace = new ttypes.TNamespace(args.initialNamespace); + this.initialNamespace = new TNamespace(args.initialNamespace); } if (args.canUseMultipleCatalogs !== undefined && args.canUseMultipleCatalogs !== null) { this.canUseMultipleCatalogs = args.canUseMultipleCatalogs; @@ -4864,7 +4994,7 @@ TOpenSessionResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -4872,14 +5002,14 @@ TOpenSessionResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.I32) { - this.serverProtocolVersion = input.readI32(); + this.serverProtocolVersion = input.readI32().value; } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new ttypes.TSessionHandle(); + this.sessionHandle = new TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -4888,14 +5018,19 @@ TOpenSessionResp.prototype.read = function(input) { case 4: if (ftype == Thrift.Type.MAP) { this.configuration = {}; - var _rtmp3157 = input.readMapBegin(); - var _size156 = _rtmp3157.size || 0; - for (var _i158 = 0; _i158 < _size156; ++_i158) { - var key159 = null; - var val160 = null; - key159 = input.readString(); - val160 = input.readString(); - this.configuration[key159] = val160; + var _rtmp3171 = input.readMapBegin(); + var _size170 = _rtmp3171.size || 0; + for (var _i172 = 0; _i172 < _size170; ++_i172) { + if (_i172 > 0 ) { + if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { + input.rstack.pop(); + } + } + var key173 = null; + var val174 = null; + key173 = input.readString().value; + val174 = input.readString().value; + this.configuration[key173] = val174; } input.readMapEnd(); } else { @@ -4904,7 +5039,7 @@ TOpenSessionResp.prototype.read = function(input) { break; case 1284: if (ftype == Thrift.Type.STRUCT) { - this.initialNamespace = new ttypes.TNamespace(); + this.initialNamespace = new TNamespace(); this.initialNamespace.read(input); } else { input.skip(ftype); @@ -4912,7 +5047,7 @@ TOpenSessionResp.prototype.read = function(input) { break; case 1285: if (ftype == Thrift.Type.BOOL) { - this.canUseMultipleCatalogs = input.readBool(); + this.canUseMultipleCatalogs = input.readBool().value; } else { input.skip(ftype); } @@ -4920,13 +5055,13 @@ TOpenSessionResp.prototype.read = function(input) { case 1281: if (ftype == Thrift.Type.LIST) { this.getInfos = []; - var _rtmp3162 = input.readListBegin(); - var _size161 = _rtmp3162.size || 0; - for (var _i163 = 0; _i163 < _size161; ++_i163) { - var elem164 = null; - elem164 = new ttypes.TGetInfoValue(); - elem164.read(input); - this.getInfos.push(elem164); + var _rtmp3176 = input.readListBegin(); + var _size175 = _rtmp3176.size || 0; + for (var _i177 = 0; _i177 < _size175; ++_i177) { + var elem178 = null; + elem178 = new TGetInfoValue(); + elem178.read(input); + this.getInfos.push(elem178); } input.readListEnd(); } else { @@ -4962,11 +5097,11 @@ TOpenSessionResp.prototype.write = function(output) { if (this.configuration !== null && this.configuration !== undefined) { output.writeFieldBegin('configuration', Thrift.Type.MAP, 4); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.configuration)); - for (var kiter165 in this.configuration) { - if (this.configuration.hasOwnProperty(kiter165)) { - var viter166 = this.configuration[kiter165]; - output.writeString(kiter165); - output.writeString(viter166); + for (var kiter179 in this.configuration) { + if (this.configuration.hasOwnProperty(kiter179)) { + var viter180 = this.configuration[kiter179]; + output.writeString(kiter179); + output.writeString(viter180); } } output.writeMapEnd(); @@ -4985,10 +5120,10 @@ TOpenSessionResp.prototype.write = function(output) { if (this.getInfos !== null && this.getInfos !== undefined) { output.writeFieldBegin('getInfos', Thrift.Type.LIST, 1281); output.writeListBegin(Thrift.Type.STRUCT, this.getInfos.length); - for (var iter167 in this.getInfos) { - if (this.getInfos.hasOwnProperty(iter167)) { - iter167 = this.getInfos[iter167]; - iter167.write(output); + for (var iter181 in this.getInfos) { + if (this.getInfos.hasOwnProperty(iter181)) { + iter181 = this.getInfos[iter181]; + iter181.write(output); } } output.writeListEnd(); @@ -4999,11 +5134,11 @@ TOpenSessionResp.prototype.write = function(output) { return; }; -var TCloseSessionReq = module.exports.TCloseSessionReq = function(args) { +TCloseSessionReq = function(args) { this.sessionHandle = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); + this.sessionHandle = new TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -5022,7 +5157,7 @@ TCloseSessionReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new ttypes.TSessionHandle(); + this.sessionHandle = new TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -5052,11 +5187,11 @@ TCloseSessionReq.prototype.write = function(output) { return; }; -var TCloseSessionResp = module.exports.TCloseSessionResp = function(args) { +TCloseSessionResp = function(args) { this.status = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } @@ -5075,7 +5210,7 @@ TCloseSessionResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -5105,7 +5240,7 @@ TCloseSessionResp.prototype.write = function(output) { return; }; -var TGetInfoValue = module.exports.TGetInfoValue = function(args) { +TGetInfoValue = function(args) { this.stringValue = null; this.smallIntValue = null; this.integerBitmask = null; @@ -5146,42 +5281,42 @@ TGetInfoValue.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.stringValue = input.readString(); + this.stringValue = input.readString().value; } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I16) { - this.smallIntValue = input.readI16(); + this.smallIntValue = input.readI16().value; } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { - this.integerBitmask = input.readI32(); + this.integerBitmask = input.readI32().value; } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { - this.integerFlag = input.readI32(); + this.integerFlag = input.readI32().value; } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.I32) { - this.binaryValue = input.readI32(); + this.binaryValue = input.readI32().value; } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.I64) { - this.lenValue = input.readI64(); + this.lenValue = input.readI64().value; } else { input.skip(ftype); } @@ -5232,13 +5367,13 @@ TGetInfoValue.prototype.write = function(output) { return; }; -var TGetInfoReq = module.exports.TGetInfoReq = function(args) { +TGetInfoReq = function(args) { this.sessionHandle = null; this.infoType = null; this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); + this.sessionHandle = new TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -5248,7 +5383,7 @@ var TGetInfoReq = module.exports.TGetInfoReq = function(args) { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field infoType is unset!'); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new TDBSqlSessionConf(args.sessionConf); } } }; @@ -5265,7 +5400,7 @@ TGetInfoReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new ttypes.TSessionHandle(); + this.sessionHandle = new TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -5273,14 +5408,14 @@ TGetInfoReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.I32) { - this.infoType = input.readI32(); + this.infoType = input.readI32().value; } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new ttypes.TDBSqlSessionConf(); + this.sessionConf = new TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -5317,17 +5452,17 @@ TGetInfoReq.prototype.write = function(output) { return; }; -var TGetInfoResp = module.exports.TGetInfoResp = function(args) { +TGetInfoResp = function(args) { this.status = null; this.infoValue = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.infoValue !== undefined && args.infoValue !== null) { - this.infoValue = new ttypes.TGetInfoValue(args.infoValue); + this.infoValue = new TGetInfoValue(args.infoValue); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field infoValue is unset!'); } @@ -5346,7 +5481,7 @@ TGetInfoResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -5354,7 +5489,7 @@ TGetInfoResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.infoValue = new ttypes.TGetInfoValue(); + this.infoValue = new TGetInfoValue(); this.infoValue.read(input); } else { input.skip(ftype); @@ -5386,7 +5521,7 @@ TGetInfoResp.prototype.write = function(output) { return; }; -var TSparkGetDirectResults = module.exports.TSparkGetDirectResults = function(args) { +TSparkGetDirectResults = function(args) { this.maxRows = null; this.maxBytes = null; if (args) { @@ -5413,14 +5548,14 @@ TSparkGetDirectResults.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I64) { - this.maxRows = input.readI64(); + this.maxRows = input.readI64().value; } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I64) { - this.maxBytes = input.readI64(); + this.maxBytes = input.readI64().value; } else { input.skip(ftype); } @@ -5451,23 +5586,23 @@ TSparkGetDirectResults.prototype.write = function(output) { return; }; -var TSparkDirectResults = module.exports.TSparkDirectResults = function(args) { +TSparkDirectResults = function(args) { this.operationStatus = null; this.resultSetMetadata = null; this.resultSet = null; this.closeOperation = null; if (args) { if (args.operationStatus !== undefined && args.operationStatus !== null) { - this.operationStatus = new ttypes.TGetOperationStatusResp(args.operationStatus); + this.operationStatus = new TGetOperationStatusResp(args.operationStatus); } if (args.resultSetMetadata !== undefined && args.resultSetMetadata !== null) { - this.resultSetMetadata = new ttypes.TGetResultSetMetadataResp(args.resultSetMetadata); + this.resultSetMetadata = new TGetResultSetMetadataResp(args.resultSetMetadata); } if (args.resultSet !== undefined && args.resultSet !== null) { - this.resultSet = new ttypes.TFetchResultsResp(args.resultSet); + this.resultSet = new TFetchResultsResp(args.resultSet); } if (args.closeOperation !== undefined && args.closeOperation !== null) { - this.closeOperation = new ttypes.TCloseOperationResp(args.closeOperation); + this.closeOperation = new TCloseOperationResp(args.closeOperation); } } }; @@ -5484,7 +5619,7 @@ TSparkDirectResults.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.operationStatus = new ttypes.TGetOperationStatusResp(); + this.operationStatus = new TGetOperationStatusResp(); this.operationStatus.read(input); } else { input.skip(ftype); @@ -5492,7 +5627,7 @@ TSparkDirectResults.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.resultSetMetadata = new ttypes.TGetResultSetMetadataResp(); + this.resultSetMetadata = new TGetResultSetMetadataResp(); this.resultSetMetadata.read(input); } else { input.skip(ftype); @@ -5500,7 +5635,7 @@ TSparkDirectResults.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.STRUCT) { - this.resultSet = new ttypes.TFetchResultsResp(); + this.resultSet = new TFetchResultsResp(); this.resultSet.read(input); } else { input.skip(ftype); @@ -5508,7 +5643,7 @@ TSparkDirectResults.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.STRUCT) { - this.closeOperation = new ttypes.TCloseOperationResp(); + this.closeOperation = new TCloseOperationResp(); this.closeOperation.read(input); } else { input.skip(ftype); @@ -5550,7 +5685,7 @@ TSparkDirectResults.prototype.write = function(output) { return; }; -var TSparkArrowTypes = module.exports.TSparkArrowTypes = function(args) { +TSparkArrowTypes = function(args) { this.timestampAsArrow = null; this.decimalAsArrow = null; this.complexTypesAsArrow = null; @@ -5587,35 +5722,35 @@ TSparkArrowTypes.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.BOOL) { - this.timestampAsArrow = input.readBool(); + this.timestampAsArrow = input.readBool().value; } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.BOOL) { - this.decimalAsArrow = input.readBool(); + this.decimalAsArrow = input.readBool().value; } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.BOOL) { - this.complexTypesAsArrow = input.readBool(); + this.complexTypesAsArrow = input.readBool().value; } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.BOOL) { - this.intervalTypesAsArrow = input.readBool(); + this.intervalTypesAsArrow = input.readBool().value; } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.BOOL) { - this.nullTypeAsArrow = input.readBool(); + this.nullTypeAsArrow = input.readBool().value; } else { input.skip(ftype); } @@ -5661,7 +5796,7 @@ TSparkArrowTypes.prototype.write = function(output) { return; }; -var TExecuteStatementReq = module.exports.TExecuteStatementReq = function(args) { +TExecuteStatementReq = function(args) { this.sessionHandle = null; this.statement = null; this.confOverlay = null; @@ -5675,6 +5810,8 @@ var TExecuteStatementReq = module.exports.TExecuteStatementReq = function(args) this.useArrowNativeTypes = null; this.resultRowLimit = null; this.parameters = null; + this.maxBytesPerBatch = null; + this.statementConf = null; this.operationId = null; this.sessionConf = null; this.rejectHighCostQueries = null; @@ -5691,9 +5828,13 @@ var TExecuteStatementReq = module.exports.TExecuteStatementReq = function(args) this.resultByteLimit = null; this.resultDataFormat = null; this.originatingClientIdentity = null; + this.preferSingleFileResult = null; + this.preferDriverOnlyUpload = null; + this.enforceEmbeddedSchemaCorrectness = false; + this.idempotencyToken = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); + this.sessionHandle = new TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -5709,7 +5850,7 @@ var TExecuteStatementReq = module.exports.TExecuteStatementReq = function(args) this.runAsync = args.runAsync; } if (args.getDirectResults !== undefined && args.getDirectResults !== null) { - this.getDirectResults = new ttypes.TSparkGetDirectResults(args.getDirectResults); + this.getDirectResults = new TSparkGetDirectResults(args.getDirectResults); } if (args.queryTimeout !== undefined && args.queryTimeout !== null) { this.queryTimeout = args.queryTimeout; @@ -5727,19 +5868,25 @@ var TExecuteStatementReq = module.exports.TExecuteStatementReq = function(args) this.maxBytesPerFile = args.maxBytesPerFile; } if (args.useArrowNativeTypes !== undefined && args.useArrowNativeTypes !== null) { - this.useArrowNativeTypes = new ttypes.TSparkArrowTypes(args.useArrowNativeTypes); + this.useArrowNativeTypes = new TSparkArrowTypes(args.useArrowNativeTypes); } if (args.resultRowLimit !== undefined && args.resultRowLimit !== null) { this.resultRowLimit = args.resultRowLimit; } if (args.parameters !== undefined && args.parameters !== null) { - this.parameters = Thrift.copyList(args.parameters, [ttypes.TSparkParameter]); + this.parameters = Thrift.copyList(args.parameters, [TSparkParameter]); + } + if (args.maxBytesPerBatch !== undefined && args.maxBytesPerBatch !== null) { + this.maxBytesPerBatch = args.maxBytesPerBatch; + } + if (args.statementConf !== undefined && args.statementConf !== null) { + this.statementConf = new TStatementConf(args.statementConf); } if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new ttypes.THandleIdentifier(args.operationId); + this.operationId = new THandleIdentifier(args.operationId); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new TDBSqlSessionConf(args.sessionConf); } if (args.rejectHighCostQueries !== undefined && args.rejectHighCostQueries !== null) { this.rejectHighCostQueries = args.rejectHighCostQueries; @@ -5778,11 +5925,23 @@ var TExecuteStatementReq = module.exports.TExecuteStatementReq = function(args) this.resultByteLimit = args.resultByteLimit; } if (args.resultDataFormat !== undefined && args.resultDataFormat !== null) { - this.resultDataFormat = new ttypes.TDBSqlResultFormat(args.resultDataFormat); + this.resultDataFormat = new TDBSqlResultFormat(args.resultDataFormat); } if (args.originatingClientIdentity !== undefined && args.originatingClientIdentity !== null) { this.originatingClientIdentity = args.originatingClientIdentity; } + if (args.preferSingleFileResult !== undefined && args.preferSingleFileResult !== null) { + this.preferSingleFileResult = args.preferSingleFileResult; + } + if (args.preferDriverOnlyUpload !== undefined && args.preferDriverOnlyUpload !== null) { + this.preferDriverOnlyUpload = args.preferDriverOnlyUpload; + } + if (args.enforceEmbeddedSchemaCorrectness !== undefined && args.enforceEmbeddedSchemaCorrectness !== null) { + this.enforceEmbeddedSchemaCorrectness = args.enforceEmbeddedSchemaCorrectness; + } + if (args.idempotencyToken !== undefined && args.idempotencyToken !== null) { + this.idempotencyToken = args.idempotencyToken; + } } }; TExecuteStatementReq.prototype = {}; @@ -5798,7 +5957,7 @@ TExecuteStatementReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new ttypes.TSessionHandle(); + this.sessionHandle = new TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -5806,7 +5965,7 @@ TExecuteStatementReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.statement = input.readString(); + this.statement = input.readString().value; } else { input.skip(ftype); } @@ -5814,14 +5973,19 @@ TExecuteStatementReq.prototype.read = function(input) { case 3: if (ftype == Thrift.Type.MAP) { this.confOverlay = {}; - var _rtmp3169 = input.readMapBegin(); - var _size168 = _rtmp3169.size || 0; - for (var _i170 = 0; _i170 < _size168; ++_i170) { - var key171 = null; - var val172 = null; - key171 = input.readString(); - val172 = input.readString(); - this.confOverlay[key171] = val172; + var _rtmp3183 = input.readMapBegin(); + var _size182 = _rtmp3183.size || 0; + for (var _i184 = 0; _i184 < _size182; ++_i184) { + if (_i184 > 0 ) { + if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { + input.rstack.pop(); + } + } + var key185 = null; + var val186 = null; + key185 = input.readString().value; + val186 = input.readString().value; + this.confOverlay[key185] = val186; } input.readMapEnd(); } else { @@ -5830,14 +5994,14 @@ TExecuteStatementReq.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.BOOL) { - this.runAsync = input.readBool(); + this.runAsync = input.readBool().value; } else { input.skip(ftype); } break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.getDirectResults = new ttypes.TSparkGetDirectResults(); + this.getDirectResults = new TSparkGetDirectResults(); this.getDirectResults.read(input); } else { input.skip(ftype); @@ -5845,42 +6009,42 @@ TExecuteStatementReq.prototype.read = function(input) { break; case 5: if (ftype == Thrift.Type.I64) { - this.queryTimeout = input.readI64(); + this.queryTimeout = input.readI64().value; } else { input.skip(ftype); } break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.canReadArrowResult = input.readBool(); + this.canReadArrowResult = input.readBool().value; } else { input.skip(ftype); } break; case 1283: if (ftype == Thrift.Type.BOOL) { - this.canDownloadResult = input.readBool(); + this.canDownloadResult = input.readBool().value; } else { input.skip(ftype); } break; case 1284: if (ftype == Thrift.Type.BOOL) { - this.canDecompressLZ4Result = input.readBool(); + this.canDecompressLZ4Result = input.readBool().value; } else { input.skip(ftype); } break; case 1285: if (ftype == Thrift.Type.I64) { - this.maxBytesPerFile = input.readI64(); + this.maxBytesPerFile = input.readI64().value; } else { input.skip(ftype); } break; case 1286: if (ftype == Thrift.Type.STRUCT) { - this.useArrowNativeTypes = new ttypes.TSparkArrowTypes(); + this.useArrowNativeTypes = new TSparkArrowTypes(); this.useArrowNativeTypes.read(input); } else { input.skip(ftype); @@ -5888,7 +6052,7 @@ TExecuteStatementReq.prototype.read = function(input) { break; case 1287: if (ftype == Thrift.Type.I64) { - this.resultRowLimit = input.readI64(); + this.resultRowLimit = input.readI64().value; } else { input.skip(ftype); } @@ -5896,22 +6060,37 @@ TExecuteStatementReq.prototype.read = function(input) { case 1288: if (ftype == Thrift.Type.LIST) { this.parameters = []; - var _rtmp3174 = input.readListBegin(); - var _size173 = _rtmp3174.size || 0; - for (var _i175 = 0; _i175 < _size173; ++_i175) { - var elem176 = null; - elem176 = new ttypes.TSparkParameter(); - elem176.read(input); - this.parameters.push(elem176); + var _rtmp3188 = input.readListBegin(); + var _size187 = _rtmp3188.size || 0; + for (var _i189 = 0; _i189 < _size187; ++_i189) { + var elem190 = null; + elem190 = new TSparkParameter(); + elem190.read(input); + this.parameters.push(elem190); } input.readListEnd(); } else { input.skip(ftype); } break; + case 1289: + if (ftype == Thrift.Type.I64) { + this.maxBytesPerBatch = input.readI64().value; + } else { + input.skip(ftype); + } + break; + case 1296: + if (ftype == Thrift.Type.STRUCT) { + this.statementConf = new TStatementConf(); + this.statementConf.read(input); + } else { + input.skip(ftype); + } + break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new ttypes.THandleIdentifier(); + this.operationId = new THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -5919,7 +6098,7 @@ TExecuteStatementReq.prototype.read = function(input) { break; case 3330: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new ttypes.TDBSqlSessionConf(); + this.sessionConf = new TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -5927,56 +6106,56 @@ TExecuteStatementReq.prototype.read = function(input) { break; case 3331: if (ftype == Thrift.Type.BOOL) { - this.rejectHighCostQueries = input.readBool(); + this.rejectHighCostQueries = input.readBool().value; } else { input.skip(ftype); } break; case 3332: if (ftype == Thrift.Type.DOUBLE) { - this.estimatedCost = input.readDouble(); + this.estimatedCost = input.readDouble().value; } else { input.skip(ftype); } break; case 3333: if (ftype == Thrift.Type.I16) { - this.executionVersion = input.readI16(); + this.executionVersion = input.readI16().value; } else { input.skip(ftype); } break; case 3334: if (ftype == Thrift.Type.STRING) { - this.requestValidation = input.readBinary(); + this.requestValidation = input.readBinary().value; } else { input.skip(ftype); } break; case 3335: if (ftype == Thrift.Type.I32) { - this.resultPersistenceMode = input.readI32(); + this.resultPersistenceMode = input.readI32().value; } else { input.skip(ftype); } break; case 3336: if (ftype == Thrift.Type.BOOL) { - this.trimArrowBatchesToLimit = input.readBool(); + this.trimArrowBatchesToLimit = input.readBool().value; } else { input.skip(ftype); } break; case 3337: if (ftype == Thrift.Type.I32) { - this.fetchDisposition = input.readI32(); + this.fetchDisposition = input.readI32().value; } else { input.skip(ftype); } break; case 3344: if (ftype == Thrift.Type.BOOL) { - this.enforceResultPersistenceMode = input.readBool(); + this.enforceResultPersistenceMode = input.readBool().value; } else { input.skip(ftype); } @@ -5984,13 +6163,13 @@ TExecuteStatementReq.prototype.read = function(input) { case 3345: if (ftype == Thrift.Type.LIST) { this.statementList = []; - var _rtmp3178 = input.readListBegin(); - var _size177 = _rtmp3178.size || 0; - for (var _i179 = 0; _i179 < _size177; ++_i179) { - var elem180 = null; - elem180 = new ttypes.TDBSqlStatement(); - elem180.read(input); - this.statementList.push(elem180); + var _rtmp3192 = input.readListBegin(); + var _size191 = _rtmp3192.size || 0; + for (var _i193 = 0; _i193 < _size191; ++_i193) { + var elem194 = null; + elem194 = new TDBSqlStatement(); + elem194.read(input); + this.statementList.push(elem194); } input.readListEnd(); } else { @@ -5999,28 +6178,28 @@ TExecuteStatementReq.prototype.read = function(input) { break; case 3346: if (ftype == Thrift.Type.BOOL) { - this.persistResultManifest = input.readBool(); + this.persistResultManifest = input.readBool().value; } else { input.skip(ftype); } break; case 3347: if (ftype == Thrift.Type.I64) { - this.resultRetentionSeconds = input.readI64(); + this.resultRetentionSeconds = input.readI64().value; } else { input.skip(ftype); } break; case 3348: if (ftype == Thrift.Type.I64) { - this.resultByteLimit = input.readI64(); + this.resultByteLimit = input.readI64().value; } else { input.skip(ftype); } break; case 3349: if (ftype == Thrift.Type.STRUCT) { - this.resultDataFormat = new ttypes.TDBSqlResultFormat(); + this.resultDataFormat = new TDBSqlResultFormat(); this.resultDataFormat.read(input); } else { input.skip(ftype); @@ -6028,7 +6207,35 @@ TExecuteStatementReq.prototype.read = function(input) { break; case 3350: if (ftype == Thrift.Type.STRING) { - this.originatingClientIdentity = input.readString(); + this.originatingClientIdentity = input.readString().value; + } else { + input.skip(ftype); + } + break; + case 3351: + if (ftype == Thrift.Type.BOOL) { + this.preferSingleFileResult = input.readBool().value; + } else { + input.skip(ftype); + } + break; + case 3352: + if (ftype == Thrift.Type.BOOL) { + this.preferDriverOnlyUpload = input.readBool().value; + } else { + input.skip(ftype); + } + break; + case 3353: + if (ftype == Thrift.Type.BOOL) { + this.enforceEmbeddedSchemaCorrectness = input.readBool().value; + } else { + input.skip(ftype); + } + break; + case 3360: + if (ftype == Thrift.Type.STRING) { + this.idempotencyToken = input.readString().value; } else { input.skip(ftype); } @@ -6057,11 +6264,11 @@ TExecuteStatementReq.prototype.write = function(output) { if (this.confOverlay !== null && this.confOverlay !== undefined) { output.writeFieldBegin('confOverlay', Thrift.Type.MAP, 3); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.confOverlay)); - for (var kiter181 in this.confOverlay) { - if (this.confOverlay.hasOwnProperty(kiter181)) { - var viter182 = this.confOverlay[kiter181]; - output.writeString(kiter181); - output.writeString(viter182); + for (var kiter195 in this.confOverlay) { + if (this.confOverlay.hasOwnProperty(kiter195)) { + var viter196 = this.confOverlay[kiter195]; + output.writeString(kiter195); + output.writeString(viter196); } } output.writeMapEnd(); @@ -6115,15 +6322,25 @@ TExecuteStatementReq.prototype.write = function(output) { if (this.parameters !== null && this.parameters !== undefined) { output.writeFieldBegin('parameters', Thrift.Type.LIST, 1288); output.writeListBegin(Thrift.Type.STRUCT, this.parameters.length); - for (var iter183 in this.parameters) { - if (this.parameters.hasOwnProperty(iter183)) { - iter183 = this.parameters[iter183]; - iter183.write(output); + for (var iter197 in this.parameters) { + if (this.parameters.hasOwnProperty(iter197)) { + iter197 = this.parameters[iter197]; + iter197.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } + if (this.maxBytesPerBatch !== null && this.maxBytesPerBatch !== undefined) { + output.writeFieldBegin('maxBytesPerBatch', Thrift.Type.I64, 1289); + output.writeI64(this.maxBytesPerBatch); + output.writeFieldEnd(); + } + if (this.statementConf !== null && this.statementConf !== undefined) { + output.writeFieldBegin('statementConf', Thrift.Type.STRUCT, 1296); + this.statementConf.write(output); + output.writeFieldEnd(); + } if (this.operationId !== null && this.operationId !== undefined) { output.writeFieldBegin('operationId', Thrift.Type.STRUCT, 3329); this.operationId.write(output); @@ -6177,10 +6394,10 @@ TExecuteStatementReq.prototype.write = function(output) { if (this.statementList !== null && this.statementList !== undefined) { output.writeFieldBegin('statementList', Thrift.Type.LIST, 3345); output.writeListBegin(Thrift.Type.STRUCT, this.statementList.length); - for (var iter184 in this.statementList) { - if (this.statementList.hasOwnProperty(iter184)) { - iter184 = this.statementList[iter184]; - iter184.write(output); + for (var iter198 in this.statementList) { + if (this.statementList.hasOwnProperty(iter198)) { + iter198 = this.statementList[iter198]; + iter198.write(output); } } output.writeListEnd(); @@ -6211,12 +6428,32 @@ TExecuteStatementReq.prototype.write = function(output) { output.writeString(this.originatingClientIdentity); output.writeFieldEnd(); } + if (this.preferSingleFileResult !== null && this.preferSingleFileResult !== undefined) { + output.writeFieldBegin('preferSingleFileResult', Thrift.Type.BOOL, 3351); + output.writeBool(this.preferSingleFileResult); + output.writeFieldEnd(); + } + if (this.preferDriverOnlyUpload !== null && this.preferDriverOnlyUpload !== undefined) { + output.writeFieldBegin('preferDriverOnlyUpload', Thrift.Type.BOOL, 3352); + output.writeBool(this.preferDriverOnlyUpload); + output.writeFieldEnd(); + } + if (this.enforceEmbeddedSchemaCorrectness !== null && this.enforceEmbeddedSchemaCorrectness !== undefined) { + output.writeFieldBegin('enforceEmbeddedSchemaCorrectness', Thrift.Type.BOOL, 3353); + output.writeBool(this.enforceEmbeddedSchemaCorrectness); + output.writeFieldEnd(); + } + if (this.idempotencyToken !== null && this.idempotencyToken !== undefined) { + output.writeFieldBegin('idempotencyToken', Thrift.Type.STRING, 3360); + output.writeString(this.idempotencyToken); + output.writeFieldEnd(); + } output.writeFieldStop(); output.writeStructEnd(); return; }; -var TDBSqlStatement = module.exports.TDBSqlStatement = function(args) { +TDBSqlStatement = function(args) { this.statement = null; if (args) { if (args.statement !== undefined && args.statement !== null) { @@ -6237,7 +6474,7 @@ TDBSqlStatement.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.statement = input.readString(); + this.statement = input.readString().value; } else { input.skip(ftype); } @@ -6266,7 +6503,7 @@ TDBSqlStatement.prototype.write = function(output) { return; }; -var TSparkParameterValue = module.exports.TSparkParameterValue = function(args) { +TSparkParameterValue = function(args) { this.stringValue = null; this.doubleValue = null; this.booleanValue = null; @@ -6295,21 +6532,21 @@ TSparkParameterValue.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.stringValue = input.readString(); + this.stringValue = input.readString().value; } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.DOUBLE) { - this.doubleValue = input.readDouble(); + this.doubleValue = input.readDouble().value; } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.BOOL) { - this.booleanValue = input.readBool(); + this.booleanValue = input.readBool().value; } else { input.skip(ftype); } @@ -6345,7 +6582,7 @@ TSparkParameterValue.prototype.write = function(output) { return; }; -var TSparkParameter = module.exports.TSparkParameter = function(args) { +TSparkParameter = function(args) { this.ordinal = null; this.name = null; this.type = null; @@ -6361,7 +6598,7 @@ var TSparkParameter = module.exports.TSparkParameter = function(args) { this.type = args.type; } if (args.value !== undefined && args.value !== null) { - this.value = new ttypes.TSparkParameterValue(args.value); + this.value = new TSparkParameterValue(args.value); } } }; @@ -6378,28 +6615,28 @@ TSparkParameter.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.ordinal = input.readI32(); + this.ordinal = input.readI32().value; } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { - this.name = input.readString(); + this.name = input.readString().value; } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.type = input.readString(); + this.type = input.readString().value; } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRUCT) { - this.value = new ttypes.TSparkParameterValue(); + this.value = new TSparkParameterValue(); this.value.read(input); } else { input.skip(ftype); @@ -6441,7 +6678,103 @@ TSparkParameter.prototype.write = function(output) { return; }; -var TExecuteStatementResp = module.exports.TExecuteStatementResp = function(args) { +TStatementConf = function(args) { + this.sessionless = null; + this.initialNamespace = null; + this.client_protocol = null; + this.client_protocol_i64 = null; + if (args) { + if (args.sessionless !== undefined && args.sessionless !== null) { + this.sessionless = args.sessionless; + } + if (args.initialNamespace !== undefined && args.initialNamespace !== null) { + this.initialNamespace = new TNamespace(args.initialNamespace); + } + if (args.client_protocol !== undefined && args.client_protocol !== null) { + this.client_protocol = args.client_protocol; + } + if (args.client_protocol_i64 !== undefined && args.client_protocol_i64 !== null) { + this.client_protocol_i64 = args.client_protocol_i64; + } + } +}; +TStatementConf.prototype = {}; +TStatementConf.prototype.read = function(input) { + input.readStructBegin(); + while (true) { + var ret = input.readFieldBegin(); + var ftype = ret.ftype; + var fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.BOOL) { + this.sessionless = input.readBool().value; + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.STRUCT) { + this.initialNamespace = new TNamespace(); + this.initialNamespace.read(input); + } else { + input.skip(ftype); + } + break; + case 3: + if (ftype == Thrift.Type.I32) { + this.client_protocol = input.readI32().value; + } else { + input.skip(ftype); + } + break; + case 4: + if (ftype == Thrift.Type.I64) { + this.client_protocol_i64 = input.readI64().value; + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; +}; + +TStatementConf.prototype.write = function(output) { + output.writeStructBegin('TStatementConf'); + if (this.sessionless !== null && this.sessionless !== undefined) { + output.writeFieldBegin('sessionless', Thrift.Type.BOOL, 1); + output.writeBool(this.sessionless); + output.writeFieldEnd(); + } + if (this.initialNamespace !== null && this.initialNamespace !== undefined) { + output.writeFieldBegin('initialNamespace', Thrift.Type.STRUCT, 2); + this.initialNamespace.write(output); + output.writeFieldEnd(); + } + if (this.client_protocol !== null && this.client_protocol !== undefined) { + output.writeFieldBegin('client_protocol', Thrift.Type.I32, 3); + output.writeI32(this.client_protocol); + output.writeFieldEnd(); + } + if (this.client_protocol_i64 !== null && this.client_protocol_i64 !== undefined) { + output.writeFieldBegin('client_protocol_i64', Thrift.Type.I64, 4); + output.writeI64(this.client_protocol_i64); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; +}; + +TExecuteStatementResp = function(args) { this.status = null; this.operationHandle = null; this.directResults = null; @@ -6456,15 +6789,15 @@ var TExecuteStatementResp = module.exports.TExecuteStatementResp = function(args this.operationHandles = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); + this.operationHandle = new TOperationHandle(args.operationHandle); } if (args.directResults !== undefined && args.directResults !== null) { - this.directResults = new ttypes.TSparkDirectResults(args.directResults); + this.directResults = new TSparkDirectResults(args.directResults); } if (args.executionRejected !== undefined && args.executionRejected !== null) { this.executionRejected = args.executionRejected; @@ -6476,7 +6809,7 @@ var TExecuteStatementResp = module.exports.TExecuteStatementResp = function(args this.queryCost = args.queryCost; } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new TDBSqlSessionConf(args.sessionConf); } if (args.currentClusterLoad !== undefined && args.currentClusterLoad !== null) { this.currentClusterLoad = args.currentClusterLoad; @@ -6491,7 +6824,7 @@ var TExecuteStatementResp = module.exports.TExecuteStatementResp = function(args this.isServerless = args.isServerless; } if (args.operationHandles !== undefined && args.operationHandles !== null) { - this.operationHandles = Thrift.copyList(args.operationHandles, [ttypes.TOperationHandle]); + this.operationHandles = Thrift.copyList(args.operationHandles, [TOperationHandle]); } } }; @@ -6508,7 +6841,7 @@ TExecuteStatementResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -6516,7 +6849,7 @@ TExecuteStatementResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new ttypes.TOperationHandle(); + this.operationHandle = new TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -6524,7 +6857,7 @@ TExecuteStatementResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.directResults = new ttypes.TSparkDirectResults(); + this.directResults = new TSparkDirectResults(); this.directResults.read(input); } else { input.skip(ftype); @@ -6532,28 +6865,28 @@ TExecuteStatementResp.prototype.read = function(input) { break; case 3329: if (ftype == Thrift.Type.BOOL) { - this.executionRejected = input.readBool(); + this.executionRejected = input.readBool().value; } else { input.skip(ftype); } break; case 3330: if (ftype == Thrift.Type.DOUBLE) { - this.maxClusterCapacity = input.readDouble(); + this.maxClusterCapacity = input.readDouble().value; } else { input.skip(ftype); } break; case 3331: if (ftype == Thrift.Type.DOUBLE) { - this.queryCost = input.readDouble(); + this.queryCost = input.readDouble().value; } else { input.skip(ftype); } break; case 3332: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new ttypes.TDBSqlSessionConf(); + this.sessionConf = new TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -6561,28 +6894,28 @@ TExecuteStatementResp.prototype.read = function(input) { break; case 3333: if (ftype == Thrift.Type.DOUBLE) { - this.currentClusterLoad = input.readDouble(); + this.currentClusterLoad = input.readDouble().value; } else { input.skip(ftype); } break; case 3334: if (ftype == Thrift.Type.I32) { - this.idempotencyType = input.readI32(); + this.idempotencyType = input.readI32().value; } else { input.skip(ftype); } break; case 3335: if (ftype == Thrift.Type.BOOL) { - this.remoteResultCacheEnabled = input.readBool(); + this.remoteResultCacheEnabled = input.readBool().value; } else { input.skip(ftype); } break; case 3336: if (ftype == Thrift.Type.BOOL) { - this.isServerless = input.readBool(); + this.isServerless = input.readBool().value; } else { input.skip(ftype); } @@ -6590,13 +6923,13 @@ TExecuteStatementResp.prototype.read = function(input) { case 3337: if (ftype == Thrift.Type.LIST) { this.operationHandles = []; - var _rtmp3186 = input.readListBegin(); - var _size185 = _rtmp3186.size || 0; - for (var _i187 = 0; _i187 < _size185; ++_i187) { - var elem188 = null; - elem188 = new ttypes.TOperationHandle(); - elem188.read(input); - this.operationHandles.push(elem188); + var _rtmp3200 = input.readListBegin(); + var _size199 = _rtmp3200.size || 0; + for (var _i201 = 0; _i201 < _size199; ++_i201) { + var elem202 = null; + elem202 = new TOperationHandle(); + elem202.read(input); + this.operationHandles.push(elem202); } input.readListEnd(); } else { @@ -6672,10 +7005,10 @@ TExecuteStatementResp.prototype.write = function(output) { if (this.operationHandles !== null && this.operationHandles !== undefined) { output.writeFieldBegin('operationHandles', Thrift.Type.LIST, 3337); output.writeListBegin(Thrift.Type.STRUCT, this.operationHandles.length); - for (var iter189 in this.operationHandles) { - if (this.operationHandles.hasOwnProperty(iter189)) { - iter189 = this.operationHandles[iter189]; - iter189.write(output); + for (var iter203 in this.operationHandles) { + if (this.operationHandles.hasOwnProperty(iter203)) { + iter203 = this.operationHandles[iter203]; + iter203.write(output); } } output.writeListEnd(); @@ -6686,7 +7019,7 @@ TExecuteStatementResp.prototype.write = function(output) { return; }; -var TGetTypeInfoReq = module.exports.TGetTypeInfoReq = function(args) { +TGetTypeInfoReq = function(args) { this.sessionHandle = null; this.getDirectResults = null; this.runAsync = false; @@ -6694,21 +7027,21 @@ var TGetTypeInfoReq = module.exports.TGetTypeInfoReq = function(args) { this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); + this.sessionHandle = new TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } if (args.getDirectResults !== undefined && args.getDirectResults !== null) { - this.getDirectResults = new ttypes.TSparkGetDirectResults(args.getDirectResults); + this.getDirectResults = new TSparkGetDirectResults(args.getDirectResults); } if (args.runAsync !== undefined && args.runAsync !== null) { this.runAsync = args.runAsync; } if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new ttypes.THandleIdentifier(args.operationId); + this.operationId = new THandleIdentifier(args.operationId); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new TDBSqlSessionConf(args.sessionConf); } } }; @@ -6725,7 +7058,7 @@ TGetTypeInfoReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new ttypes.TSessionHandle(); + this.sessionHandle = new TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -6733,7 +7066,7 @@ TGetTypeInfoReq.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.getDirectResults = new ttypes.TSparkGetDirectResults(); + this.getDirectResults = new TSparkGetDirectResults(); this.getDirectResults.read(input); } else { input.skip(ftype); @@ -6741,14 +7074,14 @@ TGetTypeInfoReq.prototype.read = function(input) { break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.runAsync = input.readBool(); + this.runAsync = input.readBool().value; } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new ttypes.THandleIdentifier(); + this.operationId = new THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -6756,7 +7089,7 @@ TGetTypeInfoReq.prototype.read = function(input) { break; case 3330: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new ttypes.TDBSqlSessionConf(); + this.sessionConf = new TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -6803,21 +7136,21 @@ TGetTypeInfoReq.prototype.write = function(output) { return; }; -var TGetTypeInfoResp = module.exports.TGetTypeInfoResp = function(args) { +TGetTypeInfoResp = function(args) { this.status = null; this.operationHandle = null; this.directResults = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); + this.operationHandle = new TOperationHandle(args.operationHandle); } if (args.directResults !== undefined && args.directResults !== null) { - this.directResults = new ttypes.TSparkDirectResults(args.directResults); + this.directResults = new TSparkDirectResults(args.directResults); } } }; @@ -6834,7 +7167,7 @@ TGetTypeInfoResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -6842,7 +7175,7 @@ TGetTypeInfoResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new ttypes.TOperationHandle(); + this.operationHandle = new TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -6850,7 +7183,7 @@ TGetTypeInfoResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.directResults = new ttypes.TSparkDirectResults(); + this.directResults = new TSparkDirectResults(); this.directResults.read(input); } else { input.skip(ftype); @@ -6887,7 +7220,7 @@ TGetTypeInfoResp.prototype.write = function(output) { return; }; -var TGetCatalogsReq = module.exports.TGetCatalogsReq = function(args) { +TGetCatalogsReq = function(args) { this.sessionHandle = null; this.getDirectResults = null; this.runAsync = false; @@ -6895,21 +7228,21 @@ var TGetCatalogsReq = module.exports.TGetCatalogsReq = function(args) { this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); + this.sessionHandle = new TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } if (args.getDirectResults !== undefined && args.getDirectResults !== null) { - this.getDirectResults = new ttypes.TSparkGetDirectResults(args.getDirectResults); + this.getDirectResults = new TSparkGetDirectResults(args.getDirectResults); } if (args.runAsync !== undefined && args.runAsync !== null) { this.runAsync = args.runAsync; } if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new ttypes.THandleIdentifier(args.operationId); + this.operationId = new THandleIdentifier(args.operationId); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new TDBSqlSessionConf(args.sessionConf); } } }; @@ -6926,7 +7259,7 @@ TGetCatalogsReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new ttypes.TSessionHandle(); + this.sessionHandle = new TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -6934,7 +7267,7 @@ TGetCatalogsReq.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.getDirectResults = new ttypes.TSparkGetDirectResults(); + this.getDirectResults = new TSparkGetDirectResults(); this.getDirectResults.read(input); } else { input.skip(ftype); @@ -6942,14 +7275,14 @@ TGetCatalogsReq.prototype.read = function(input) { break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.runAsync = input.readBool(); + this.runAsync = input.readBool().value; } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new ttypes.THandleIdentifier(); + this.operationId = new THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -6957,7 +7290,7 @@ TGetCatalogsReq.prototype.read = function(input) { break; case 3330: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new ttypes.TDBSqlSessionConf(); + this.sessionConf = new TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -7004,21 +7337,21 @@ TGetCatalogsReq.prototype.write = function(output) { return; }; -var TGetCatalogsResp = module.exports.TGetCatalogsResp = function(args) { +TGetCatalogsResp = function(args) { this.status = null; this.operationHandle = null; this.directResults = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); + this.operationHandle = new TOperationHandle(args.operationHandle); } if (args.directResults !== undefined && args.directResults !== null) { - this.directResults = new ttypes.TSparkDirectResults(args.directResults); + this.directResults = new TSparkDirectResults(args.directResults); } } }; @@ -7035,7 +7368,7 @@ TGetCatalogsResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -7043,7 +7376,7 @@ TGetCatalogsResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new ttypes.TOperationHandle(); + this.operationHandle = new TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -7051,7 +7384,7 @@ TGetCatalogsResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.directResults = new ttypes.TSparkDirectResults(); + this.directResults = new TSparkDirectResults(); this.directResults.read(input); } else { input.skip(ftype); @@ -7088,7 +7421,7 @@ TGetCatalogsResp.prototype.write = function(output) { return; }; -var TGetSchemasReq = module.exports.TGetSchemasReq = function(args) { +TGetSchemasReq = function(args) { this.sessionHandle = null; this.catalogName = null; this.schemaName = null; @@ -7098,7 +7431,7 @@ var TGetSchemasReq = module.exports.TGetSchemasReq = function(args) { this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); + this.sessionHandle = new TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -7109,16 +7442,16 @@ var TGetSchemasReq = module.exports.TGetSchemasReq = function(args) { this.schemaName = args.schemaName; } if (args.getDirectResults !== undefined && args.getDirectResults !== null) { - this.getDirectResults = new ttypes.TSparkGetDirectResults(args.getDirectResults); + this.getDirectResults = new TSparkGetDirectResults(args.getDirectResults); } if (args.runAsync !== undefined && args.runAsync !== null) { this.runAsync = args.runAsync; } if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new ttypes.THandleIdentifier(args.operationId); + this.operationId = new THandleIdentifier(args.operationId); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new TDBSqlSessionConf(args.sessionConf); } } }; @@ -7135,7 +7468,7 @@ TGetSchemasReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new ttypes.TSessionHandle(); + this.sessionHandle = new TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -7143,21 +7476,21 @@ TGetSchemasReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.catalogName = input.readString(); + this.catalogName = input.readString().value; } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.schemaName = input.readString(); + this.schemaName = input.readString().value; } else { input.skip(ftype); } break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.getDirectResults = new ttypes.TSparkGetDirectResults(); + this.getDirectResults = new TSparkGetDirectResults(); this.getDirectResults.read(input); } else { input.skip(ftype); @@ -7165,14 +7498,14 @@ TGetSchemasReq.prototype.read = function(input) { break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.runAsync = input.readBool(); + this.runAsync = input.readBool().value; } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new ttypes.THandleIdentifier(); + this.operationId = new THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -7180,7 +7513,7 @@ TGetSchemasReq.prototype.read = function(input) { break; case 3330: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new ttypes.TDBSqlSessionConf(); + this.sessionConf = new TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -7237,21 +7570,21 @@ TGetSchemasReq.prototype.write = function(output) { return; }; -var TGetSchemasResp = module.exports.TGetSchemasResp = function(args) { +TGetSchemasResp = function(args) { this.status = null; this.operationHandle = null; this.directResults = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); + this.operationHandle = new TOperationHandle(args.operationHandle); } if (args.directResults !== undefined && args.directResults !== null) { - this.directResults = new ttypes.TSparkDirectResults(args.directResults); + this.directResults = new TSparkDirectResults(args.directResults); } } }; @@ -7268,7 +7601,7 @@ TGetSchemasResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -7276,7 +7609,7 @@ TGetSchemasResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new ttypes.TOperationHandle(); + this.operationHandle = new TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -7284,7 +7617,7 @@ TGetSchemasResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.directResults = new ttypes.TSparkDirectResults(); + this.directResults = new TSparkDirectResults(); this.directResults.read(input); } else { input.skip(ftype); @@ -7321,7 +7654,7 @@ TGetSchemasResp.prototype.write = function(output) { return; }; -var TGetTablesReq = module.exports.TGetTablesReq = function(args) { +TGetTablesReq = function(args) { this.sessionHandle = null; this.catalogName = null; this.schemaName = null; @@ -7333,7 +7666,7 @@ var TGetTablesReq = module.exports.TGetTablesReq = function(args) { this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); + this.sessionHandle = new TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -7350,16 +7683,16 @@ var TGetTablesReq = module.exports.TGetTablesReq = function(args) { this.tableTypes = Thrift.copyList(args.tableTypes, [null]); } if (args.getDirectResults !== undefined && args.getDirectResults !== null) { - this.getDirectResults = new ttypes.TSparkGetDirectResults(args.getDirectResults); + this.getDirectResults = new TSparkGetDirectResults(args.getDirectResults); } if (args.runAsync !== undefined && args.runAsync !== null) { this.runAsync = args.runAsync; } if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new ttypes.THandleIdentifier(args.operationId); + this.operationId = new THandleIdentifier(args.operationId); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new TDBSqlSessionConf(args.sessionConf); } } }; @@ -7376,7 +7709,7 @@ TGetTablesReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new ttypes.TSessionHandle(); + this.sessionHandle = new TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -7384,21 +7717,21 @@ TGetTablesReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.catalogName = input.readString(); + this.catalogName = input.readString().value; } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.schemaName = input.readString(); + this.schemaName = input.readString().value; } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { - this.tableName = input.readString(); + this.tableName = input.readString().value; } else { input.skip(ftype); } @@ -7406,12 +7739,12 @@ TGetTablesReq.prototype.read = function(input) { case 5: if (ftype == Thrift.Type.LIST) { this.tableTypes = []; - var _rtmp3191 = input.readListBegin(); - var _size190 = _rtmp3191.size || 0; - for (var _i192 = 0; _i192 < _size190; ++_i192) { - var elem193 = null; - elem193 = input.readString(); - this.tableTypes.push(elem193); + var _rtmp3205 = input.readListBegin(); + var _size204 = _rtmp3205.size || 0; + for (var _i206 = 0; _i206 < _size204; ++_i206) { + var elem207 = null; + elem207 = input.readString().value; + this.tableTypes.push(elem207); } input.readListEnd(); } else { @@ -7420,7 +7753,7 @@ TGetTablesReq.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.getDirectResults = new ttypes.TSparkGetDirectResults(); + this.getDirectResults = new TSparkGetDirectResults(); this.getDirectResults.read(input); } else { input.skip(ftype); @@ -7428,14 +7761,14 @@ TGetTablesReq.prototype.read = function(input) { break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.runAsync = input.readBool(); + this.runAsync = input.readBool().value; } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new ttypes.THandleIdentifier(); + this.operationId = new THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -7443,7 +7776,7 @@ TGetTablesReq.prototype.read = function(input) { break; case 3330: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new ttypes.TDBSqlSessionConf(); + this.sessionConf = new TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -7483,10 +7816,10 @@ TGetTablesReq.prototype.write = function(output) { if (this.tableTypes !== null && this.tableTypes !== undefined) { output.writeFieldBegin('tableTypes', Thrift.Type.LIST, 5); output.writeListBegin(Thrift.Type.STRING, this.tableTypes.length); - for (var iter194 in this.tableTypes) { - if (this.tableTypes.hasOwnProperty(iter194)) { - iter194 = this.tableTypes[iter194]; - output.writeString(iter194); + for (var iter208 in this.tableTypes) { + if (this.tableTypes.hasOwnProperty(iter208)) { + iter208 = this.tableTypes[iter208]; + output.writeString(iter208); } } output.writeListEnd(); @@ -7517,21 +7850,21 @@ TGetTablesReq.prototype.write = function(output) { return; }; -var TGetTablesResp = module.exports.TGetTablesResp = function(args) { +TGetTablesResp = function(args) { this.status = null; this.operationHandle = null; this.directResults = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); + this.operationHandle = new TOperationHandle(args.operationHandle); } if (args.directResults !== undefined && args.directResults !== null) { - this.directResults = new ttypes.TSparkDirectResults(args.directResults); + this.directResults = new TSparkDirectResults(args.directResults); } } }; @@ -7548,7 +7881,7 @@ TGetTablesResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -7556,7 +7889,7 @@ TGetTablesResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new ttypes.TOperationHandle(); + this.operationHandle = new TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -7564,7 +7897,7 @@ TGetTablesResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.directResults = new ttypes.TSparkDirectResults(); + this.directResults = new TSparkDirectResults(); this.directResults.read(input); } else { input.skip(ftype); @@ -7601,7 +7934,7 @@ TGetTablesResp.prototype.write = function(output) { return; }; -var TGetTableTypesReq = module.exports.TGetTableTypesReq = function(args) { +TGetTableTypesReq = function(args) { this.sessionHandle = null; this.getDirectResults = null; this.runAsync = false; @@ -7609,21 +7942,21 @@ var TGetTableTypesReq = module.exports.TGetTableTypesReq = function(args) { this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); + this.sessionHandle = new TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } if (args.getDirectResults !== undefined && args.getDirectResults !== null) { - this.getDirectResults = new ttypes.TSparkGetDirectResults(args.getDirectResults); + this.getDirectResults = new TSparkGetDirectResults(args.getDirectResults); } if (args.runAsync !== undefined && args.runAsync !== null) { this.runAsync = args.runAsync; } if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new ttypes.THandleIdentifier(args.operationId); + this.operationId = new THandleIdentifier(args.operationId); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new TDBSqlSessionConf(args.sessionConf); } } }; @@ -7640,7 +7973,7 @@ TGetTableTypesReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new ttypes.TSessionHandle(); + this.sessionHandle = new TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -7648,7 +7981,7 @@ TGetTableTypesReq.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.getDirectResults = new ttypes.TSparkGetDirectResults(); + this.getDirectResults = new TSparkGetDirectResults(); this.getDirectResults.read(input); } else { input.skip(ftype); @@ -7656,14 +7989,14 @@ TGetTableTypesReq.prototype.read = function(input) { break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.runAsync = input.readBool(); + this.runAsync = input.readBool().value; } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new ttypes.THandleIdentifier(); + this.operationId = new THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -7671,7 +8004,7 @@ TGetTableTypesReq.prototype.read = function(input) { break; case 3330: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new ttypes.TDBSqlSessionConf(); + this.sessionConf = new TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -7718,21 +8051,21 @@ TGetTableTypesReq.prototype.write = function(output) { return; }; -var TGetTableTypesResp = module.exports.TGetTableTypesResp = function(args) { +TGetTableTypesResp = function(args) { this.status = null; this.operationHandle = null; this.directResults = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); + this.operationHandle = new TOperationHandle(args.operationHandle); } if (args.directResults !== undefined && args.directResults !== null) { - this.directResults = new ttypes.TSparkDirectResults(args.directResults); + this.directResults = new TSparkDirectResults(args.directResults); } } }; @@ -7749,7 +8082,7 @@ TGetTableTypesResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -7757,7 +8090,7 @@ TGetTableTypesResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new ttypes.TOperationHandle(); + this.operationHandle = new TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -7765,7 +8098,7 @@ TGetTableTypesResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.directResults = new ttypes.TSparkDirectResults(); + this.directResults = new TSparkDirectResults(); this.directResults.read(input); } else { input.skip(ftype); @@ -7802,7 +8135,7 @@ TGetTableTypesResp.prototype.write = function(output) { return; }; -var TGetColumnsReq = module.exports.TGetColumnsReq = function(args) { +TGetColumnsReq = function(args) { this.sessionHandle = null; this.catalogName = null; this.schemaName = null; @@ -7814,7 +8147,7 @@ var TGetColumnsReq = module.exports.TGetColumnsReq = function(args) { this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); + this.sessionHandle = new TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -7831,16 +8164,16 @@ var TGetColumnsReq = module.exports.TGetColumnsReq = function(args) { this.columnName = args.columnName; } if (args.getDirectResults !== undefined && args.getDirectResults !== null) { - this.getDirectResults = new ttypes.TSparkGetDirectResults(args.getDirectResults); + this.getDirectResults = new TSparkGetDirectResults(args.getDirectResults); } if (args.runAsync !== undefined && args.runAsync !== null) { this.runAsync = args.runAsync; } if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new ttypes.THandleIdentifier(args.operationId); + this.operationId = new THandleIdentifier(args.operationId); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new TDBSqlSessionConf(args.sessionConf); } } }; @@ -7857,7 +8190,7 @@ TGetColumnsReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new ttypes.TSessionHandle(); + this.sessionHandle = new TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -7865,35 +8198,35 @@ TGetColumnsReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.catalogName = input.readString(); + this.catalogName = input.readString().value; } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.schemaName = input.readString(); + this.schemaName = input.readString().value; } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { - this.tableName = input.readString(); + this.tableName = input.readString().value; } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { - this.columnName = input.readString(); + this.columnName = input.readString().value; } else { input.skip(ftype); } break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.getDirectResults = new ttypes.TSparkGetDirectResults(); + this.getDirectResults = new TSparkGetDirectResults(); this.getDirectResults.read(input); } else { input.skip(ftype); @@ -7901,14 +8234,14 @@ TGetColumnsReq.prototype.read = function(input) { break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.runAsync = input.readBool(); + this.runAsync = input.readBool().value; } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new ttypes.THandleIdentifier(); + this.operationId = new THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -7916,7 +8249,7 @@ TGetColumnsReq.prototype.read = function(input) { break; case 3330: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new ttypes.TDBSqlSessionConf(); + this.sessionConf = new TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -7983,21 +8316,21 @@ TGetColumnsReq.prototype.write = function(output) { return; }; -var TGetColumnsResp = module.exports.TGetColumnsResp = function(args) { +TGetColumnsResp = function(args) { this.status = null; this.operationHandle = null; this.directResults = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); + this.operationHandle = new TOperationHandle(args.operationHandle); } if (args.directResults !== undefined && args.directResults !== null) { - this.directResults = new ttypes.TSparkDirectResults(args.directResults); + this.directResults = new TSparkDirectResults(args.directResults); } } }; @@ -8014,7 +8347,7 @@ TGetColumnsResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -8022,7 +8355,7 @@ TGetColumnsResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new ttypes.TOperationHandle(); + this.operationHandle = new TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -8030,7 +8363,7 @@ TGetColumnsResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.directResults = new ttypes.TSparkDirectResults(); + this.directResults = new TSparkDirectResults(); this.directResults.read(input); } else { input.skip(ftype); @@ -8067,7 +8400,7 @@ TGetColumnsResp.prototype.write = function(output) { return; }; -var TGetFunctionsReq = module.exports.TGetFunctionsReq = function(args) { +TGetFunctionsReq = function(args) { this.sessionHandle = null; this.catalogName = null; this.schemaName = null; @@ -8078,7 +8411,7 @@ var TGetFunctionsReq = module.exports.TGetFunctionsReq = function(args) { this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); + this.sessionHandle = new TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -8094,16 +8427,16 @@ var TGetFunctionsReq = module.exports.TGetFunctionsReq = function(args) { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field functionName is unset!'); } if (args.getDirectResults !== undefined && args.getDirectResults !== null) { - this.getDirectResults = new ttypes.TSparkGetDirectResults(args.getDirectResults); + this.getDirectResults = new TSparkGetDirectResults(args.getDirectResults); } if (args.runAsync !== undefined && args.runAsync !== null) { this.runAsync = args.runAsync; } if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new ttypes.THandleIdentifier(args.operationId); + this.operationId = new THandleIdentifier(args.operationId); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new TDBSqlSessionConf(args.sessionConf); } } }; @@ -8120,7 +8453,7 @@ TGetFunctionsReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new ttypes.TSessionHandle(); + this.sessionHandle = new TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -8128,28 +8461,28 @@ TGetFunctionsReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.catalogName = input.readString(); + this.catalogName = input.readString().value; } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.schemaName = input.readString(); + this.schemaName = input.readString().value; } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { - this.functionName = input.readString(); + this.functionName = input.readString().value; } else { input.skip(ftype); } break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.getDirectResults = new ttypes.TSparkGetDirectResults(); + this.getDirectResults = new TSparkGetDirectResults(); this.getDirectResults.read(input); } else { input.skip(ftype); @@ -8157,14 +8490,14 @@ TGetFunctionsReq.prototype.read = function(input) { break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.runAsync = input.readBool(); + this.runAsync = input.readBool().value; } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new ttypes.THandleIdentifier(); + this.operationId = new THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -8172,7 +8505,7 @@ TGetFunctionsReq.prototype.read = function(input) { break; case 3330: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new ttypes.TDBSqlSessionConf(); + this.sessionConf = new TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -8234,21 +8567,21 @@ TGetFunctionsReq.prototype.write = function(output) { return; }; -var TGetFunctionsResp = module.exports.TGetFunctionsResp = function(args) { +TGetFunctionsResp = function(args) { this.status = null; this.operationHandle = null; this.directResults = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); + this.operationHandle = new TOperationHandle(args.operationHandle); } if (args.directResults !== undefined && args.directResults !== null) { - this.directResults = new ttypes.TSparkDirectResults(args.directResults); + this.directResults = new TSparkDirectResults(args.directResults); } } }; @@ -8265,7 +8598,7 @@ TGetFunctionsResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -8273,7 +8606,7 @@ TGetFunctionsResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new ttypes.TOperationHandle(); + this.operationHandle = new TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -8281,7 +8614,7 @@ TGetFunctionsResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.directResults = new ttypes.TSparkDirectResults(); + this.directResults = new TSparkDirectResults(); this.directResults.read(input); } else { input.skip(ftype); @@ -8318,7 +8651,7 @@ TGetFunctionsResp.prototype.write = function(output) { return; }; -var TGetPrimaryKeysReq = module.exports.TGetPrimaryKeysReq = function(args) { +TGetPrimaryKeysReq = function(args) { this.sessionHandle = null; this.catalogName = null; this.schemaName = null; @@ -8329,7 +8662,7 @@ var TGetPrimaryKeysReq = module.exports.TGetPrimaryKeysReq = function(args) { this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); + this.sessionHandle = new TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -8343,16 +8676,16 @@ var TGetPrimaryKeysReq = module.exports.TGetPrimaryKeysReq = function(args) { this.tableName = args.tableName; } if (args.getDirectResults !== undefined && args.getDirectResults !== null) { - this.getDirectResults = new ttypes.TSparkGetDirectResults(args.getDirectResults); + this.getDirectResults = new TSparkGetDirectResults(args.getDirectResults); } if (args.runAsync !== undefined && args.runAsync !== null) { this.runAsync = args.runAsync; } if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new ttypes.THandleIdentifier(args.operationId); + this.operationId = new THandleIdentifier(args.operationId); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new TDBSqlSessionConf(args.sessionConf); } } }; @@ -8369,7 +8702,7 @@ TGetPrimaryKeysReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new ttypes.TSessionHandle(); + this.sessionHandle = new TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -8377,28 +8710,28 @@ TGetPrimaryKeysReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.catalogName = input.readString(); + this.catalogName = input.readString().value; } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.schemaName = input.readString(); + this.schemaName = input.readString().value; } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { - this.tableName = input.readString(); + this.tableName = input.readString().value; } else { input.skip(ftype); } break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.getDirectResults = new ttypes.TSparkGetDirectResults(); + this.getDirectResults = new TSparkGetDirectResults(); this.getDirectResults.read(input); } else { input.skip(ftype); @@ -8406,14 +8739,14 @@ TGetPrimaryKeysReq.prototype.read = function(input) { break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.runAsync = input.readBool(); + this.runAsync = input.readBool().value; } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new ttypes.THandleIdentifier(); + this.operationId = new THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -8421,7 +8754,7 @@ TGetPrimaryKeysReq.prototype.read = function(input) { break; case 3330: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new ttypes.TDBSqlSessionConf(); + this.sessionConf = new TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -8483,21 +8816,21 @@ TGetPrimaryKeysReq.prototype.write = function(output) { return; }; -var TGetPrimaryKeysResp = module.exports.TGetPrimaryKeysResp = function(args) { +TGetPrimaryKeysResp = function(args) { this.status = null; this.operationHandle = null; this.directResults = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); + this.operationHandle = new TOperationHandle(args.operationHandle); } if (args.directResults !== undefined && args.directResults !== null) { - this.directResults = new ttypes.TSparkDirectResults(args.directResults); + this.directResults = new TSparkDirectResults(args.directResults); } } }; @@ -8514,7 +8847,7 @@ TGetPrimaryKeysResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -8522,7 +8855,7 @@ TGetPrimaryKeysResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new ttypes.TOperationHandle(); + this.operationHandle = new TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -8530,7 +8863,7 @@ TGetPrimaryKeysResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.directResults = new ttypes.TSparkDirectResults(); + this.directResults = new TSparkDirectResults(); this.directResults.read(input); } else { input.skip(ftype); @@ -8567,7 +8900,7 @@ TGetPrimaryKeysResp.prototype.write = function(output) { return; }; -var TGetCrossReferenceReq = module.exports.TGetCrossReferenceReq = function(args) { +TGetCrossReferenceReq = function(args) { this.sessionHandle = null; this.parentCatalogName = null; this.parentSchemaName = null; @@ -8581,7 +8914,7 @@ var TGetCrossReferenceReq = module.exports.TGetCrossReferenceReq = function(args this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); + this.sessionHandle = new TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -8604,16 +8937,16 @@ var TGetCrossReferenceReq = module.exports.TGetCrossReferenceReq = function(args this.foreignTableName = args.foreignTableName; } if (args.getDirectResults !== undefined && args.getDirectResults !== null) { - this.getDirectResults = new ttypes.TSparkGetDirectResults(args.getDirectResults); + this.getDirectResults = new TSparkGetDirectResults(args.getDirectResults); } if (args.runAsync !== undefined && args.runAsync !== null) { this.runAsync = args.runAsync; } if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new ttypes.THandleIdentifier(args.operationId); + this.operationId = new THandleIdentifier(args.operationId); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new TDBSqlSessionConf(args.sessionConf); } } }; @@ -8630,7 +8963,7 @@ TGetCrossReferenceReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new ttypes.TSessionHandle(); + this.sessionHandle = new TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -8638,49 +8971,49 @@ TGetCrossReferenceReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.parentCatalogName = input.readString(); + this.parentCatalogName = input.readString().value; } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.parentSchemaName = input.readString(); + this.parentSchemaName = input.readString().value; } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { - this.parentTableName = input.readString(); + this.parentTableName = input.readString().value; } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { - this.foreignCatalogName = input.readString(); + this.foreignCatalogName = input.readString().value; } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRING) { - this.foreignSchemaName = input.readString(); + this.foreignSchemaName = input.readString().value; } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.STRING) { - this.foreignTableName = input.readString(); + this.foreignTableName = input.readString().value; } else { input.skip(ftype); } break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.getDirectResults = new ttypes.TSparkGetDirectResults(); + this.getDirectResults = new TSparkGetDirectResults(); this.getDirectResults.read(input); } else { input.skip(ftype); @@ -8688,14 +9021,14 @@ TGetCrossReferenceReq.prototype.read = function(input) { break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.runAsync = input.readBool(); + this.runAsync = input.readBool().value; } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new ttypes.THandleIdentifier(); + this.operationId = new THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -8703,7 +9036,7 @@ TGetCrossReferenceReq.prototype.read = function(input) { break; case 3330: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new ttypes.TDBSqlSessionConf(); + this.sessionConf = new TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -8780,21 +9113,21 @@ TGetCrossReferenceReq.prototype.write = function(output) { return; }; -var TGetCrossReferenceResp = module.exports.TGetCrossReferenceResp = function(args) { +TGetCrossReferenceResp = function(args) { this.status = null; this.operationHandle = null; this.directResults = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); + this.operationHandle = new TOperationHandle(args.operationHandle); } if (args.directResults !== undefined && args.directResults !== null) { - this.directResults = new ttypes.TSparkDirectResults(args.directResults); + this.directResults = new TSparkDirectResults(args.directResults); } } }; @@ -8811,7 +9144,7 @@ TGetCrossReferenceResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -8819,7 +9152,7 @@ TGetCrossReferenceResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new ttypes.TOperationHandle(); + this.operationHandle = new TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -8827,7 +9160,7 @@ TGetCrossReferenceResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.directResults = new ttypes.TSparkDirectResults(); + this.directResults = new TSparkDirectResults(); this.directResults.read(input); } else { input.skip(ftype); @@ -8864,12 +9197,12 @@ TGetCrossReferenceResp.prototype.write = function(output) { return; }; -var TGetOperationStatusReq = module.exports.TGetOperationStatusReq = function(args) { +TGetOperationStatusReq = function(args) { this.operationHandle = null; this.getProgressUpdate = null; if (args) { if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); + this.operationHandle = new TOperationHandle(args.operationHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field operationHandle is unset!'); } @@ -8891,7 +9224,7 @@ TGetOperationStatusReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new ttypes.TOperationHandle(); + this.operationHandle = new TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -8899,7 +9232,7 @@ TGetOperationStatusReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.BOOL) { - this.getProgressUpdate = input.readBool(); + this.getProgressUpdate = input.readBool().value; } else { input.skip(ftype); } @@ -8930,7 +9263,7 @@ TGetOperationStatusReq.prototype.write = function(output) { return; }; -var TGetOperationStatusResp = module.exports.TGetOperationStatusResp = function(args) { +TGetOperationStatusResp = function(args) { this.status = null; this.operationState = null; this.sqlState = null; @@ -8944,13 +9277,14 @@ var TGetOperationStatusResp = module.exports.TGetOperationStatusResp = function( this.numModifiedRows = null; this.displayMessage = null; this.diagnosticInfo = null; + this.errorDetailsJson = null; this.responseValidation = null; this.idempotencyType = null; this.statementTimeout = null; this.statementTimeoutLevel = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } @@ -8979,7 +9313,7 @@ var TGetOperationStatusResp = module.exports.TGetOperationStatusResp = function( this.hasResultSet = args.hasResultSet; } if (args.progressUpdateResponse !== undefined && args.progressUpdateResponse !== null) { - this.progressUpdateResponse = new ttypes.TProgressUpdateResp(args.progressUpdateResponse); + this.progressUpdateResponse = new TProgressUpdateResp(args.progressUpdateResponse); } if (args.numModifiedRows !== undefined && args.numModifiedRows !== null) { this.numModifiedRows = args.numModifiedRows; @@ -8990,6 +9324,9 @@ var TGetOperationStatusResp = module.exports.TGetOperationStatusResp = function( if (args.diagnosticInfo !== undefined && args.diagnosticInfo !== null) { this.diagnosticInfo = args.diagnosticInfo; } + if (args.errorDetailsJson !== undefined && args.errorDetailsJson !== null) { + this.errorDetailsJson = args.errorDetailsJson; + } if (args.responseValidation !== undefined && args.responseValidation !== null) { this.responseValidation = args.responseValidation; } @@ -9017,7 +9354,7 @@ TGetOperationStatusResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -9025,63 +9362,63 @@ TGetOperationStatusResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.I32) { - this.operationState = input.readI32(); + this.operationState = input.readI32().value; } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.sqlState = input.readString(); + this.sqlState = input.readString().value; } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { - this.errorCode = input.readI32(); + this.errorCode = input.readI32().value; } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { - this.errorMessage = input.readString(); + this.errorMessage = input.readString().value; } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRING) { - this.taskStatus = input.readString(); + this.taskStatus = input.readString().value; } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.I64) { - this.operationStarted = input.readI64(); + this.operationStarted = input.readI64().value; } else { input.skip(ftype); } break; case 8: if (ftype == Thrift.Type.I64) { - this.operationCompleted = input.readI64(); + this.operationCompleted = input.readI64().value; } else { input.skip(ftype); } break; case 9: if (ftype == Thrift.Type.BOOL) { - this.hasResultSet = input.readBool(); + this.hasResultSet = input.readBool().value; } else { input.skip(ftype); } break; case 10: if (ftype == Thrift.Type.STRUCT) { - this.progressUpdateResponse = new ttypes.TProgressUpdateResp(); + this.progressUpdateResponse = new TProgressUpdateResp(); this.progressUpdateResponse.read(input); } else { input.skip(ftype); @@ -9089,49 +9426,56 @@ TGetOperationStatusResp.prototype.read = function(input) { break; case 11: if (ftype == Thrift.Type.I64) { - this.numModifiedRows = input.readI64(); + this.numModifiedRows = input.readI64().value; } else { input.skip(ftype); } break; case 1281: if (ftype == Thrift.Type.STRING) { - this.displayMessage = input.readString(); + this.displayMessage = input.readString().value; } else { input.skip(ftype); } break; case 1282: if (ftype == Thrift.Type.STRING) { - this.diagnosticInfo = input.readString(); + this.diagnosticInfo = input.readString().value; + } else { + input.skip(ftype); + } + break; + case 1283: + if (ftype == Thrift.Type.STRING) { + this.errorDetailsJson = input.readString().value; } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRING) { - this.responseValidation = input.readBinary(); + this.responseValidation = input.readBinary().value; } else { input.skip(ftype); } break; case 3330: if (ftype == Thrift.Type.I32) { - this.idempotencyType = input.readI32(); + this.idempotencyType = input.readI32().value; } else { input.skip(ftype); } break; case 3331: if (ftype == Thrift.Type.I64) { - this.statementTimeout = input.readI64(); + this.statementTimeout = input.readI64().value; } else { input.skip(ftype); } break; case 3332: if (ftype == Thrift.Type.I32) { - this.statementTimeoutLevel = input.readI32(); + this.statementTimeoutLevel = input.readI32().value; } else { input.skip(ftype); } @@ -9212,6 +9556,11 @@ TGetOperationStatusResp.prototype.write = function(output) { output.writeString(this.diagnosticInfo); output.writeFieldEnd(); } + if (this.errorDetailsJson !== null && this.errorDetailsJson !== undefined) { + output.writeFieldBegin('errorDetailsJson', Thrift.Type.STRING, 1283); + output.writeString(this.errorDetailsJson); + output.writeFieldEnd(); + } if (this.responseValidation !== null && this.responseValidation !== undefined) { output.writeFieldBegin('responseValidation', Thrift.Type.STRING, 3329); output.writeBinary(this.responseValidation); @@ -9237,13 +9586,13 @@ TGetOperationStatusResp.prototype.write = function(output) { return; }; -var TCancelOperationReq = module.exports.TCancelOperationReq = function(args) { +TCancelOperationReq = function(args) { this.operationHandle = null; this.executionVersion = null; this.replacedByNextAttempt = null; if (args) { if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); + this.operationHandle = new TOperationHandle(args.operationHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field operationHandle is unset!'); } @@ -9268,7 +9617,7 @@ TCancelOperationReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new ttypes.TOperationHandle(); + this.operationHandle = new TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -9276,14 +9625,14 @@ TCancelOperationReq.prototype.read = function(input) { break; case 3329: if (ftype == Thrift.Type.I16) { - this.executionVersion = input.readI16(); + this.executionVersion = input.readI16().value; } else { input.skip(ftype); } break; case 3330: if (ftype == Thrift.Type.BOOL) { - this.replacedByNextAttempt = input.readBool(); + this.replacedByNextAttempt = input.readBool().value; } else { input.skip(ftype); } @@ -9319,11 +9668,11 @@ TCancelOperationReq.prototype.write = function(output) { return; }; -var TCancelOperationResp = module.exports.TCancelOperationResp = function(args) { +TCancelOperationResp = function(args) { this.status = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } @@ -9342,7 +9691,7 @@ TCancelOperationResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -9372,11 +9721,11 @@ TCancelOperationResp.prototype.write = function(output) { return; }; -var TCloseOperationReq = module.exports.TCloseOperationReq = function(args) { +TCloseOperationReq = function(args) { this.operationHandle = null; if (args) { if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); + this.operationHandle = new TOperationHandle(args.operationHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field operationHandle is unset!'); } @@ -9395,7 +9744,7 @@ TCloseOperationReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new ttypes.TOperationHandle(); + this.operationHandle = new TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -9425,11 +9774,11 @@ TCloseOperationReq.prototype.write = function(output) { return; }; -var TCloseOperationResp = module.exports.TCloseOperationResp = function(args) { +TCloseOperationResp = function(args) { this.status = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } @@ -9448,7 +9797,7 @@ TCloseOperationResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -9478,12 +9827,12 @@ TCloseOperationResp.prototype.write = function(output) { return; }; -var TGetResultSetMetadataReq = module.exports.TGetResultSetMetadataReq = function(args) { +TGetResultSetMetadataReq = function(args) { this.operationHandle = null; this.includeCloudResultFiles = null; if (args) { if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); + this.operationHandle = new TOperationHandle(args.operationHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field operationHandle is unset!'); } @@ -9505,7 +9854,7 @@ TGetResultSetMetadataReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new ttypes.TOperationHandle(); + this.operationHandle = new TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -9513,7 +9862,7 @@ TGetResultSetMetadataReq.prototype.read = function(input) { break; case 3329: if (ftype == Thrift.Type.BOOL) { - this.includeCloudResultFiles = input.readBool(); + this.includeCloudResultFiles = input.readBool().value; } else { input.skip(ftype); } @@ -9544,7 +9893,7 @@ TGetResultSetMetadataReq.prototype.write = function(output) { return; }; -var TGetResultSetMetadataResp = module.exports.TGetResultSetMetadataResp = function(args) { +TGetResultSetMetadataResp = function(args) { this.status = null; this.schema = null; this.resultFormat = null; @@ -9565,14 +9914,15 @@ var TGetResultSetMetadataResp = module.exports.TGetResultSetMetadataResp = funct this.isServerless = null; this.resultDataFormat = null; this.truncatedByThriftLimit = null; + this.resultByteLimit = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.schema !== undefined && args.schema !== null) { - this.schema = new ttypes.TTableSchema(args.schema); + this.schema = new TTableSchema(args.schema); } if (args.resultFormat !== undefined && args.resultFormat !== null) { this.resultFormat = args.resultFormat; @@ -9599,7 +9949,7 @@ var TGetResultSetMetadataResp = module.exports.TGetResultSetMetadataResp = funct this.reasonForNoCloudFetch = args.reasonForNoCloudFetch; } if (args.resultFiles !== undefined && args.resultFiles !== null) { - this.resultFiles = Thrift.copyList(args.resultFiles, [ttypes.TDBSqlCloudResultFile]); + this.resultFiles = Thrift.copyList(args.resultFiles, [TDBSqlCloudResultFile]); } if (args.manifestFile !== undefined && args.manifestFile !== null) { this.manifestFile = args.manifestFile; @@ -9623,11 +9973,14 @@ var TGetResultSetMetadataResp = module.exports.TGetResultSetMetadataResp = funct this.isServerless = args.isServerless; } if (args.resultDataFormat !== undefined && args.resultDataFormat !== null) { - this.resultDataFormat = new ttypes.TDBSqlResultFormat(args.resultDataFormat); + this.resultDataFormat = new TDBSqlResultFormat(args.resultDataFormat); } if (args.truncatedByThriftLimit !== undefined && args.truncatedByThriftLimit !== null) { this.truncatedByThriftLimit = args.truncatedByThriftLimit; } + if (args.resultByteLimit !== undefined && args.resultByteLimit !== null) { + this.resultByteLimit = args.resultByteLimit; + } } }; TGetResultSetMetadataResp.prototype = {}; @@ -9643,7 +9996,7 @@ TGetResultSetMetadataResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -9651,7 +10004,7 @@ TGetResultSetMetadataResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.schema = new ttypes.TTableSchema(); + this.schema = new TTableSchema(); this.schema.read(input); } else { input.skip(ftype); @@ -9659,56 +10012,56 @@ TGetResultSetMetadataResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.I32) { - this.resultFormat = input.readI32(); + this.resultFormat = input.readI32().value; } else { input.skip(ftype); } break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.lz4Compressed = input.readBool(); + this.lz4Compressed = input.readBool().value; } else { input.skip(ftype); } break; case 1283: if (ftype == Thrift.Type.STRING) { - this.arrowSchema = input.readBinary(); + this.arrowSchema = input.readBinary().value; } else { input.skip(ftype); } break; case 1284: if (ftype == Thrift.Type.I32) { - this.cacheLookupResult = input.readI32(); + this.cacheLookupResult = input.readI32().value; } else { input.skip(ftype); } break; case 1285: if (ftype == Thrift.Type.I64) { - this.uncompressedBytes = input.readI64(); + this.uncompressedBytes = input.readI64().value; } else { input.skip(ftype); } break; case 1286: if (ftype == Thrift.Type.I64) { - this.compressedBytes = input.readI64(); + this.compressedBytes = input.readI64().value; } else { input.skip(ftype); } break; case 1287: if (ftype == Thrift.Type.BOOL) { - this.isStagingOperation = input.readBool(); + this.isStagingOperation = input.readBool().value; } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.I32) { - this.reasonForNoCloudFetch = input.readI32(); + this.reasonForNoCloudFetch = input.readI32().value; } else { input.skip(ftype); } @@ -9716,13 +10069,13 @@ TGetResultSetMetadataResp.prototype.read = function(input) { case 3330: if (ftype == Thrift.Type.LIST) { this.resultFiles = []; - var _rtmp3196 = input.readListBegin(); - var _size195 = _rtmp3196.size || 0; - for (var _i197 = 0; _i197 < _size195; ++_i197) { - var elem198 = null; - elem198 = new ttypes.TDBSqlCloudResultFile(); - elem198.read(input); - this.resultFiles.push(elem198); + var _rtmp3210 = input.readListBegin(); + var _size209 = _rtmp3210.size || 0; + for (var _i211 = 0; _i211 < _size209; ++_i211) { + var elem212 = null; + elem212 = new TDBSqlCloudResultFile(); + elem212.read(input); + this.resultFiles.push(elem212); } input.readListEnd(); } else { @@ -9731,56 +10084,56 @@ TGetResultSetMetadataResp.prototype.read = function(input) { break; case 3331: if (ftype == Thrift.Type.STRING) { - this.manifestFile = input.readString(); + this.manifestFile = input.readString().value; } else { input.skip(ftype); } break; case 3332: if (ftype == Thrift.Type.I32) { - this.manifestFileFormat = input.readI32(); + this.manifestFileFormat = input.readI32().value; } else { input.skip(ftype); } break; case 3333: if (ftype == Thrift.Type.I64) { - this.cacheLookupLatency = input.readI64(); + this.cacheLookupLatency = input.readI64().value; } else { input.skip(ftype); } break; case 3334: if (ftype == Thrift.Type.STRING) { - this.remoteCacheMissReason = input.readString(); + this.remoteCacheMissReason = input.readString().value; } else { input.skip(ftype); } break; case 3335: if (ftype == Thrift.Type.I32) { - this.fetchDisposition = input.readI32(); + this.fetchDisposition = input.readI32().value; } else { input.skip(ftype); } break; case 3336: if (ftype == Thrift.Type.BOOL) { - this.remoteResultCacheEnabled = input.readBool(); + this.remoteResultCacheEnabled = input.readBool().value; } else { input.skip(ftype); } break; case 3337: if (ftype == Thrift.Type.BOOL) { - this.isServerless = input.readBool(); + this.isServerless = input.readBool().value; } else { input.skip(ftype); } break; case 3344: if (ftype == Thrift.Type.STRUCT) { - this.resultDataFormat = new ttypes.TDBSqlResultFormat(); + this.resultDataFormat = new TDBSqlResultFormat(); this.resultDataFormat.read(input); } else { input.skip(ftype); @@ -9788,7 +10141,14 @@ TGetResultSetMetadataResp.prototype.read = function(input) { break; case 3345: if (ftype == Thrift.Type.BOOL) { - this.truncatedByThriftLimit = input.readBool(); + this.truncatedByThriftLimit = input.readBool().value; + } else { + input.skip(ftype); + } + break; + case 3346: + if (ftype == Thrift.Type.I64) { + this.resultByteLimit = input.readI64().value; } else { input.skip(ftype); } @@ -9857,10 +10217,10 @@ TGetResultSetMetadataResp.prototype.write = function(output) { if (this.resultFiles !== null && this.resultFiles !== undefined) { output.writeFieldBegin('resultFiles', Thrift.Type.LIST, 3330); output.writeListBegin(Thrift.Type.STRUCT, this.resultFiles.length); - for (var iter199 in this.resultFiles) { - if (this.resultFiles.hasOwnProperty(iter199)) { - iter199 = this.resultFiles[iter199]; - iter199.write(output); + for (var iter213 in this.resultFiles) { + if (this.resultFiles.hasOwnProperty(iter213)) { + iter213 = this.resultFiles[iter213]; + iter213.write(output); } } output.writeListEnd(); @@ -9911,12 +10271,17 @@ TGetResultSetMetadataResp.prototype.write = function(output) { output.writeBool(this.truncatedByThriftLimit); output.writeFieldEnd(); } + if (this.resultByteLimit !== null && this.resultByteLimit !== undefined) { + output.writeFieldBegin('resultByteLimit', Thrift.Type.I64, 3346); + output.writeI64(this.resultByteLimit); + output.writeFieldEnd(); + } output.writeFieldStop(); output.writeStructEnd(); return; }; -var TFetchResultsReq = module.exports.TFetchResultsReq = function(args) { +TFetchResultsReq = function(args) { this.operationHandle = null; this.orientation = 0; this.maxRows = null; @@ -9926,7 +10291,7 @@ var TFetchResultsReq = module.exports.TFetchResultsReq = function(args) { this.includeResultSetMetadata = null; if (args) { if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); + this.operationHandle = new TOperationHandle(args.operationHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field operationHandle is unset!'); } @@ -9967,7 +10332,7 @@ TFetchResultsReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new ttypes.TOperationHandle(); + this.operationHandle = new TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -9975,42 +10340,42 @@ TFetchResultsReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.I32) { - this.orientation = input.readI32(); + this.orientation = input.readI32().value; } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I64) { - this.maxRows = input.readI64(); + this.maxRows = input.readI64().value; } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I16) { - this.fetchType = input.readI16(); + this.fetchType = input.readI16().value; } else { input.skip(ftype); } break; case 1281: if (ftype == Thrift.Type.I64) { - this.maxBytes = input.readI64(); + this.maxBytes = input.readI64().value; } else { input.skip(ftype); } break; case 1282: if (ftype == Thrift.Type.I64) { - this.startRowOffset = input.readI64(); + this.startRowOffset = input.readI64().value; } else { input.skip(ftype); } break; case 1283: if (ftype == Thrift.Type.BOOL) { - this.includeResultSetMetadata = input.readBool(); + this.includeResultSetMetadata = input.readBool().value; } else { input.skip(ftype); } @@ -10066,7 +10431,7 @@ TFetchResultsReq.prototype.write = function(output) { return; }; -var TFetchResultsResp = module.exports.TFetchResultsResp = function(args) { +TFetchResultsResp = function(args) { this.status = null; this.hasMoreRows = null; this.results = null; @@ -10074,7 +10439,7 @@ var TFetchResultsResp = module.exports.TFetchResultsResp = function(args) { this.responseValidation = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } @@ -10082,10 +10447,10 @@ var TFetchResultsResp = module.exports.TFetchResultsResp = function(args) { this.hasMoreRows = args.hasMoreRows; } if (args.results !== undefined && args.results !== null) { - this.results = new ttypes.TRowSet(args.results); + this.results = new TRowSet(args.results); } if (args.resultSetMetadata !== undefined && args.resultSetMetadata !== null) { - this.resultSetMetadata = new ttypes.TGetResultSetMetadataResp(args.resultSetMetadata); + this.resultSetMetadata = new TGetResultSetMetadataResp(args.resultSetMetadata); } if (args.responseValidation !== undefined && args.responseValidation !== null) { this.responseValidation = args.responseValidation; @@ -10105,7 +10470,7 @@ TFetchResultsResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -10113,14 +10478,14 @@ TFetchResultsResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.BOOL) { - this.hasMoreRows = input.readBool(); + this.hasMoreRows = input.readBool().value; } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRUCT) { - this.results = new ttypes.TRowSet(); + this.results = new TRowSet(); this.results.read(input); } else { input.skip(ftype); @@ -10128,7 +10493,7 @@ TFetchResultsResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.resultSetMetadata = new ttypes.TGetResultSetMetadataResp(); + this.resultSetMetadata = new TGetResultSetMetadataResp(); this.resultSetMetadata.read(input); } else { input.skip(ftype); @@ -10136,7 +10501,7 @@ TFetchResultsResp.prototype.read = function(input) { break; case 3329: if (ftype == Thrift.Type.STRING) { - this.responseValidation = input.readBinary(); + this.responseValidation = input.readBinary().value; } else { input.skip(ftype); } @@ -10182,14 +10547,14 @@ TFetchResultsResp.prototype.write = function(output) { return; }; -var TGetDelegationTokenReq = module.exports.TGetDelegationTokenReq = function(args) { +TGetDelegationTokenReq = function(args) { this.sessionHandle = null; this.owner = null; this.renewer = null; this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); + this.sessionHandle = new TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -10204,7 +10569,7 @@ var TGetDelegationTokenReq = module.exports.TGetDelegationTokenReq = function(ar throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field renewer is unset!'); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new TDBSqlSessionConf(args.sessionConf); } } }; @@ -10221,7 +10586,7 @@ TGetDelegationTokenReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new ttypes.TSessionHandle(); + this.sessionHandle = new TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -10229,21 +10594,21 @@ TGetDelegationTokenReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.owner = input.readString(); + this.owner = input.readString().value; } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.renewer = input.readString(); + this.renewer = input.readString().value; } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new ttypes.TDBSqlSessionConf(); + this.sessionConf = new TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -10285,12 +10650,12 @@ TGetDelegationTokenReq.prototype.write = function(output) { return; }; -var TGetDelegationTokenResp = module.exports.TGetDelegationTokenResp = function(args) { +TGetDelegationTokenResp = function(args) { this.status = null; this.delegationToken = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } @@ -10312,7 +10677,7 @@ TGetDelegationTokenResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -10320,7 +10685,7 @@ TGetDelegationTokenResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.delegationToken = input.readString(); + this.delegationToken = input.readString().value; } else { input.skip(ftype); } @@ -10351,13 +10716,13 @@ TGetDelegationTokenResp.prototype.write = function(output) { return; }; -var TCancelDelegationTokenReq = module.exports.TCancelDelegationTokenReq = function(args) { +TCancelDelegationTokenReq = function(args) { this.sessionHandle = null; this.delegationToken = null; this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); + this.sessionHandle = new TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -10367,7 +10732,7 @@ var TCancelDelegationTokenReq = module.exports.TCancelDelegationTokenReq = funct throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field delegationToken is unset!'); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new TDBSqlSessionConf(args.sessionConf); } } }; @@ -10384,7 +10749,7 @@ TCancelDelegationTokenReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new ttypes.TSessionHandle(); + this.sessionHandle = new TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -10392,14 +10757,14 @@ TCancelDelegationTokenReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.delegationToken = input.readString(); + this.delegationToken = input.readString().value; } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new ttypes.TDBSqlSessionConf(); + this.sessionConf = new TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -10436,11 +10801,11 @@ TCancelDelegationTokenReq.prototype.write = function(output) { return; }; -var TCancelDelegationTokenResp = module.exports.TCancelDelegationTokenResp = function(args) { +TCancelDelegationTokenResp = function(args) { this.status = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } @@ -10459,7 +10824,7 @@ TCancelDelegationTokenResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -10489,13 +10854,13 @@ TCancelDelegationTokenResp.prototype.write = function(output) { return; }; -var TRenewDelegationTokenReq = module.exports.TRenewDelegationTokenReq = function(args) { +TRenewDelegationTokenReq = function(args) { this.sessionHandle = null; this.delegationToken = null; this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); + this.sessionHandle = new TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -10505,7 +10870,7 @@ var TRenewDelegationTokenReq = module.exports.TRenewDelegationTokenReq = functio throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field delegationToken is unset!'); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new TDBSqlSessionConf(args.sessionConf); } } }; @@ -10522,7 +10887,7 @@ TRenewDelegationTokenReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new ttypes.TSessionHandle(); + this.sessionHandle = new TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -10530,14 +10895,14 @@ TRenewDelegationTokenReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.delegationToken = input.readString(); + this.delegationToken = input.readString().value; } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new ttypes.TDBSqlSessionConf(); + this.sessionConf = new TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -10574,11 +10939,11 @@ TRenewDelegationTokenReq.prototype.write = function(output) { return; }; -var TRenewDelegationTokenResp = module.exports.TRenewDelegationTokenResp = function(args) { +TRenewDelegationTokenResp = function(args) { this.status = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.TStatus(args.status); + this.status = new TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } @@ -10597,7 +10962,7 @@ TRenewDelegationTokenResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.TStatus(); + this.status = new TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -10627,7 +10992,7 @@ TRenewDelegationTokenResp.prototype.write = function(output) { return; }; -var TProgressUpdateResp = module.exports.TProgressUpdateResp = function(args) { +TProgressUpdateResp = function(args) { this.headerNames = null; this.rows = null; this.progressedPercentage = null; @@ -10681,12 +11046,12 @@ TProgressUpdateResp.prototype.read = function(input) { case 1: if (ftype == Thrift.Type.LIST) { this.headerNames = []; - var _rtmp3201 = input.readListBegin(); - var _size200 = _rtmp3201.size || 0; - for (var _i202 = 0; _i202 < _size200; ++_i202) { - var elem203 = null; - elem203 = input.readString(); - this.headerNames.push(elem203); + var _rtmp3215 = input.readListBegin(); + var _size214 = _rtmp3215.size || 0; + for (var _i216 = 0; _i216 < _size214; ++_i216) { + var elem217 = null; + elem217 = input.readString().value; + this.headerNames.push(elem217); } input.readListEnd(); } else { @@ -10696,20 +11061,20 @@ TProgressUpdateResp.prototype.read = function(input) { case 2: if (ftype == Thrift.Type.LIST) { this.rows = []; - var _rtmp3205 = input.readListBegin(); - var _size204 = _rtmp3205.size || 0; - for (var _i206 = 0; _i206 < _size204; ++_i206) { - var elem207 = null; - elem207 = []; - var _rtmp3209 = input.readListBegin(); - var _size208 = _rtmp3209.size || 0; - for (var _i210 = 0; _i210 < _size208; ++_i210) { - var elem211 = null; - elem211 = input.readString(); - elem207.push(elem211); + var _rtmp3219 = input.readListBegin(); + var _size218 = _rtmp3219.size || 0; + for (var _i220 = 0; _i220 < _size218; ++_i220) { + var elem221 = null; + elem221 = []; + var _rtmp3223 = input.readListBegin(); + var _size222 = _rtmp3223.size || 0; + for (var _i224 = 0; _i224 < _size222; ++_i224) { + var elem225 = null; + elem225 = input.readString().value; + elem221.push(elem225); } input.readListEnd(); - this.rows.push(elem207); + this.rows.push(elem221); } input.readListEnd(); } else { @@ -10718,28 +11083,28 @@ TProgressUpdateResp.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.DOUBLE) { - this.progressedPercentage = input.readDouble(); + this.progressedPercentage = input.readDouble().value; } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { - this.status = input.readI32(); + this.status = input.readI32().value; } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { - this.footerSummary = input.readString(); + this.footerSummary = input.readString().value; } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.I64) { - this.startTime = input.readI64(); + this.startTime = input.readI64().value; } else { input.skip(ftype); } @@ -10758,10 +11123,10 @@ TProgressUpdateResp.prototype.write = function(output) { if (this.headerNames !== null && this.headerNames !== undefined) { output.writeFieldBegin('headerNames', Thrift.Type.LIST, 1); output.writeListBegin(Thrift.Type.STRING, this.headerNames.length); - for (var iter212 in this.headerNames) { - if (this.headerNames.hasOwnProperty(iter212)) { - iter212 = this.headerNames[iter212]; - output.writeString(iter212); + for (var iter226 in this.headerNames) { + if (this.headerNames.hasOwnProperty(iter226)) { + iter226 = this.headerNames[iter226]; + output.writeString(iter226); } } output.writeListEnd(); @@ -10770,14 +11135,14 @@ TProgressUpdateResp.prototype.write = function(output) { if (this.rows !== null && this.rows !== undefined) { output.writeFieldBegin('rows', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.LIST, this.rows.length); - for (var iter213 in this.rows) { - if (this.rows.hasOwnProperty(iter213)) { - iter213 = this.rows[iter213]; - output.writeListBegin(Thrift.Type.STRING, iter213.length); - for (var iter214 in iter213) { - if (iter213.hasOwnProperty(iter214)) { - iter214 = iter213[iter214]; - output.writeString(iter214); + for (var iter227 in this.rows) { + if (this.rows.hasOwnProperty(iter227)) { + iter227 = this.rows[iter227]; + output.writeListBegin(Thrift.Type.STRING, iter227.length); + for (var iter228 in iter227) { + if (iter227.hasOwnProperty(iter228)) { + iter228 = iter227[iter228]; + output.writeString(iter228); } } output.writeListEnd(); @@ -10811,10 +11176,10 @@ TProgressUpdateResp.prototype.write = function(output) { return; }; -ttypes.PRIMITIVE_TYPES = [0,1,2,3,4,5,6,7,8,9,15,16,17,18,19,20,21]; -ttypes.COMPLEX_TYPES = [10,11,12,13,14]; -ttypes.COLLECTION_TYPES = [10,11]; -ttypes.TYPE_NAMES = { +PRIMITIVE_TYPES = [0,1,2,3,4,5,6,7,8,9,15,16,17,18,19,20,21]; +COMPLEX_TYPES = [10,11,12,13,14]; +COLLECTION_TYPES = [10,11]; +TYPE_NAMES = { 10 : 'ARRAY', 4 : 'BIGINT', 9 : 'BINARY', @@ -10837,6 +11202,6 @@ ttypes.TYPE_NAMES = { 13 : 'UNIONTYPE', 18 : 'VARCHAR' }; -ttypes.CHARACTER_MAXIMUM_LENGTH = 'characterMaximumLength'; -ttypes.PRECISION = 'precision'; -ttypes.SCALE = 'scale'; +CHARACTER_MAXIMUM_LENGTH = 'characterMaximumLength'; +PRECISION = 'precision'; +SCALE = 'scale'; From 123bc28b9c309127080fb21c7e532040bb1d4f9a Mon Sep 17 00:00:00 2001 From: nithinkdb Date: Thu, 17 Aug 2023 08:22:25 -0700 Subject: [PATCH 2/2] Reran command with diff params --- thrift/TCLIService.d.ts | 214 ++- thrift/TCLIService.js | 2474 ++++++++++++++++++++++----------- thrift/TCLIService_types.d.ts | 1075 +++++++------- thrift/TCLIService_types.js | 1484 ++++++++++---------- 4 files changed, 3085 insertions(+), 2162 deletions(-) diff --git a/thrift/TCLIService.d.ts b/thrift/TCLIService.d.ts index fdffa2d0..061904fd 100644 --- a/thrift/TCLIService.d.ts +++ b/thrift/TCLIService.d.ts @@ -4,99 +4,253 @@ // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING // +import thrift = require('thrift'); +import Thrift = thrift.Thrift; +import Q = thrift.Q; import Int64 = require('node-int64'); -import { TCLIService } from "./TCLIService_types"; - - -export declare class TCLIServiceClient { - input: Thrift.TJSONProtocol; - output: Thrift.TJSONProtocol; - seqid: number; - - constructor(input: Thrift.TJSONProtocol, output?: Thrift.TJSONProtocol); +import ttypes = require('./TCLIService_types'); +import TProtocolVersion = ttypes.TProtocolVersion +import TTypeId = ttypes.TTypeId +import TSparkRowSetType = ttypes.TSparkRowSetType +import TDBSqlCompressionCodec = ttypes.TDBSqlCompressionCodec +import TDBSqlArrowLayout = ttypes.TDBSqlArrowLayout +import TOperationIdempotencyType = ttypes.TOperationIdempotencyType +import TOperationTimeoutLevel = ttypes.TOperationTimeoutLevel +import TStatusCode = ttypes.TStatusCode +import TOperationState = ttypes.TOperationState +import TOperationType = ttypes.TOperationType +import TGetInfoType = ttypes.TGetInfoType +import TResultPersistenceMode = ttypes.TResultPersistenceMode +import TCacheLookupResult = ttypes.TCacheLookupResult +import TCloudFetchDisabledReason = ttypes.TCloudFetchDisabledReason +import TDBSqlManifestFileFormat = ttypes.TDBSqlManifestFileFormat +import TFetchOrientation = ttypes.TFetchOrientation +import TDBSqlFetchDisposition = ttypes.TDBSqlFetchDisposition +import TJobExecutionStatus = ttypes.TJobExecutionStatus +import PRIMITIVE_TYPES = ttypes.PRIMITIVE_TYPES +import COMPLEX_TYPES = ttypes.COMPLEX_TYPES +import COLLECTION_TYPES = ttypes.COLLECTION_TYPES +import TYPE_NAMES = ttypes.TYPE_NAMES +import CHARACTER_MAXIMUM_LENGTH = ttypes.CHARACTER_MAXIMUM_LENGTH +import PRECISION = ttypes.PRECISION +import SCALE = ttypes.SCALE +import TTypeQualifierValue = ttypes.TTypeQualifierValue +import TTypeQualifiers = ttypes.TTypeQualifiers +import TPrimitiveTypeEntry = ttypes.TPrimitiveTypeEntry +import TArrayTypeEntry = ttypes.TArrayTypeEntry +import TMapTypeEntry = ttypes.TMapTypeEntry +import TStructTypeEntry = ttypes.TStructTypeEntry +import TUnionTypeEntry = ttypes.TUnionTypeEntry +import TUserDefinedTypeEntry = ttypes.TUserDefinedTypeEntry +import TTypeEntry = ttypes.TTypeEntry +import TTypeDesc = ttypes.TTypeDesc +import TColumnDesc = ttypes.TColumnDesc +import TTableSchema = ttypes.TTableSchema +import TBoolValue = ttypes.TBoolValue +import TByteValue = ttypes.TByteValue +import TI16Value = ttypes.TI16Value +import TI32Value = ttypes.TI32Value +import TI64Value = ttypes.TI64Value +import TDoubleValue = ttypes.TDoubleValue +import TStringValue = ttypes.TStringValue +import TColumnValue = ttypes.TColumnValue +import TRow = ttypes.TRow +import TBoolColumn = ttypes.TBoolColumn +import TByteColumn = ttypes.TByteColumn +import TI16Column = ttypes.TI16Column +import TI32Column = ttypes.TI32Column +import TI64Column = ttypes.TI64Column +import TDoubleColumn = ttypes.TDoubleColumn +import TStringColumn = ttypes.TStringColumn +import TBinaryColumn = ttypes.TBinaryColumn +import TColumn = ttypes.TColumn +import TDBSqlJsonArrayFormat = ttypes.TDBSqlJsonArrayFormat +import TDBSqlCsvFormat = ttypes.TDBSqlCsvFormat +import TDBSqlArrowFormat = ttypes.TDBSqlArrowFormat +import TDBSqlResultFormat = ttypes.TDBSqlResultFormat +import TSparkArrowBatch = ttypes.TSparkArrowBatch +import TSparkArrowResultLink = ttypes.TSparkArrowResultLink +import TDBSqlCloudResultFile = ttypes.TDBSqlCloudResultFile +import TRowSet = ttypes.TRowSet +import TDBSqlTempView = ttypes.TDBSqlTempView +import TDBSqlSessionCapabilities = ttypes.TDBSqlSessionCapabilities +import TExpressionInfo = ttypes.TExpressionInfo +import TDBSqlConfValue = ttypes.TDBSqlConfValue +import TDBSqlSessionConf = ttypes.TDBSqlSessionConf +import TStatus = ttypes.TStatus +import TNamespace = ttypes.TNamespace +import THandleIdentifier = ttypes.THandleIdentifier +import TSessionHandle = ttypes.TSessionHandle +import TOperationHandle = ttypes.TOperationHandle +import TOpenSessionReq = ttypes.TOpenSessionReq +import TOpenSessionResp = ttypes.TOpenSessionResp +import TCloseSessionReq = ttypes.TCloseSessionReq +import TCloseSessionResp = ttypes.TCloseSessionResp +import TGetInfoValue = ttypes.TGetInfoValue +import TGetInfoReq = ttypes.TGetInfoReq +import TGetInfoResp = ttypes.TGetInfoResp +import TSparkGetDirectResults = ttypes.TSparkGetDirectResults +import TSparkDirectResults = ttypes.TSparkDirectResults +import TSparkArrowTypes = ttypes.TSparkArrowTypes +import TExecuteStatementReq = ttypes.TExecuteStatementReq +import TDBSqlStatement = ttypes.TDBSqlStatement +import TSparkParameterValue = ttypes.TSparkParameterValue +import TSparkParameter = ttypes.TSparkParameter +import TStatementConf = ttypes.TStatementConf +import TExecuteStatementResp = ttypes.TExecuteStatementResp +import TGetTypeInfoReq = ttypes.TGetTypeInfoReq +import TGetTypeInfoResp = ttypes.TGetTypeInfoResp +import TGetCatalogsReq = ttypes.TGetCatalogsReq +import TGetCatalogsResp = ttypes.TGetCatalogsResp +import TGetSchemasReq = ttypes.TGetSchemasReq +import TGetSchemasResp = ttypes.TGetSchemasResp +import TGetTablesReq = ttypes.TGetTablesReq +import TGetTablesResp = ttypes.TGetTablesResp +import TGetTableTypesReq = ttypes.TGetTableTypesReq +import TGetTableTypesResp = ttypes.TGetTableTypesResp +import TGetColumnsReq = ttypes.TGetColumnsReq +import TGetColumnsResp = ttypes.TGetColumnsResp +import TGetFunctionsReq = ttypes.TGetFunctionsReq +import TGetFunctionsResp = ttypes.TGetFunctionsResp +import TGetPrimaryKeysReq = ttypes.TGetPrimaryKeysReq +import TGetPrimaryKeysResp = ttypes.TGetPrimaryKeysResp +import TGetCrossReferenceReq = ttypes.TGetCrossReferenceReq +import TGetCrossReferenceResp = ttypes.TGetCrossReferenceResp +import TGetOperationStatusReq = ttypes.TGetOperationStatusReq +import TGetOperationStatusResp = ttypes.TGetOperationStatusResp +import TCancelOperationReq = ttypes.TCancelOperationReq +import TCancelOperationResp = ttypes.TCancelOperationResp +import TCloseOperationReq = ttypes.TCloseOperationReq +import TCloseOperationResp = ttypes.TCloseOperationResp +import TGetResultSetMetadataReq = ttypes.TGetResultSetMetadataReq +import TGetResultSetMetadataResp = ttypes.TGetResultSetMetadataResp +import TFetchResultsReq = ttypes.TFetchResultsReq +import TFetchResultsResp = ttypes.TFetchResultsResp +import TGetDelegationTokenReq = ttypes.TGetDelegationTokenReq +import TGetDelegationTokenResp = ttypes.TGetDelegationTokenResp +import TCancelDelegationTokenReq = ttypes.TCancelDelegationTokenReq +import TCancelDelegationTokenResp = ttypes.TCancelDelegationTokenResp +import TRenewDelegationTokenReq = ttypes.TRenewDelegationTokenReq +import TRenewDelegationTokenResp = ttypes.TRenewDelegationTokenResp +import TProgressUpdateResp = ttypes.TProgressUpdateResp + +declare class Client { + private output: thrift.TTransport; + private pClass: thrift.TProtocol; + private _seqid: number; + + constructor(output: thrift.TTransport, pClass: { new(trans: thrift.TTransport): thrift.TProtocol }); OpenSession(req: TOpenSessionReq): TOpenSessionResp; - OpenSession(req: TOpenSessionReq, callback?: (data: TOpenSessionResp)=>void): void; + OpenSession(req: TOpenSessionReq, callback?: (error: void, response: TOpenSessionResp)=>void): void; CloseSession(req: TCloseSessionReq): TCloseSessionResp; - CloseSession(req: TCloseSessionReq, callback?: (data: TCloseSessionResp)=>void): void; + CloseSession(req: TCloseSessionReq, callback?: (error: void, response: TCloseSessionResp)=>void): void; GetInfo(req: TGetInfoReq): TGetInfoResp; - GetInfo(req: TGetInfoReq, callback?: (data: TGetInfoResp)=>void): void; + GetInfo(req: TGetInfoReq, callback?: (error: void, response: TGetInfoResp)=>void): void; ExecuteStatement(req: TExecuteStatementReq): TExecuteStatementResp; - ExecuteStatement(req: TExecuteStatementReq, callback?: (data: TExecuteStatementResp)=>void): void; + ExecuteStatement(req: TExecuteStatementReq, callback?: (error: void, response: TExecuteStatementResp)=>void): void; GetTypeInfo(req: TGetTypeInfoReq): TGetTypeInfoResp; - GetTypeInfo(req: TGetTypeInfoReq, callback?: (data: TGetTypeInfoResp)=>void): void; + GetTypeInfo(req: TGetTypeInfoReq, callback?: (error: void, response: TGetTypeInfoResp)=>void): void; GetCatalogs(req: TGetCatalogsReq): TGetCatalogsResp; - GetCatalogs(req: TGetCatalogsReq, callback?: (data: TGetCatalogsResp)=>void): void; + GetCatalogs(req: TGetCatalogsReq, callback?: (error: void, response: TGetCatalogsResp)=>void): void; GetSchemas(req: TGetSchemasReq): TGetSchemasResp; - GetSchemas(req: TGetSchemasReq, callback?: (data: TGetSchemasResp)=>void): void; + GetSchemas(req: TGetSchemasReq, callback?: (error: void, response: TGetSchemasResp)=>void): void; GetTables(req: TGetTablesReq): TGetTablesResp; - GetTables(req: TGetTablesReq, callback?: (data: TGetTablesResp)=>void): void; + GetTables(req: TGetTablesReq, callback?: (error: void, response: TGetTablesResp)=>void): void; GetTableTypes(req: TGetTableTypesReq): TGetTableTypesResp; - GetTableTypes(req: TGetTableTypesReq, callback?: (data: TGetTableTypesResp)=>void): void; + GetTableTypes(req: TGetTableTypesReq, callback?: (error: void, response: TGetTableTypesResp)=>void): void; GetColumns(req: TGetColumnsReq): TGetColumnsResp; - GetColumns(req: TGetColumnsReq, callback?: (data: TGetColumnsResp)=>void): void; + GetColumns(req: TGetColumnsReq, callback?: (error: void, response: TGetColumnsResp)=>void): void; GetFunctions(req: TGetFunctionsReq): TGetFunctionsResp; - GetFunctions(req: TGetFunctionsReq, callback?: (data: TGetFunctionsResp)=>void): void; + GetFunctions(req: TGetFunctionsReq, callback?: (error: void, response: TGetFunctionsResp)=>void): void; GetPrimaryKeys(req: TGetPrimaryKeysReq): TGetPrimaryKeysResp; - GetPrimaryKeys(req: TGetPrimaryKeysReq, callback?: (data: TGetPrimaryKeysResp)=>void): void; + GetPrimaryKeys(req: TGetPrimaryKeysReq, callback?: (error: void, response: TGetPrimaryKeysResp)=>void): void; GetCrossReference(req: TGetCrossReferenceReq): TGetCrossReferenceResp; - GetCrossReference(req: TGetCrossReferenceReq, callback?: (data: TGetCrossReferenceResp)=>void): void; + GetCrossReference(req: TGetCrossReferenceReq, callback?: (error: void, response: TGetCrossReferenceResp)=>void): void; GetOperationStatus(req: TGetOperationStatusReq): TGetOperationStatusResp; - GetOperationStatus(req: TGetOperationStatusReq, callback?: (data: TGetOperationStatusResp)=>void): void; + GetOperationStatus(req: TGetOperationStatusReq, callback?: (error: void, response: TGetOperationStatusResp)=>void): void; CancelOperation(req: TCancelOperationReq): TCancelOperationResp; - CancelOperation(req: TCancelOperationReq, callback?: (data: TCancelOperationResp)=>void): void; + CancelOperation(req: TCancelOperationReq, callback?: (error: void, response: TCancelOperationResp)=>void): void; CloseOperation(req: TCloseOperationReq): TCloseOperationResp; - CloseOperation(req: TCloseOperationReq, callback?: (data: TCloseOperationResp)=>void): void; + CloseOperation(req: TCloseOperationReq, callback?: (error: void, response: TCloseOperationResp)=>void): void; GetResultSetMetadata(req: TGetResultSetMetadataReq): TGetResultSetMetadataResp; - GetResultSetMetadata(req: TGetResultSetMetadataReq, callback?: (data: TGetResultSetMetadataResp)=>void): void; + GetResultSetMetadata(req: TGetResultSetMetadataReq, callback?: (error: void, response: TGetResultSetMetadataResp)=>void): void; FetchResults(req: TFetchResultsReq): TFetchResultsResp; - FetchResults(req: TFetchResultsReq, callback?: (data: TFetchResultsResp)=>void): void; + FetchResults(req: TFetchResultsReq, callback?: (error: void, response: TFetchResultsResp)=>void): void; GetDelegationToken(req: TGetDelegationTokenReq): TGetDelegationTokenResp; - GetDelegationToken(req: TGetDelegationTokenReq, callback?: (data: TGetDelegationTokenResp)=>void): void; + GetDelegationToken(req: TGetDelegationTokenReq, callback?: (error: void, response: TGetDelegationTokenResp)=>void): void; CancelDelegationToken(req: TCancelDelegationTokenReq): TCancelDelegationTokenResp; - CancelDelegationToken(req: TCancelDelegationTokenReq, callback?: (data: TCancelDelegationTokenResp)=>void): void; + CancelDelegationToken(req: TCancelDelegationTokenReq, callback?: (error: void, response: TCancelDelegationTokenResp)=>void): void; RenewDelegationToken(req: TRenewDelegationTokenReq): TRenewDelegationTokenResp; - RenewDelegationToken(req: TRenewDelegationTokenReq, callback?: (data: TRenewDelegationTokenResp)=>void): void; + RenewDelegationToken(req: TRenewDelegationTokenReq, callback?: (error: void, response: TRenewDelegationTokenResp)=>void): void; +} + +declare class Processor { + private _handler: object; + + constructor(handler: object); + process(input: thrift.TProtocol, output: thrift.TProtocol): void; + process_OpenSession(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_CloseSession(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_GetInfo(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_ExecuteStatement(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_GetTypeInfo(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_GetCatalogs(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_GetSchemas(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_GetTables(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_GetTableTypes(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_GetColumns(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_GetFunctions(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_GetPrimaryKeys(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_GetCrossReference(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_GetOperationStatus(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_CancelOperation(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_CloseOperation(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_GetResultSetMetadata(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_FetchResults(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_GetDelegationToken(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_CancelDelegationToken(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; + process_RenewDelegationToken(seqid: number, input: thrift.TProtocol, output: thrift.TProtocol): void; } diff --git a/thrift/TCLIService.js b/thrift/TCLIService.js index 9371ccce..f1056839 100644 --- a/thrift/TCLIService.js +++ b/thrift/TCLIService.js @@ -3,18 +3,22 @@ // // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING // -if (typeof Int64 === 'undefined' && typeof require === 'function') { - var Int64 = require('node-int64'); -} +"use strict"; +var thrift = require('thrift'); +var Thrift = thrift.Thrift; +var Q = thrift.Q; +var Int64 = require('node-int64'); + +var ttypes = require('./TCLIService_types'); //HELPER FUNCTIONS AND STRUCTURES -TCLIService_OpenSession_args = function(args) { +var TCLIService_OpenSession_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TOpenSessionReq(args.req); + this.req = new ttypes.TOpenSessionReq(args.req); } } }; @@ -31,7 +35,7 @@ TCLIService_OpenSession_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TOpenSessionReq(); + this.req = new ttypes.TOpenSessionReq(); this.req.read(input); } else { input.skip(ftype); @@ -61,11 +65,11 @@ TCLIService_OpenSession_args.prototype.write = function(output) { return; }; -TCLIService_OpenSession_result = function(args) { +var TCLIService_OpenSession_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TOpenSessionResp(args.success); + this.success = new ttypes.TOpenSessionResp(args.success); } } }; @@ -82,7 +86,7 @@ TCLIService_OpenSession_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TOpenSessionResp(); + this.success = new ttypes.TOpenSessionResp(); this.success.read(input); } else { input.skip(ftype); @@ -112,11 +116,11 @@ TCLIService_OpenSession_result.prototype.write = function(output) { return; }; -TCLIService_CloseSession_args = function(args) { +var TCLIService_CloseSession_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TCloseSessionReq(args.req); + this.req = new ttypes.TCloseSessionReq(args.req); } } }; @@ -133,7 +137,7 @@ TCLIService_CloseSession_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TCloseSessionReq(); + this.req = new ttypes.TCloseSessionReq(); this.req.read(input); } else { input.skip(ftype); @@ -163,11 +167,11 @@ TCLIService_CloseSession_args.prototype.write = function(output) { return; }; -TCLIService_CloseSession_result = function(args) { +var TCLIService_CloseSession_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TCloseSessionResp(args.success); + this.success = new ttypes.TCloseSessionResp(args.success); } } }; @@ -184,7 +188,7 @@ TCLIService_CloseSession_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TCloseSessionResp(); + this.success = new ttypes.TCloseSessionResp(); this.success.read(input); } else { input.skip(ftype); @@ -214,11 +218,11 @@ TCLIService_CloseSession_result.prototype.write = function(output) { return; }; -TCLIService_GetInfo_args = function(args) { +var TCLIService_GetInfo_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TGetInfoReq(args.req); + this.req = new ttypes.TGetInfoReq(args.req); } } }; @@ -235,7 +239,7 @@ TCLIService_GetInfo_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TGetInfoReq(); + this.req = new ttypes.TGetInfoReq(); this.req.read(input); } else { input.skip(ftype); @@ -265,11 +269,11 @@ TCLIService_GetInfo_args.prototype.write = function(output) { return; }; -TCLIService_GetInfo_result = function(args) { +var TCLIService_GetInfo_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TGetInfoResp(args.success); + this.success = new ttypes.TGetInfoResp(args.success); } } }; @@ -286,7 +290,7 @@ TCLIService_GetInfo_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TGetInfoResp(); + this.success = new ttypes.TGetInfoResp(); this.success.read(input); } else { input.skip(ftype); @@ -316,11 +320,11 @@ TCLIService_GetInfo_result.prototype.write = function(output) { return; }; -TCLIService_ExecuteStatement_args = function(args) { +var TCLIService_ExecuteStatement_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TExecuteStatementReq(args.req); + this.req = new ttypes.TExecuteStatementReq(args.req); } } }; @@ -337,7 +341,7 @@ TCLIService_ExecuteStatement_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TExecuteStatementReq(); + this.req = new ttypes.TExecuteStatementReq(); this.req.read(input); } else { input.skip(ftype); @@ -367,11 +371,11 @@ TCLIService_ExecuteStatement_args.prototype.write = function(output) { return; }; -TCLIService_ExecuteStatement_result = function(args) { +var TCLIService_ExecuteStatement_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TExecuteStatementResp(args.success); + this.success = new ttypes.TExecuteStatementResp(args.success); } } }; @@ -388,7 +392,7 @@ TCLIService_ExecuteStatement_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TExecuteStatementResp(); + this.success = new ttypes.TExecuteStatementResp(); this.success.read(input); } else { input.skip(ftype); @@ -418,11 +422,11 @@ TCLIService_ExecuteStatement_result.prototype.write = function(output) { return; }; -TCLIService_GetTypeInfo_args = function(args) { +var TCLIService_GetTypeInfo_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TGetTypeInfoReq(args.req); + this.req = new ttypes.TGetTypeInfoReq(args.req); } } }; @@ -439,7 +443,7 @@ TCLIService_GetTypeInfo_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TGetTypeInfoReq(); + this.req = new ttypes.TGetTypeInfoReq(); this.req.read(input); } else { input.skip(ftype); @@ -469,11 +473,11 @@ TCLIService_GetTypeInfo_args.prototype.write = function(output) { return; }; -TCLIService_GetTypeInfo_result = function(args) { +var TCLIService_GetTypeInfo_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TGetTypeInfoResp(args.success); + this.success = new ttypes.TGetTypeInfoResp(args.success); } } }; @@ -490,7 +494,7 @@ TCLIService_GetTypeInfo_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TGetTypeInfoResp(); + this.success = new ttypes.TGetTypeInfoResp(); this.success.read(input); } else { input.skip(ftype); @@ -520,11 +524,11 @@ TCLIService_GetTypeInfo_result.prototype.write = function(output) { return; }; -TCLIService_GetCatalogs_args = function(args) { +var TCLIService_GetCatalogs_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TGetCatalogsReq(args.req); + this.req = new ttypes.TGetCatalogsReq(args.req); } } }; @@ -541,7 +545,7 @@ TCLIService_GetCatalogs_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TGetCatalogsReq(); + this.req = new ttypes.TGetCatalogsReq(); this.req.read(input); } else { input.skip(ftype); @@ -571,11 +575,11 @@ TCLIService_GetCatalogs_args.prototype.write = function(output) { return; }; -TCLIService_GetCatalogs_result = function(args) { +var TCLIService_GetCatalogs_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TGetCatalogsResp(args.success); + this.success = new ttypes.TGetCatalogsResp(args.success); } } }; @@ -592,7 +596,7 @@ TCLIService_GetCatalogs_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TGetCatalogsResp(); + this.success = new ttypes.TGetCatalogsResp(); this.success.read(input); } else { input.skip(ftype); @@ -622,11 +626,11 @@ TCLIService_GetCatalogs_result.prototype.write = function(output) { return; }; -TCLIService_GetSchemas_args = function(args) { +var TCLIService_GetSchemas_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TGetSchemasReq(args.req); + this.req = new ttypes.TGetSchemasReq(args.req); } } }; @@ -643,7 +647,7 @@ TCLIService_GetSchemas_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TGetSchemasReq(); + this.req = new ttypes.TGetSchemasReq(); this.req.read(input); } else { input.skip(ftype); @@ -673,11 +677,11 @@ TCLIService_GetSchemas_args.prototype.write = function(output) { return; }; -TCLIService_GetSchemas_result = function(args) { +var TCLIService_GetSchemas_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TGetSchemasResp(args.success); + this.success = new ttypes.TGetSchemasResp(args.success); } } }; @@ -694,7 +698,7 @@ TCLIService_GetSchemas_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TGetSchemasResp(); + this.success = new ttypes.TGetSchemasResp(); this.success.read(input); } else { input.skip(ftype); @@ -724,11 +728,11 @@ TCLIService_GetSchemas_result.prototype.write = function(output) { return; }; -TCLIService_GetTables_args = function(args) { +var TCLIService_GetTables_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TGetTablesReq(args.req); + this.req = new ttypes.TGetTablesReq(args.req); } } }; @@ -745,7 +749,7 @@ TCLIService_GetTables_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TGetTablesReq(); + this.req = new ttypes.TGetTablesReq(); this.req.read(input); } else { input.skip(ftype); @@ -775,11 +779,11 @@ TCLIService_GetTables_args.prototype.write = function(output) { return; }; -TCLIService_GetTables_result = function(args) { +var TCLIService_GetTables_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TGetTablesResp(args.success); + this.success = new ttypes.TGetTablesResp(args.success); } } }; @@ -796,7 +800,7 @@ TCLIService_GetTables_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TGetTablesResp(); + this.success = new ttypes.TGetTablesResp(); this.success.read(input); } else { input.skip(ftype); @@ -826,11 +830,11 @@ TCLIService_GetTables_result.prototype.write = function(output) { return; }; -TCLIService_GetTableTypes_args = function(args) { +var TCLIService_GetTableTypes_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TGetTableTypesReq(args.req); + this.req = new ttypes.TGetTableTypesReq(args.req); } } }; @@ -847,7 +851,7 @@ TCLIService_GetTableTypes_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TGetTableTypesReq(); + this.req = new ttypes.TGetTableTypesReq(); this.req.read(input); } else { input.skip(ftype); @@ -877,11 +881,11 @@ TCLIService_GetTableTypes_args.prototype.write = function(output) { return; }; -TCLIService_GetTableTypes_result = function(args) { +var TCLIService_GetTableTypes_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TGetTableTypesResp(args.success); + this.success = new ttypes.TGetTableTypesResp(args.success); } } }; @@ -898,7 +902,7 @@ TCLIService_GetTableTypes_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TGetTableTypesResp(); + this.success = new ttypes.TGetTableTypesResp(); this.success.read(input); } else { input.skip(ftype); @@ -928,11 +932,11 @@ TCLIService_GetTableTypes_result.prototype.write = function(output) { return; }; -TCLIService_GetColumns_args = function(args) { +var TCLIService_GetColumns_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TGetColumnsReq(args.req); + this.req = new ttypes.TGetColumnsReq(args.req); } } }; @@ -949,7 +953,7 @@ TCLIService_GetColumns_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TGetColumnsReq(); + this.req = new ttypes.TGetColumnsReq(); this.req.read(input); } else { input.skip(ftype); @@ -979,11 +983,11 @@ TCLIService_GetColumns_args.prototype.write = function(output) { return; }; -TCLIService_GetColumns_result = function(args) { +var TCLIService_GetColumns_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TGetColumnsResp(args.success); + this.success = new ttypes.TGetColumnsResp(args.success); } } }; @@ -1000,7 +1004,7 @@ TCLIService_GetColumns_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TGetColumnsResp(); + this.success = new ttypes.TGetColumnsResp(); this.success.read(input); } else { input.skip(ftype); @@ -1030,11 +1034,11 @@ TCLIService_GetColumns_result.prototype.write = function(output) { return; }; -TCLIService_GetFunctions_args = function(args) { +var TCLIService_GetFunctions_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TGetFunctionsReq(args.req); + this.req = new ttypes.TGetFunctionsReq(args.req); } } }; @@ -1051,7 +1055,7 @@ TCLIService_GetFunctions_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TGetFunctionsReq(); + this.req = new ttypes.TGetFunctionsReq(); this.req.read(input); } else { input.skip(ftype); @@ -1081,11 +1085,11 @@ TCLIService_GetFunctions_args.prototype.write = function(output) { return; }; -TCLIService_GetFunctions_result = function(args) { +var TCLIService_GetFunctions_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TGetFunctionsResp(args.success); + this.success = new ttypes.TGetFunctionsResp(args.success); } } }; @@ -1102,7 +1106,7 @@ TCLIService_GetFunctions_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TGetFunctionsResp(); + this.success = new ttypes.TGetFunctionsResp(); this.success.read(input); } else { input.skip(ftype); @@ -1132,11 +1136,11 @@ TCLIService_GetFunctions_result.prototype.write = function(output) { return; }; -TCLIService_GetPrimaryKeys_args = function(args) { +var TCLIService_GetPrimaryKeys_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TGetPrimaryKeysReq(args.req); + this.req = new ttypes.TGetPrimaryKeysReq(args.req); } } }; @@ -1153,7 +1157,7 @@ TCLIService_GetPrimaryKeys_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TGetPrimaryKeysReq(); + this.req = new ttypes.TGetPrimaryKeysReq(); this.req.read(input); } else { input.skip(ftype); @@ -1183,11 +1187,11 @@ TCLIService_GetPrimaryKeys_args.prototype.write = function(output) { return; }; -TCLIService_GetPrimaryKeys_result = function(args) { +var TCLIService_GetPrimaryKeys_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TGetPrimaryKeysResp(args.success); + this.success = new ttypes.TGetPrimaryKeysResp(args.success); } } }; @@ -1204,7 +1208,7 @@ TCLIService_GetPrimaryKeys_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TGetPrimaryKeysResp(); + this.success = new ttypes.TGetPrimaryKeysResp(); this.success.read(input); } else { input.skip(ftype); @@ -1234,11 +1238,11 @@ TCLIService_GetPrimaryKeys_result.prototype.write = function(output) { return; }; -TCLIService_GetCrossReference_args = function(args) { +var TCLIService_GetCrossReference_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TGetCrossReferenceReq(args.req); + this.req = new ttypes.TGetCrossReferenceReq(args.req); } } }; @@ -1255,7 +1259,7 @@ TCLIService_GetCrossReference_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TGetCrossReferenceReq(); + this.req = new ttypes.TGetCrossReferenceReq(); this.req.read(input); } else { input.skip(ftype); @@ -1285,11 +1289,11 @@ TCLIService_GetCrossReference_args.prototype.write = function(output) { return; }; -TCLIService_GetCrossReference_result = function(args) { +var TCLIService_GetCrossReference_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TGetCrossReferenceResp(args.success); + this.success = new ttypes.TGetCrossReferenceResp(args.success); } } }; @@ -1306,7 +1310,7 @@ TCLIService_GetCrossReference_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TGetCrossReferenceResp(); + this.success = new ttypes.TGetCrossReferenceResp(); this.success.read(input); } else { input.skip(ftype); @@ -1336,11 +1340,11 @@ TCLIService_GetCrossReference_result.prototype.write = function(output) { return; }; -TCLIService_GetOperationStatus_args = function(args) { +var TCLIService_GetOperationStatus_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TGetOperationStatusReq(args.req); + this.req = new ttypes.TGetOperationStatusReq(args.req); } } }; @@ -1357,7 +1361,7 @@ TCLIService_GetOperationStatus_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TGetOperationStatusReq(); + this.req = new ttypes.TGetOperationStatusReq(); this.req.read(input); } else { input.skip(ftype); @@ -1387,11 +1391,11 @@ TCLIService_GetOperationStatus_args.prototype.write = function(output) { return; }; -TCLIService_GetOperationStatus_result = function(args) { +var TCLIService_GetOperationStatus_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TGetOperationStatusResp(args.success); + this.success = new ttypes.TGetOperationStatusResp(args.success); } } }; @@ -1408,7 +1412,7 @@ TCLIService_GetOperationStatus_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TGetOperationStatusResp(); + this.success = new ttypes.TGetOperationStatusResp(); this.success.read(input); } else { input.skip(ftype); @@ -1438,11 +1442,11 @@ TCLIService_GetOperationStatus_result.prototype.write = function(output) { return; }; -TCLIService_CancelOperation_args = function(args) { +var TCLIService_CancelOperation_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TCancelOperationReq(args.req); + this.req = new ttypes.TCancelOperationReq(args.req); } } }; @@ -1459,7 +1463,7 @@ TCLIService_CancelOperation_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TCancelOperationReq(); + this.req = new ttypes.TCancelOperationReq(); this.req.read(input); } else { input.skip(ftype); @@ -1489,11 +1493,11 @@ TCLIService_CancelOperation_args.prototype.write = function(output) { return; }; -TCLIService_CancelOperation_result = function(args) { +var TCLIService_CancelOperation_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TCancelOperationResp(args.success); + this.success = new ttypes.TCancelOperationResp(args.success); } } }; @@ -1510,7 +1514,7 @@ TCLIService_CancelOperation_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TCancelOperationResp(); + this.success = new ttypes.TCancelOperationResp(); this.success.read(input); } else { input.skip(ftype); @@ -1540,11 +1544,11 @@ TCLIService_CancelOperation_result.prototype.write = function(output) { return; }; -TCLIService_CloseOperation_args = function(args) { +var TCLIService_CloseOperation_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TCloseOperationReq(args.req); + this.req = new ttypes.TCloseOperationReq(args.req); } } }; @@ -1561,7 +1565,7 @@ TCLIService_CloseOperation_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TCloseOperationReq(); + this.req = new ttypes.TCloseOperationReq(); this.req.read(input); } else { input.skip(ftype); @@ -1591,11 +1595,11 @@ TCLIService_CloseOperation_args.prototype.write = function(output) { return; }; -TCLIService_CloseOperation_result = function(args) { +var TCLIService_CloseOperation_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TCloseOperationResp(args.success); + this.success = new ttypes.TCloseOperationResp(args.success); } } }; @@ -1612,7 +1616,7 @@ TCLIService_CloseOperation_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TCloseOperationResp(); + this.success = new ttypes.TCloseOperationResp(); this.success.read(input); } else { input.skip(ftype); @@ -1642,11 +1646,11 @@ TCLIService_CloseOperation_result.prototype.write = function(output) { return; }; -TCLIService_GetResultSetMetadata_args = function(args) { +var TCLIService_GetResultSetMetadata_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TGetResultSetMetadataReq(args.req); + this.req = new ttypes.TGetResultSetMetadataReq(args.req); } } }; @@ -1663,7 +1667,7 @@ TCLIService_GetResultSetMetadata_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TGetResultSetMetadataReq(); + this.req = new ttypes.TGetResultSetMetadataReq(); this.req.read(input); } else { input.skip(ftype); @@ -1693,11 +1697,11 @@ TCLIService_GetResultSetMetadata_args.prototype.write = function(output) { return; }; -TCLIService_GetResultSetMetadata_result = function(args) { +var TCLIService_GetResultSetMetadata_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TGetResultSetMetadataResp(args.success); + this.success = new ttypes.TGetResultSetMetadataResp(args.success); } } }; @@ -1714,7 +1718,7 @@ TCLIService_GetResultSetMetadata_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TGetResultSetMetadataResp(); + this.success = new ttypes.TGetResultSetMetadataResp(); this.success.read(input); } else { input.skip(ftype); @@ -1744,11 +1748,11 @@ TCLIService_GetResultSetMetadata_result.prototype.write = function(output) { return; }; -TCLIService_FetchResults_args = function(args) { +var TCLIService_FetchResults_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TFetchResultsReq(args.req); + this.req = new ttypes.TFetchResultsReq(args.req); } } }; @@ -1765,7 +1769,7 @@ TCLIService_FetchResults_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TFetchResultsReq(); + this.req = new ttypes.TFetchResultsReq(); this.req.read(input); } else { input.skip(ftype); @@ -1795,11 +1799,11 @@ TCLIService_FetchResults_args.prototype.write = function(output) { return; }; -TCLIService_FetchResults_result = function(args) { +var TCLIService_FetchResults_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TFetchResultsResp(args.success); + this.success = new ttypes.TFetchResultsResp(args.success); } } }; @@ -1816,7 +1820,7 @@ TCLIService_FetchResults_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TFetchResultsResp(); + this.success = new ttypes.TFetchResultsResp(); this.success.read(input); } else { input.skip(ftype); @@ -1846,11 +1850,11 @@ TCLIService_FetchResults_result.prototype.write = function(output) { return; }; -TCLIService_GetDelegationToken_args = function(args) { +var TCLIService_GetDelegationToken_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TGetDelegationTokenReq(args.req); + this.req = new ttypes.TGetDelegationTokenReq(args.req); } } }; @@ -1867,7 +1871,7 @@ TCLIService_GetDelegationToken_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TGetDelegationTokenReq(); + this.req = new ttypes.TGetDelegationTokenReq(); this.req.read(input); } else { input.skip(ftype); @@ -1897,11 +1901,11 @@ TCLIService_GetDelegationToken_args.prototype.write = function(output) { return; }; -TCLIService_GetDelegationToken_result = function(args) { +var TCLIService_GetDelegationToken_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TGetDelegationTokenResp(args.success); + this.success = new ttypes.TGetDelegationTokenResp(args.success); } } }; @@ -1918,7 +1922,7 @@ TCLIService_GetDelegationToken_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TGetDelegationTokenResp(); + this.success = new ttypes.TGetDelegationTokenResp(); this.success.read(input); } else { input.skip(ftype); @@ -1948,11 +1952,11 @@ TCLIService_GetDelegationToken_result.prototype.write = function(output) { return; }; -TCLIService_CancelDelegationToken_args = function(args) { +var TCLIService_CancelDelegationToken_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TCancelDelegationTokenReq(args.req); + this.req = new ttypes.TCancelDelegationTokenReq(args.req); } } }; @@ -1969,7 +1973,7 @@ TCLIService_CancelDelegationToken_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TCancelDelegationTokenReq(); + this.req = new ttypes.TCancelDelegationTokenReq(); this.req.read(input); } else { input.skip(ftype); @@ -1999,11 +2003,11 @@ TCLIService_CancelDelegationToken_args.prototype.write = function(output) { return; }; -TCLIService_CancelDelegationToken_result = function(args) { +var TCLIService_CancelDelegationToken_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TCancelDelegationTokenResp(args.success); + this.success = new ttypes.TCancelDelegationTokenResp(args.success); } } }; @@ -2020,7 +2024,7 @@ TCLIService_CancelDelegationToken_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TCancelDelegationTokenResp(); + this.success = new ttypes.TCancelDelegationTokenResp(); this.success.read(input); } else { input.skip(ftype); @@ -2050,11 +2054,11 @@ TCLIService_CancelDelegationToken_result.prototype.write = function(output) { return; }; -TCLIService_RenewDelegationToken_args = function(args) { +var TCLIService_RenewDelegationToken_args = function(args) { this.req = null; if (args) { if (args.req !== undefined && args.req !== null) { - this.req = new TRenewDelegationTokenReq(args.req); + this.req = new ttypes.TRenewDelegationTokenReq(args.req); } } }; @@ -2071,7 +2075,7 @@ TCLIService_RenewDelegationToken_args.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.req = new TRenewDelegationTokenReq(); + this.req = new ttypes.TRenewDelegationTokenReq(); this.req.read(input); } else { input.skip(ftype); @@ -2101,11 +2105,11 @@ TCLIService_RenewDelegationToken_args.prototype.write = function(output) { return; }; -TCLIService_RenewDelegationToken_result = function(args) { +var TCLIService_RenewDelegationToken_result = function(args) { this.success = null; if (args) { if (args.success !== undefined && args.success !== null) { - this.success = new TRenewDelegationTokenResp(args.success); + this.success = new ttypes.TRenewDelegationTokenResp(args.success); } } }; @@ -2122,7 +2126,7 @@ TCLIService_RenewDelegationToken_result.prototype.read = function(input) { switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { - this.success = new TRenewDelegationTokenResp(); + this.success = new ttypes.TRenewDelegationTokenResp(); this.success.read(input); } else { input.skip(ftype); @@ -2152,1227 +2156,2045 @@ TCLIService_RenewDelegationToken_result.prototype.write = function(output) { return; }; -TCLIServiceClient = function(input, output) { - this.input = input; - this.output = (!output) ? input : output; - this.seqid = 0; +var TCLIServiceClient = exports.Client = function(output, pClass) { + this.output = output; + this.pClass = pClass; + this._seqid = 0; + this._reqs = {}; }; TCLIServiceClient.prototype = {}; +TCLIServiceClient.prototype.seqid = function() { return this._seqid; }; +TCLIServiceClient.prototype.new_seqid = function() { return this._seqid += 1; }; TCLIServiceClient.prototype.OpenSession = function(req, callback) { - this.send_OpenSession(req, callback); - if (!callback) { - return this.recv_OpenSession(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_OpenSession(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_OpenSession(req); } }; -TCLIServiceClient.prototype.send_OpenSession = function(req, callback) { +TCLIServiceClient.prototype.send_OpenSession = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_OpenSession_args(params); try { - this.output.writeMessageBegin('OpenSession', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_OpenSession(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('OpenSession', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_OpenSession = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_OpenSession = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_OpenSession_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); } - throw 'OpenSession failed: unknown result'; + return callback('OpenSession failed: unknown result'); }; TCLIServiceClient.prototype.CloseSession = function(req, callback) { - this.send_CloseSession(req, callback); - if (!callback) { - return this.recv_CloseSession(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_CloseSession(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_CloseSession(req); } }; -TCLIServiceClient.prototype.send_CloseSession = function(req, callback) { +TCLIServiceClient.prototype.send_CloseSession = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_CloseSession_args(params); try { - this.output.writeMessageBegin('CloseSession', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_CloseSession(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('CloseSession', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_CloseSession = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_CloseSession = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_CloseSession_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); } - throw 'CloseSession failed: unknown result'; + return callback('CloseSession failed: unknown result'); }; TCLIServiceClient.prototype.GetInfo = function(req, callback) { - this.send_GetInfo(req, callback); - if (!callback) { - return this.recv_GetInfo(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_GetInfo(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_GetInfo(req); } }; -TCLIServiceClient.prototype.send_GetInfo = function(req, callback) { +TCLIServiceClient.prototype.send_GetInfo = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_GetInfo_args(params); try { - this.output.writeMessageBegin('GetInfo', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_GetInfo(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('GetInfo', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetInfo = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_GetInfo = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_GetInfo_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); } - throw 'GetInfo failed: unknown result'; + return callback('GetInfo failed: unknown result'); }; TCLIServiceClient.prototype.ExecuteStatement = function(req, callback) { - this.send_ExecuteStatement(req, callback); - if (!callback) { - return this.recv_ExecuteStatement(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_ExecuteStatement(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_ExecuteStatement(req); } }; -TCLIServiceClient.prototype.send_ExecuteStatement = function(req, callback) { +TCLIServiceClient.prototype.send_ExecuteStatement = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_ExecuteStatement_args(params); try { - this.output.writeMessageBegin('ExecuteStatement', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_ExecuteStatement(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('ExecuteStatement', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_ExecuteStatement = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_ExecuteStatement = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_ExecuteStatement_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); } - throw 'ExecuteStatement failed: unknown result'; + return callback('ExecuteStatement failed: unknown result'); }; TCLIServiceClient.prototype.GetTypeInfo = function(req, callback) { - this.send_GetTypeInfo(req, callback); - if (!callback) { - return this.recv_GetTypeInfo(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_GetTypeInfo(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_GetTypeInfo(req); } }; -TCLIServiceClient.prototype.send_GetTypeInfo = function(req, callback) { +TCLIServiceClient.prototype.send_GetTypeInfo = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_GetTypeInfo_args(params); try { - this.output.writeMessageBegin('GetTypeInfo', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_GetTypeInfo(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('GetTypeInfo', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetTypeInfo = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_GetTypeInfo = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_GetTypeInfo_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); } - throw 'GetTypeInfo failed: unknown result'; + return callback('GetTypeInfo failed: unknown result'); }; TCLIServiceClient.prototype.GetCatalogs = function(req, callback) { - this.send_GetCatalogs(req, callback); - if (!callback) { - return this.recv_GetCatalogs(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_GetCatalogs(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_GetCatalogs(req); } }; -TCLIServiceClient.prototype.send_GetCatalogs = function(req, callback) { +TCLIServiceClient.prototype.send_GetCatalogs = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_GetCatalogs_args(params); try { - this.output.writeMessageBegin('GetCatalogs', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_GetCatalogs(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('GetCatalogs', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetCatalogs = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_GetCatalogs = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_GetCatalogs_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); } - throw 'GetCatalogs failed: unknown result'; + return callback('GetCatalogs failed: unknown result'); }; TCLIServiceClient.prototype.GetSchemas = function(req, callback) { - this.send_GetSchemas(req, callback); - if (!callback) { - return this.recv_GetSchemas(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_GetSchemas(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_GetSchemas(req); } }; -TCLIServiceClient.prototype.send_GetSchemas = function(req, callback) { +TCLIServiceClient.prototype.send_GetSchemas = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_GetSchemas_args(params); try { - this.output.writeMessageBegin('GetSchemas', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_GetSchemas(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('GetSchemas', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetSchemas = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_GetSchemas = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_GetSchemas_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); } - throw 'GetSchemas failed: unknown result'; + return callback('GetSchemas failed: unknown result'); }; TCLIServiceClient.prototype.GetTables = function(req, callback) { - this.send_GetTables(req, callback); - if (!callback) { - return this.recv_GetTables(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_GetTables(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_GetTables(req); } }; -TCLIServiceClient.prototype.send_GetTables = function(req, callback) { +TCLIServiceClient.prototype.send_GetTables = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_GetTables_args(params); try { - this.output.writeMessageBegin('GetTables', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_GetTables(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('GetTables', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetTables = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_GetTables = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_GetTables_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); } - throw 'GetTables failed: unknown result'; + return callback('GetTables failed: unknown result'); }; TCLIServiceClient.prototype.GetTableTypes = function(req, callback) { - this.send_GetTableTypes(req, callback); - if (!callback) { - return this.recv_GetTableTypes(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_GetTableTypes(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_GetTableTypes(req); } }; -TCLIServiceClient.prototype.send_GetTableTypes = function(req, callback) { +TCLIServiceClient.prototype.send_GetTableTypes = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_GetTableTypes_args(params); try { - this.output.writeMessageBegin('GetTableTypes', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_GetTableTypes(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('GetTableTypes', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetTableTypes = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_GetTableTypes = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_GetTableTypes_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); } - throw 'GetTableTypes failed: unknown result'; + return callback('GetTableTypes failed: unknown result'); }; TCLIServiceClient.prototype.GetColumns = function(req, callback) { - this.send_GetColumns(req, callback); - if (!callback) { - return this.recv_GetColumns(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_GetColumns(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_GetColumns(req); } }; -TCLIServiceClient.prototype.send_GetColumns = function(req, callback) { +TCLIServiceClient.prototype.send_GetColumns = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_GetColumns_args(params); try { - this.output.writeMessageBegin('GetColumns', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_GetColumns(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('GetColumns', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetColumns = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_GetColumns = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_GetColumns_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); } - throw 'GetColumns failed: unknown result'; + return callback('GetColumns failed: unknown result'); }; TCLIServiceClient.prototype.GetFunctions = function(req, callback) { - this.send_GetFunctions(req, callback); - if (!callback) { - return this.recv_GetFunctions(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_GetFunctions(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_GetFunctions(req); } }; -TCLIServiceClient.prototype.send_GetFunctions = function(req, callback) { +TCLIServiceClient.prototype.send_GetFunctions = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_GetFunctions_args(params); try { - this.output.writeMessageBegin('GetFunctions', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_GetFunctions(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('GetFunctions', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetFunctions = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_GetFunctions = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_GetFunctions_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); } - throw 'GetFunctions failed: unknown result'; + return callback('GetFunctions failed: unknown result'); }; TCLIServiceClient.prototype.GetPrimaryKeys = function(req, callback) { - this.send_GetPrimaryKeys(req, callback); - if (!callback) { - return this.recv_GetPrimaryKeys(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_GetPrimaryKeys(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_GetPrimaryKeys(req); } }; -TCLIServiceClient.prototype.send_GetPrimaryKeys = function(req, callback) { +TCLIServiceClient.prototype.send_GetPrimaryKeys = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_GetPrimaryKeys_args(params); try { - this.output.writeMessageBegin('GetPrimaryKeys', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_GetPrimaryKeys(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('GetPrimaryKeys', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetPrimaryKeys = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_GetPrimaryKeys = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_GetPrimaryKeys_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); } - throw 'GetPrimaryKeys failed: unknown result'; + return callback('GetPrimaryKeys failed: unknown result'); }; TCLIServiceClient.prototype.GetCrossReference = function(req, callback) { - this.send_GetCrossReference(req, callback); - if (!callback) { - return this.recv_GetCrossReference(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_GetCrossReference(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_GetCrossReference(req); } }; -TCLIServiceClient.prototype.send_GetCrossReference = function(req, callback) { +TCLIServiceClient.prototype.send_GetCrossReference = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_GetCrossReference_args(params); try { - this.output.writeMessageBegin('GetCrossReference', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_GetCrossReference(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('GetCrossReference', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetCrossReference = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_GetCrossReference = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_GetCrossReference_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); } - throw 'GetCrossReference failed: unknown result'; + return callback('GetCrossReference failed: unknown result'); }; TCLIServiceClient.prototype.GetOperationStatus = function(req, callback) { - this.send_GetOperationStatus(req, callback); - if (!callback) { - return this.recv_GetOperationStatus(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_GetOperationStatus(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_GetOperationStatus(req); } }; -TCLIServiceClient.prototype.send_GetOperationStatus = function(req, callback) { +TCLIServiceClient.prototype.send_GetOperationStatus = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_GetOperationStatus_args(params); try { - this.output.writeMessageBegin('GetOperationStatus', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_GetOperationStatus(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('GetOperationStatus', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetOperationStatus = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_GetOperationStatus = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_GetOperationStatus_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); } - throw 'GetOperationStatus failed: unknown result'; + return callback('GetOperationStatus failed: unknown result'); }; TCLIServiceClient.prototype.CancelOperation = function(req, callback) { - this.send_CancelOperation(req, callback); - if (!callback) { - return this.recv_CancelOperation(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_CancelOperation(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_CancelOperation(req); } }; -TCLIServiceClient.prototype.send_CancelOperation = function(req, callback) { +TCLIServiceClient.prototype.send_CancelOperation = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_CancelOperation_args(params); try { - this.output.writeMessageBegin('CancelOperation', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_CancelOperation(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('CancelOperation', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_CancelOperation = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_CancelOperation = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_CancelOperation_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); } - throw 'CancelOperation failed: unknown result'; + return callback('CancelOperation failed: unknown result'); }; TCLIServiceClient.prototype.CloseOperation = function(req, callback) { - this.send_CloseOperation(req, callback); - if (!callback) { - return this.recv_CloseOperation(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_CloseOperation(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_CloseOperation(req); } }; -TCLIServiceClient.prototype.send_CloseOperation = function(req, callback) { +TCLIServiceClient.prototype.send_CloseOperation = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_CloseOperation_args(params); try { - this.output.writeMessageBegin('CloseOperation', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_CloseOperation(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('CloseOperation', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_CloseOperation = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_CloseOperation = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_CloseOperation_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); } - throw 'CloseOperation failed: unknown result'; + return callback('CloseOperation failed: unknown result'); }; TCLIServiceClient.prototype.GetResultSetMetadata = function(req, callback) { - this.send_GetResultSetMetadata(req, callback); - if (!callback) { - return this.recv_GetResultSetMetadata(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_GetResultSetMetadata(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_GetResultSetMetadata(req); } }; -TCLIServiceClient.prototype.send_GetResultSetMetadata = function(req, callback) { +TCLIServiceClient.prototype.send_GetResultSetMetadata = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_GetResultSetMetadata_args(params); try { - this.output.writeMessageBegin('GetResultSetMetadata', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_GetResultSetMetadata(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('GetResultSetMetadata', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetResultSetMetadata = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_GetResultSetMetadata = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_GetResultSetMetadata_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); } - throw 'GetResultSetMetadata failed: unknown result'; + return callback('GetResultSetMetadata failed: unknown result'); }; TCLIServiceClient.prototype.FetchResults = function(req, callback) { - this.send_FetchResults(req, callback); - if (!callback) { - return this.recv_FetchResults(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_FetchResults(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_FetchResults(req); } }; -TCLIServiceClient.prototype.send_FetchResults = function(req, callback) { +TCLIServiceClient.prototype.send_FetchResults = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_FetchResults_args(params); try { - this.output.writeMessageBegin('FetchResults', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_FetchResults(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('FetchResults', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_FetchResults = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_FetchResults = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_FetchResults_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); } - throw 'FetchResults failed: unknown result'; + return callback('FetchResults failed: unknown result'); }; TCLIServiceClient.prototype.GetDelegationToken = function(req, callback) { - this.send_GetDelegationToken(req, callback); - if (!callback) { - return this.recv_GetDelegationToken(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_GetDelegationToken(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_GetDelegationToken(req); } }; -TCLIServiceClient.prototype.send_GetDelegationToken = function(req, callback) { +TCLIServiceClient.prototype.send_GetDelegationToken = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_GetDelegationToken_args(params); try { - this.output.writeMessageBegin('GetDelegationToken', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_GetDelegationToken(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('GetDelegationToken', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_GetDelegationToken = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_GetDelegationToken = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_GetDelegationToken_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); } - throw 'GetDelegationToken failed: unknown result'; + return callback('GetDelegationToken failed: unknown result'); }; TCLIServiceClient.prototype.CancelDelegationToken = function(req, callback) { - this.send_CancelDelegationToken(req, callback); - if (!callback) { - return this.recv_CancelDelegationToken(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_CancelDelegationToken(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_CancelDelegationToken(req); } }; -TCLIServiceClient.prototype.send_CancelDelegationToken = function(req, callback) { +TCLIServiceClient.prototype.send_CancelDelegationToken = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_CancelDelegationToken_args(params); try { - this.output.writeMessageBegin('CancelDelegationToken', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_CancelDelegationToken(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('CancelDelegationToken', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_CancelDelegationToken = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_CancelDelegationToken = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_CancelDelegationToken_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); } - throw 'CancelDelegationToken failed: unknown result'; + return callback('CancelDelegationToken failed: unknown result'); }; TCLIServiceClient.prototype.RenewDelegationToken = function(req, callback) { - this.send_RenewDelegationToken(req, callback); - if (!callback) { - return this.recv_RenewDelegationToken(); + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_RenewDelegationToken(req); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_RenewDelegationToken(req); } }; -TCLIServiceClient.prototype.send_RenewDelegationToken = function(req, callback) { +TCLIServiceClient.prototype.send_RenewDelegationToken = function(req) { + var output = new this.pClass(this.output); var params = { req: req }; var args = new TCLIService_RenewDelegationToken_args(params); try { - this.output.writeMessageBegin('RenewDelegationToken', Thrift.MessageType.CALL, this.seqid); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_RenewDelegationToken(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); - } + output.writeMessageBegin('RenewDelegationToken', Thrift.MessageType.CALL, this.seqid()); + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); } catch (e) { - if (typeof this.output.getTransport().reset === 'function') { - this.output.getTransport().reset(); + delete this._reqs[this.seqid()]; + if (typeof output.reset === 'function') { + output.reset(); } throw e; } }; -TCLIServiceClient.prototype.recv_RenewDelegationToken = function() { - var ret = this.input.readMessageBegin(); - var mtype = ret.mtype; +TCLIServiceClient.prototype.recv_RenewDelegationToken = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); - x.read(this.input); - this.input.readMessageEnd(); - throw x; + x.read(input); + input.readMessageEnd(); + return callback(x); } var result = new TCLIService_RenewDelegationToken_result(); - result.read(this.input); - this.input.readMessageEnd(); + result.read(input); + input.readMessageEnd(); if (null !== result.success) { - return result.success; + return callback(null, result.success); + } + return callback('RenewDelegationToken failed: unknown result'); +}; +var TCLIServiceProcessor = exports.Processor = function(handler) { + this._handler = handler; +}; +TCLIServiceProcessor.prototype.process = function(input, output) { + var r = input.readMessageBegin(); + if (this['process_' + r.fname]) { + return this['process_' + r.fname].call(this, r.rseqid, input, output); + } else { + input.skip(Thrift.Type.STRUCT); + input.readMessageEnd(); + var x = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN_METHOD, 'Unknown function ' + r.fname); + output.writeMessageBegin(r.fname, Thrift.MessageType.EXCEPTION, r.rseqid); + x.write(output); + output.writeMessageEnd(); + output.flush(); + } +}; +TCLIServiceProcessor.prototype.process_OpenSession = function(seqid, input, output) { + var args = new TCLIService_OpenSession_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.OpenSession.length === 1) { + Q.fcall(this._handler.OpenSession.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_OpenSession_result({success: result}); + output.writeMessageBegin("OpenSession", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("OpenSession", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.OpenSession(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_OpenSession_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("OpenSession", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("OpenSession", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +}; +TCLIServiceProcessor.prototype.process_CloseSession = function(seqid, input, output) { + var args = new TCLIService_CloseSession_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.CloseSession.length === 1) { + Q.fcall(this._handler.CloseSession.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_CloseSession_result({success: result}); + output.writeMessageBegin("CloseSession", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("CloseSession", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.CloseSession(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_CloseSession_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("CloseSession", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("CloseSession", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +}; +TCLIServiceProcessor.prototype.process_GetInfo = function(seqid, input, output) { + var args = new TCLIService_GetInfo_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.GetInfo.length === 1) { + Q.fcall(this._handler.GetInfo.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_GetInfo_result({success: result}); + output.writeMessageBegin("GetInfo", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetInfo", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.GetInfo(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_GetInfo_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("GetInfo", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetInfo", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +}; +TCLIServiceProcessor.prototype.process_ExecuteStatement = function(seqid, input, output) { + var args = new TCLIService_ExecuteStatement_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.ExecuteStatement.length === 1) { + Q.fcall(this._handler.ExecuteStatement.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_ExecuteStatement_result({success: result}); + output.writeMessageBegin("ExecuteStatement", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("ExecuteStatement", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.ExecuteStatement(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_ExecuteStatement_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("ExecuteStatement", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("ExecuteStatement", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +}; +TCLIServiceProcessor.prototype.process_GetTypeInfo = function(seqid, input, output) { + var args = new TCLIService_GetTypeInfo_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.GetTypeInfo.length === 1) { + Q.fcall(this._handler.GetTypeInfo.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_GetTypeInfo_result({success: result}); + output.writeMessageBegin("GetTypeInfo", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetTypeInfo", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.GetTypeInfo(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_GetTypeInfo_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("GetTypeInfo", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetTypeInfo", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +}; +TCLIServiceProcessor.prototype.process_GetCatalogs = function(seqid, input, output) { + var args = new TCLIService_GetCatalogs_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.GetCatalogs.length === 1) { + Q.fcall(this._handler.GetCatalogs.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_GetCatalogs_result({success: result}); + output.writeMessageBegin("GetCatalogs", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetCatalogs", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.GetCatalogs(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_GetCatalogs_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("GetCatalogs", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetCatalogs", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +}; +TCLIServiceProcessor.prototype.process_GetSchemas = function(seqid, input, output) { + var args = new TCLIService_GetSchemas_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.GetSchemas.length === 1) { + Q.fcall(this._handler.GetSchemas.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_GetSchemas_result({success: result}); + output.writeMessageBegin("GetSchemas", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetSchemas", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.GetSchemas(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_GetSchemas_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("GetSchemas", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetSchemas", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +}; +TCLIServiceProcessor.prototype.process_GetTables = function(seqid, input, output) { + var args = new TCLIService_GetTables_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.GetTables.length === 1) { + Q.fcall(this._handler.GetTables.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_GetTables_result({success: result}); + output.writeMessageBegin("GetTables", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetTables", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.GetTables(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_GetTables_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("GetTables", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetTables", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +}; +TCLIServiceProcessor.prototype.process_GetTableTypes = function(seqid, input, output) { + var args = new TCLIService_GetTableTypes_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.GetTableTypes.length === 1) { + Q.fcall(this._handler.GetTableTypes.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_GetTableTypes_result({success: result}); + output.writeMessageBegin("GetTableTypes", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetTableTypes", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.GetTableTypes(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_GetTableTypes_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("GetTableTypes", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetTableTypes", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +}; +TCLIServiceProcessor.prototype.process_GetColumns = function(seqid, input, output) { + var args = new TCLIService_GetColumns_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.GetColumns.length === 1) { + Q.fcall(this._handler.GetColumns.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_GetColumns_result({success: result}); + output.writeMessageBegin("GetColumns", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetColumns", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.GetColumns(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_GetColumns_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("GetColumns", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetColumns", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +}; +TCLIServiceProcessor.prototype.process_GetFunctions = function(seqid, input, output) { + var args = new TCLIService_GetFunctions_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.GetFunctions.length === 1) { + Q.fcall(this._handler.GetFunctions.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_GetFunctions_result({success: result}); + output.writeMessageBegin("GetFunctions", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetFunctions", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.GetFunctions(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_GetFunctions_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("GetFunctions", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetFunctions", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +}; +TCLIServiceProcessor.prototype.process_GetPrimaryKeys = function(seqid, input, output) { + var args = new TCLIService_GetPrimaryKeys_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.GetPrimaryKeys.length === 1) { + Q.fcall(this._handler.GetPrimaryKeys.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_GetPrimaryKeys_result({success: result}); + output.writeMessageBegin("GetPrimaryKeys", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetPrimaryKeys", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.GetPrimaryKeys(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_GetPrimaryKeys_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("GetPrimaryKeys", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetPrimaryKeys", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +}; +TCLIServiceProcessor.prototype.process_GetCrossReference = function(seqid, input, output) { + var args = new TCLIService_GetCrossReference_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.GetCrossReference.length === 1) { + Q.fcall(this._handler.GetCrossReference.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_GetCrossReference_result({success: result}); + output.writeMessageBegin("GetCrossReference", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetCrossReference", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.GetCrossReference(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_GetCrossReference_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("GetCrossReference", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetCrossReference", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +}; +TCLIServiceProcessor.prototype.process_GetOperationStatus = function(seqid, input, output) { + var args = new TCLIService_GetOperationStatus_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.GetOperationStatus.length === 1) { + Q.fcall(this._handler.GetOperationStatus.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_GetOperationStatus_result({success: result}); + output.writeMessageBegin("GetOperationStatus", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetOperationStatus", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.GetOperationStatus(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_GetOperationStatus_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("GetOperationStatus", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetOperationStatus", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +}; +TCLIServiceProcessor.prototype.process_CancelOperation = function(seqid, input, output) { + var args = new TCLIService_CancelOperation_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.CancelOperation.length === 1) { + Q.fcall(this._handler.CancelOperation.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_CancelOperation_result({success: result}); + output.writeMessageBegin("CancelOperation", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("CancelOperation", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.CancelOperation(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_CancelOperation_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("CancelOperation", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("CancelOperation", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +}; +TCLIServiceProcessor.prototype.process_CloseOperation = function(seqid, input, output) { + var args = new TCLIService_CloseOperation_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.CloseOperation.length === 1) { + Q.fcall(this._handler.CloseOperation.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_CloseOperation_result({success: result}); + output.writeMessageBegin("CloseOperation", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("CloseOperation", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.CloseOperation(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_CloseOperation_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("CloseOperation", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("CloseOperation", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +}; +TCLIServiceProcessor.prototype.process_GetResultSetMetadata = function(seqid, input, output) { + var args = new TCLIService_GetResultSetMetadata_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.GetResultSetMetadata.length === 1) { + Q.fcall(this._handler.GetResultSetMetadata.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_GetResultSetMetadata_result({success: result}); + output.writeMessageBegin("GetResultSetMetadata", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetResultSetMetadata", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.GetResultSetMetadata(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_GetResultSetMetadata_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("GetResultSetMetadata", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetResultSetMetadata", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +}; +TCLIServiceProcessor.prototype.process_FetchResults = function(seqid, input, output) { + var args = new TCLIService_FetchResults_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.FetchResults.length === 1) { + Q.fcall(this._handler.FetchResults.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_FetchResults_result({success: result}); + output.writeMessageBegin("FetchResults", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("FetchResults", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.FetchResults(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_FetchResults_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("FetchResults", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("FetchResults", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +}; +TCLIServiceProcessor.prototype.process_GetDelegationToken = function(seqid, input, output) { + var args = new TCLIService_GetDelegationToken_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.GetDelegationToken.length === 1) { + Q.fcall(this._handler.GetDelegationToken.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_GetDelegationToken_result({success: result}); + output.writeMessageBegin("GetDelegationToken", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetDelegationToken", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.GetDelegationToken(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_GetDelegationToken_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("GetDelegationToken", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("GetDelegationToken", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +}; +TCLIServiceProcessor.prototype.process_CancelDelegationToken = function(seqid, input, output) { + var args = new TCLIService_CancelDelegationToken_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.CancelDelegationToken.length === 1) { + Q.fcall(this._handler.CancelDelegationToken.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_CancelDelegationToken_result({success: result}); + output.writeMessageBegin("CancelDelegationToken", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("CancelDelegationToken", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.CancelDelegationToken(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_CancelDelegationToken_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("CancelDelegationToken", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("CancelDelegationToken", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +}; +TCLIServiceProcessor.prototype.process_RenewDelegationToken = function(seqid, input, output) { + var args = new TCLIService_RenewDelegationToken_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.RenewDelegationToken.length === 1) { + Q.fcall(this._handler.RenewDelegationToken.bind(this._handler), + args.req + ).then(function(result) { + var result_obj = new TCLIService_RenewDelegationToken_result({success: result}); + output.writeMessageBegin("RenewDelegationToken", Thrift.MessageType.REPLY, seqid); + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }).catch(function (err) { + var result; + result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("RenewDelegationToken", Thrift.MessageType.EXCEPTION, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.RenewDelegationToken(args.req, function (err, result) { + var result_obj; + if ((err === null || typeof err === 'undefined')) { + result_obj = new TCLIService_RenewDelegationToken_result((err !== null || typeof err === 'undefined') ? err : {success: result}); + output.writeMessageBegin("RenewDelegationToken", Thrift.MessageType.REPLY, seqid); + } else { + result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("RenewDelegationToken", Thrift.MessageType.EXCEPTION, seqid); + } + result_obj.write(output); + output.writeMessageEnd(); + output.flush(); + }); } - throw 'RenewDelegationToken failed: unknown result'; }; diff --git a/thrift/TCLIService_types.d.ts b/thrift/TCLIService_types.d.ts index 11692e7a..abf7f8de 100644 --- a/thrift/TCLIService_types.d.ts +++ b/thrift/TCLIService_types.d.ts @@ -3,10 +3,13 @@ // // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING // +import thrift = require('thrift'); +import Thrift = thrift.Thrift; +import Q = thrift.Q; import Int64 = require('node-int64'); -export declare enum TProtocolVersion { +declare enum TProtocolVersion { __HIVE_JDBC_WORKAROUND = -7, __TEST_PROTOCOL_VERSION = 65281, HIVE_CLI_SERVICE_PROTOCOL_V1 = 0, @@ -28,7 +31,7 @@ export declare enum TProtocolVersion { SPARK_CLI_SERVICE_PROTOCOL_V7 = 42247, } -export declare enum TTypeId { +declare enum TTypeId { BOOLEAN_TYPE = 0, TINYINT_TYPE = 1, SMALLINT_TYPE = 2, @@ -53,36 +56,36 @@ export declare enum TTypeId { INTERVAL_DAY_TIME_TYPE = 21, } -export declare enum TSparkRowSetType { +declare enum TSparkRowSetType { ARROW_BASED_SET = 0, COLUMN_BASED_SET = 1, ROW_BASED_SET = 2, URL_BASED_SET = 3, } -export declare enum TDBSqlCompressionCodec { +declare enum TDBSqlCompressionCodec { NONE = 0, LZ4_FRAME = 1, LZ4_BLOCK = 2, } -export declare enum TDBSqlArrowLayout { +declare enum TDBSqlArrowLayout { ARROW_BATCH = 0, ARROW_STREAMING = 1, } -export declare enum TOperationIdempotencyType { +declare enum TOperationIdempotencyType { UNKNOWN = 0, NON_IDEMPOTENT = 1, IDEMPOTENT = 2, } -export declare enum TOperationTimeoutLevel { +declare enum TOperationTimeoutLevel { CLUSTER = 0, SESSION = 1, } -export declare enum TStatusCode { +declare enum TStatusCode { SUCCESS_STATUS = 0, SUCCESS_WITH_INFO_STATUS = 1, STILL_EXECUTING_STATUS = 2, @@ -90,7 +93,7 @@ export declare enum TStatusCode { INVALID_HANDLE_STATUS = 4, } -export declare enum TOperationState { +declare enum TOperationState { INITIALIZED_STATE = 0, RUNNING_STATE = 1, FINISHED_STATE = 2, @@ -102,7 +105,7 @@ export declare enum TOperationState { TIMEDOUT_STATE = 8, } -export declare enum TOperationType { +declare enum TOperationType { EXECUTE_STATEMENT = 0, GET_TYPE_INFO = 1, GET_CATALOGS = 2, @@ -114,7 +117,7 @@ export declare enum TOperationType { UNKNOWN = 8, } -export declare enum TGetInfoType { +declare enum TGetInfoType { CLI_MAX_DRIVER_CONNECTIONS = 0, CLI_MAX_CONCURRENT_ACTIVITIES = 1, CLI_DATA_SOURCE_NAME = 2, @@ -164,20 +167,20 @@ export declare enum TGetInfoType { CLI_MAX_IDENTIFIER_LEN = 10005, } -export declare enum TResultPersistenceMode { +declare enum TResultPersistenceMode { ONLY_LARGE_RESULTS = 0, ALL_QUERY_RESULTS = 1, ALL_RESULTS = 2, } -export declare enum TCacheLookupResult { +declare enum TCacheLookupResult { CACHE_INELIGIBLE = 0, LOCAL_CACHE_HIT = 1, REMOTE_CACHE_HIT = 2, CACHE_MISS = 3, } -export declare enum TCloudFetchDisabledReason { +declare enum TCloudFetchDisabledReason { ARROW_SUPPORT = 0, CLOUD_FETCH_SUPPORT = 1, PROTOCOL_VERSION = 2, @@ -188,11 +191,11 @@ export declare enum TCloudFetchDisabledReason { UNKNOWN = 7, } -export declare enum TDBSqlManifestFileFormat { +declare enum TDBSqlManifestFileFormat { THRIFT_GET_RESULT_SET_METADATA_RESP = 0, } -export declare enum TFetchOrientation { +declare enum TFetchOrientation { FETCH_NEXT = 0, FETCH_PRIOR = 1, FETCH_RELATIVE = 2, @@ -201,936 +204,936 @@ export declare enum TFetchOrientation { FETCH_LAST = 5, } -export declare enum TDBSqlFetchDisposition { +declare enum TDBSqlFetchDisposition { DISPOSITION_UNSPECIFIED = 0, DISPOSITION_INLINE = 1, DISPOSITION_EXTERNAL_LINKS = 2, DISPOSITION_INTERNAL_DBFS = 3, } -export declare enum TJobExecutionStatus { +declare enum TJobExecutionStatus { IN_PROGRESS = 0, COMPLETE = 1, NOT_AVAILABLE = 2, } -export declare class TTypeQualifierValue { - i32Value?: number; - stringValue?: string; +declare class TTypeQualifierValue { + public i32Value?: number; + public stringValue?: string; constructor(args?: { i32Value?: number; stringValue?: string; }); } -export declare class TTypeQualifiers { - qualifiers: { [k: string]: TTypeQualifierValue; }; +declare class TTypeQualifiers { + public qualifiers: { [k: string]: TTypeQualifierValue; }; constructor(args?: { qualifiers: { [k: string]: TTypeQualifierValue; }; }); } -export declare class TPrimitiveTypeEntry { - type: TTypeId; - typeQualifiers?: TTypeQualifiers; +declare class TPrimitiveTypeEntry { + public type: TTypeId; + public typeQualifiers?: TTypeQualifiers; constructor(args?: { type: TTypeId; typeQualifiers?: TTypeQualifiers; }); } -export declare class TArrayTypeEntry { - objectTypePtr: number; +declare class TArrayTypeEntry { + public objectTypePtr: number; constructor(args?: { objectTypePtr: number; }); } -export declare class TMapTypeEntry { - keyTypePtr: number; - valueTypePtr: number; +declare class TMapTypeEntry { + public keyTypePtr: number; + public valueTypePtr: number; constructor(args?: { keyTypePtr: number; valueTypePtr: number; }); } -export declare class TStructTypeEntry { - nameToTypePtr: { [k: string]: number; }; +declare class TStructTypeEntry { + public nameToTypePtr: { [k: string]: number; }; constructor(args?: { nameToTypePtr: { [k: string]: number; }; }); } -export declare class TUnionTypeEntry { - nameToTypePtr: { [k: string]: number; }; +declare class TUnionTypeEntry { + public nameToTypePtr: { [k: string]: number; }; constructor(args?: { nameToTypePtr: { [k: string]: number; }; }); } -export declare class TUserDefinedTypeEntry { - typeClassName: string; +declare class TUserDefinedTypeEntry { + public typeClassName: string; constructor(args?: { typeClassName: string; }); } -export declare class TTypeEntry { - primitiveEntry?: TPrimitiveTypeEntry; - arrayEntry?: TArrayTypeEntry; - mapEntry?: TMapTypeEntry; - structEntry?: TStructTypeEntry; - unionEntry?: TUnionTypeEntry; - userDefinedTypeEntry?: TUserDefinedTypeEntry; +declare class TTypeEntry { + public primitiveEntry?: TPrimitiveTypeEntry; + public arrayEntry?: TArrayTypeEntry; + public mapEntry?: TMapTypeEntry; + public structEntry?: TStructTypeEntry; + public unionEntry?: TUnionTypeEntry; + public userDefinedTypeEntry?: TUserDefinedTypeEntry; constructor(args?: { primitiveEntry?: TPrimitiveTypeEntry; arrayEntry?: TArrayTypeEntry; mapEntry?: TMapTypeEntry; structEntry?: TStructTypeEntry; unionEntry?: TUnionTypeEntry; userDefinedTypeEntry?: TUserDefinedTypeEntry; }); } -export declare class TTypeDesc { - types: TTypeEntry[]; +declare class TTypeDesc { + public types: TTypeEntry[]; constructor(args?: { types: TTypeEntry[]; }); } -export declare class TColumnDesc { - columnName: string; - typeDesc: TTypeDesc; - position: number; - comment?: string; +declare class TColumnDesc { + public columnName: string; + public typeDesc: TTypeDesc; + public position: number; + public comment?: string; constructor(args?: { columnName: string; typeDesc: TTypeDesc; position: number; comment?: string; }); } -export declare class TTableSchema { - columns: TColumnDesc[]; +declare class TTableSchema { + public columns: TColumnDesc[]; constructor(args?: { columns: TColumnDesc[]; }); } -export declare class TBoolValue { - value?: boolean; +declare class TBoolValue { + public value?: boolean; constructor(args?: { value?: boolean; }); } -export declare class TByteValue { - value?: any; +declare class TByteValue { + public value?: any; constructor(args?: { value?: any; }); } -export declare class TI16Value { - value?: number; +declare class TI16Value { + public value?: number; constructor(args?: { value?: number; }); } -export declare class TI32Value { - value?: number; +declare class TI32Value { + public value?: number; constructor(args?: { value?: number; }); } -export declare class TI64Value { - value?: Int64; +declare class TI64Value { + public value?: Int64; constructor(args?: { value?: Int64; }); } -export declare class TDoubleValue { - value?: number; +declare class TDoubleValue { + public value?: number; constructor(args?: { value?: number; }); } -export declare class TStringValue { - value?: string; +declare class TStringValue { + public value?: string; constructor(args?: { value?: string; }); } -export declare class TColumnValue { - boolVal?: TBoolValue; - byteVal?: TByteValue; - i16Val?: TI16Value; - i32Val?: TI32Value; - i64Val?: TI64Value; - doubleVal?: TDoubleValue; - stringVal?: TStringValue; +declare class TColumnValue { + public boolVal?: TBoolValue; + public byteVal?: TByteValue; + public i16Val?: TI16Value; + public i32Val?: TI32Value; + public i64Val?: TI64Value; + public doubleVal?: TDoubleValue; + public stringVal?: TStringValue; constructor(args?: { boolVal?: TBoolValue; byteVal?: TByteValue; i16Val?: TI16Value; i32Val?: TI32Value; i64Val?: TI64Value; doubleVal?: TDoubleValue; stringVal?: TStringValue; }); } -export declare class TRow { - colVals: TColumnValue[]; +declare class TRow { + public colVals: TColumnValue[]; constructor(args?: { colVals: TColumnValue[]; }); } -export declare class TBoolColumn { - values: boolean[]; - nulls: Buffer; +declare class TBoolColumn { + public values: boolean[]; + public nulls: Buffer; constructor(args?: { values: boolean[]; nulls: Buffer; }); } -export declare class TByteColumn { - values: any[]; - nulls: Buffer; +declare class TByteColumn { + public values: any[]; + public nulls: Buffer; constructor(args?: { values: any[]; nulls: Buffer; }); } -export declare class TI16Column { - values: number[]; - nulls: Buffer; +declare class TI16Column { + public values: number[]; + public nulls: Buffer; constructor(args?: { values: number[]; nulls: Buffer; }); } -export declare class TI32Column { - values: number[]; - nulls: Buffer; +declare class TI32Column { + public values: number[]; + public nulls: Buffer; constructor(args?: { values: number[]; nulls: Buffer; }); } -export declare class TI64Column { - values: Int64[]; - nulls: Buffer; +declare class TI64Column { + public values: Int64[]; + public nulls: Buffer; constructor(args?: { values: Int64[]; nulls: Buffer; }); } -export declare class TDoubleColumn { - values: number[]; - nulls: Buffer; +declare class TDoubleColumn { + public values: number[]; + public nulls: Buffer; constructor(args?: { values: number[]; nulls: Buffer; }); } -export declare class TStringColumn { - values: string[]; - nulls: Buffer; +declare class TStringColumn { + public values: string[]; + public nulls: Buffer; constructor(args?: { values: string[]; nulls: Buffer; }); } -export declare class TBinaryColumn { - values: Buffer[]; - nulls: Buffer; +declare class TBinaryColumn { + public values: Buffer[]; + public nulls: Buffer; constructor(args?: { values: Buffer[]; nulls: Buffer; }); } -export declare class TColumn { - boolVal?: TBoolColumn; - byteVal?: TByteColumn; - i16Val?: TI16Column; - i32Val?: TI32Column; - i64Val?: TI64Column; - doubleVal?: TDoubleColumn; - stringVal?: TStringColumn; - binaryVal?: TBinaryColumn; +declare class TColumn { + public boolVal?: TBoolColumn; + public byteVal?: TByteColumn; + public i16Val?: TI16Column; + public i32Val?: TI32Column; + public i64Val?: TI64Column; + public doubleVal?: TDoubleColumn; + public stringVal?: TStringColumn; + public binaryVal?: TBinaryColumn; constructor(args?: { boolVal?: TBoolColumn; byteVal?: TByteColumn; i16Val?: TI16Column; i32Val?: TI32Column; i64Val?: TI64Column; doubleVal?: TDoubleColumn; stringVal?: TStringColumn; binaryVal?: TBinaryColumn; }); } -export declare class TDBSqlJsonArrayFormat { - compressionCodec?: TDBSqlCompressionCodec; +declare class TDBSqlJsonArrayFormat { + public compressionCodec?: TDBSqlCompressionCodec; constructor(args?: { compressionCodec?: TDBSqlCompressionCodec; }); } -export declare class TDBSqlCsvFormat { - compressionCodec?: TDBSqlCompressionCodec; +declare class TDBSqlCsvFormat { + public compressionCodec?: TDBSqlCompressionCodec; constructor(args?: { compressionCodec?: TDBSqlCompressionCodec; }); } -export declare class TDBSqlArrowFormat { - arrowLayout?: TDBSqlArrowLayout; - compressionCodec?: TDBSqlCompressionCodec; +declare class TDBSqlArrowFormat { + public arrowLayout?: TDBSqlArrowLayout; + public compressionCodec?: TDBSqlCompressionCodec; constructor(args?: { arrowLayout?: TDBSqlArrowLayout; compressionCodec?: TDBSqlCompressionCodec; }); } -export declare class TDBSqlResultFormat { - arrowFormat?: TDBSqlArrowFormat; - csvFormat?: TDBSqlCsvFormat; - jsonArrayFormat?: TDBSqlJsonArrayFormat; +declare class TDBSqlResultFormat { + public arrowFormat?: TDBSqlArrowFormat; + public csvFormat?: TDBSqlCsvFormat; + public jsonArrayFormat?: TDBSqlJsonArrayFormat; constructor(args?: { arrowFormat?: TDBSqlArrowFormat; csvFormat?: TDBSqlCsvFormat; jsonArrayFormat?: TDBSqlJsonArrayFormat; }); } -export declare class TSparkArrowBatch { - batch: Buffer; - rowCount: Int64; +declare class TSparkArrowBatch { + public batch: Buffer; + public rowCount: Int64; constructor(args?: { batch: Buffer; rowCount: Int64; }); } -export declare class TSparkArrowResultLink { - fileLink: string; - expiryTime: Int64; - startRowOffset: Int64; - rowCount: Int64; - bytesNum: Int64; - httpHeaders?: { [k: string]: string; }; +declare class TSparkArrowResultLink { + public fileLink: string; + public expiryTime: Int64; + public startRowOffset: Int64; + public rowCount: Int64; + public bytesNum: Int64; + public httpHeaders?: { [k: string]: string; }; constructor(args?: { fileLink: string; expiryTime: Int64; startRowOffset: Int64; rowCount: Int64; bytesNum: Int64; httpHeaders?: { [k: string]: string; }; }); } -export declare class TDBSqlCloudResultFile { - filePath?: string; - startRowOffset?: Int64; - rowCount?: Int64; - uncompressedBytes?: Int64; - compressedBytes?: Int64; - fileLink?: string; - linkExpiryTime?: Int64; - httpHeaders?: { [k: string]: string; }; +declare class TDBSqlCloudResultFile { + public filePath?: string; + public startRowOffset?: Int64; + public rowCount?: Int64; + public uncompressedBytes?: Int64; + public compressedBytes?: Int64; + public fileLink?: string; + public linkExpiryTime?: Int64; + public httpHeaders?: { [k: string]: string; }; constructor(args?: { filePath?: string; startRowOffset?: Int64; rowCount?: Int64; uncompressedBytes?: Int64; compressedBytes?: Int64; fileLink?: string; linkExpiryTime?: Int64; httpHeaders?: { [k: string]: string; }; }); } -export declare class TRowSet { - startRowOffset: Int64; - rows: TRow[]; - columns?: TColumn[]; - binaryColumns?: Buffer; - columnCount?: number; - arrowBatches?: TSparkArrowBatch[]; - resultLinks?: TSparkArrowResultLink[]; - cloudFetchResults?: TDBSqlCloudResultFile[]; +declare class TRowSet { + public startRowOffset: Int64; + public rows: TRow[]; + public columns?: TColumn[]; + public binaryColumns?: Buffer; + public columnCount?: number; + public arrowBatches?: TSparkArrowBatch[]; + public resultLinks?: TSparkArrowResultLink[]; + public cloudFetchResults?: TDBSqlCloudResultFile[]; constructor(args?: { startRowOffset: Int64; rows: TRow[]; columns?: TColumn[]; binaryColumns?: Buffer; columnCount?: number; arrowBatches?: TSparkArrowBatch[]; resultLinks?: TSparkArrowResultLink[]; cloudFetchResults?: TDBSqlCloudResultFile[]; }); } -export declare class TDBSqlTempView { - name?: string; - sqlStatement?: string; - properties?: { [k: string]: string; }; - viewSchema?: string; +declare class TDBSqlTempView { + public name?: string; + public sqlStatement?: string; + public properties?: { [k: string]: string; }; + public viewSchema?: string; constructor(args?: { name?: string; sqlStatement?: string; properties?: { [k: string]: string; }; viewSchema?: string; }); } -export declare class TDBSqlSessionCapabilities { - supportsMultipleCatalogs?: boolean; +declare class TDBSqlSessionCapabilities { + public supportsMultipleCatalogs?: boolean; constructor(args?: { supportsMultipleCatalogs?: boolean; }); } -export declare class TExpressionInfo { - className?: string; - usage?: string; - name?: string; - extended?: string; - db?: string; - arguments?: string; - examples?: string; - note?: string; - group?: string; - since?: string; - deprecated?: string; - source?: string; +declare class TExpressionInfo { + public className?: string; + public usage?: string; + public name?: string; + public extended?: string; + public db?: string; + public arguments?: string; + public examples?: string; + public note?: string; + public group?: string; + public since?: string; + public deprecated?: string; + public source?: string; constructor(args?: { className?: string; usage?: string; name?: string; extended?: string; db?: string; arguments?: string; examples?: string; note?: string; group?: string; since?: string; deprecated?: string; source?: string; }); } -export declare class TDBSqlConfValue { - value?: string; +declare class TDBSqlConfValue { + public value?: string; constructor(args?: { value?: string; }); } -export declare class TDBSqlSessionConf { - confs?: { [k: string]: string; }; - tempViews?: TDBSqlTempView[]; - currentDatabase?: string; - currentCatalog?: string; - sessionCapabilities?: TDBSqlSessionCapabilities; - expressionsInfos?: TExpressionInfo[]; - internalConfs?: { [k: string]: TDBSqlConfValue; }; +declare class TDBSqlSessionConf { + public confs?: { [k: string]: string; }; + public tempViews?: TDBSqlTempView[]; + public currentDatabase?: string; + public currentCatalog?: string; + public sessionCapabilities?: TDBSqlSessionCapabilities; + public expressionsInfos?: TExpressionInfo[]; + public internalConfs?: { [k: string]: TDBSqlConfValue; }; constructor(args?: { confs?: { [k: string]: string; }; tempViews?: TDBSqlTempView[]; currentDatabase?: string; currentCatalog?: string; sessionCapabilities?: TDBSqlSessionCapabilities; expressionsInfos?: TExpressionInfo[]; internalConfs?: { [k: string]: TDBSqlConfValue; }; }); } -export declare class TStatus { - statusCode: TStatusCode; - infoMessages?: string[]; - sqlState?: string; - errorCode?: number; - errorMessage?: string; - displayMessage?: string; - errorDetailsJson?: string; - responseValidation?: Buffer; +declare class TStatus { + public statusCode: TStatusCode; + public infoMessages?: string[]; + public sqlState?: string; + public errorCode?: number; + public errorMessage?: string; + public displayMessage?: string; + public errorDetailsJson?: string; + public responseValidation?: Buffer; constructor(args?: { statusCode: TStatusCode; infoMessages?: string[]; sqlState?: string; errorCode?: number; errorMessage?: string; displayMessage?: string; errorDetailsJson?: string; responseValidation?: Buffer; }); } -export declare class TNamespace { - catalogName?: string; - schemaName?: string; +declare class TNamespace { + public catalogName?: string; + public schemaName?: string; constructor(args?: { catalogName?: string; schemaName?: string; }); } -export declare class THandleIdentifier { - guid: Buffer; - secret: Buffer; - executionVersion?: number; +declare class THandleIdentifier { + public guid: Buffer; + public secret: Buffer; + public executionVersion?: number; constructor(args?: { guid: Buffer; secret: Buffer; executionVersion?: number; }); } -export declare class TSessionHandle { - sessionId: THandleIdentifier; - serverProtocolVersion?: TProtocolVersion; +declare class TSessionHandle { + public sessionId: THandleIdentifier; + public serverProtocolVersion?: TProtocolVersion; constructor(args?: { sessionId: THandleIdentifier; serverProtocolVersion?: TProtocolVersion; }); } -export declare class TOperationHandle { - operationId: THandleIdentifier; - operationType: TOperationType; - hasResultSet: boolean; - modifiedRowCount?: number; +declare class TOperationHandle { + public operationId: THandleIdentifier; + public operationType: TOperationType; + public hasResultSet: boolean; + public modifiedRowCount?: number; constructor(args?: { operationId: THandleIdentifier; operationType: TOperationType; hasResultSet: boolean; modifiedRowCount?: number; }); } -export declare class TOpenSessionReq { - client_protocol?: TProtocolVersion; - username?: string; - password?: string; - configuration?: { [k: string]: string; }; - getInfos?: TGetInfoType[]; - client_protocol_i64?: Int64; - connectionProperties?: { [k: string]: string; }; - initialNamespace?: TNamespace; - canUseMultipleCatalogs?: boolean; - sessionId?: THandleIdentifier; +declare class TOpenSessionReq { + public client_protocol?: TProtocolVersion; + public username?: string; + public password?: string; + public configuration?: { [k: string]: string; }; + public getInfos?: TGetInfoType[]; + public client_protocol_i64?: Int64; + public connectionProperties?: { [k: string]: string; }; + public initialNamespace?: TNamespace; + public canUseMultipleCatalogs?: boolean; + public sessionId?: THandleIdentifier; constructor(args?: { client_protocol?: TProtocolVersion; username?: string; password?: string; configuration?: { [k: string]: string; }; getInfos?: TGetInfoType[]; client_protocol_i64?: Int64; connectionProperties?: { [k: string]: string; }; initialNamespace?: TNamespace; canUseMultipleCatalogs?: boolean; sessionId?: THandleIdentifier; }); } -export declare class TOpenSessionResp { - status: TStatus; - serverProtocolVersion: TProtocolVersion; - sessionHandle?: TSessionHandle; - configuration?: { [k: string]: string; }; - initialNamespace?: TNamespace; - canUseMultipleCatalogs?: boolean; - getInfos?: TGetInfoValue[]; +declare class TOpenSessionResp { + public status: TStatus; + public serverProtocolVersion: TProtocolVersion; + public sessionHandle?: TSessionHandle; + public configuration?: { [k: string]: string; }; + public initialNamespace?: TNamespace; + public canUseMultipleCatalogs?: boolean; + public getInfos?: TGetInfoValue[]; constructor(args?: { status: TStatus; serverProtocolVersion: TProtocolVersion; sessionHandle?: TSessionHandle; configuration?: { [k: string]: string; }; initialNamespace?: TNamespace; canUseMultipleCatalogs?: boolean; getInfos?: TGetInfoValue[]; }); } -export declare class TCloseSessionReq { - sessionHandle: TSessionHandle; +declare class TCloseSessionReq { + public sessionHandle: TSessionHandle; constructor(args?: { sessionHandle: TSessionHandle; }); } -export declare class TCloseSessionResp { - status: TStatus; +declare class TCloseSessionResp { + public status: TStatus; constructor(args?: { status: TStatus; }); } -export declare class TGetInfoValue { - stringValue?: string; - smallIntValue?: number; - integerBitmask?: number; - integerFlag?: number; - binaryValue?: number; - lenValue?: Int64; +declare class TGetInfoValue { + public stringValue?: string; + public smallIntValue?: number; + public integerBitmask?: number; + public integerFlag?: number; + public binaryValue?: number; + public lenValue?: Int64; constructor(args?: { stringValue?: string; smallIntValue?: number; integerBitmask?: number; integerFlag?: number; binaryValue?: number; lenValue?: Int64; }); } -export declare class TGetInfoReq { - sessionHandle: TSessionHandle; - infoType: TGetInfoType; - sessionConf?: TDBSqlSessionConf; +declare class TGetInfoReq { + public sessionHandle: TSessionHandle; + public infoType: TGetInfoType; + public sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; infoType: TGetInfoType; sessionConf?: TDBSqlSessionConf; }); } -export declare class TGetInfoResp { - status: TStatus; - infoValue: TGetInfoValue; +declare class TGetInfoResp { + public status: TStatus; + public infoValue: TGetInfoValue; constructor(args?: { status: TStatus; infoValue: TGetInfoValue; }); } -export declare class TSparkGetDirectResults { - maxRows: Int64; - maxBytes?: Int64; +declare class TSparkGetDirectResults { + public maxRows: Int64; + public maxBytes?: Int64; constructor(args?: { maxRows: Int64; maxBytes?: Int64; }); } -export declare class TSparkDirectResults { - operationStatus?: TGetOperationStatusResp; - resultSetMetadata?: TGetResultSetMetadataResp; - resultSet?: TFetchResultsResp; - closeOperation?: TCloseOperationResp; +declare class TSparkDirectResults { + public operationStatus?: TGetOperationStatusResp; + public resultSetMetadata?: TGetResultSetMetadataResp; + public resultSet?: TFetchResultsResp; + public closeOperation?: TCloseOperationResp; constructor(args?: { operationStatus?: TGetOperationStatusResp; resultSetMetadata?: TGetResultSetMetadataResp; resultSet?: TFetchResultsResp; closeOperation?: TCloseOperationResp; }); } -export declare class TSparkArrowTypes { - timestampAsArrow?: boolean; - decimalAsArrow?: boolean; - complexTypesAsArrow?: boolean; - intervalTypesAsArrow?: boolean; - nullTypeAsArrow?: boolean; +declare class TSparkArrowTypes { + public timestampAsArrow?: boolean; + public decimalAsArrow?: boolean; + public complexTypesAsArrow?: boolean; + public intervalTypesAsArrow?: boolean; + public nullTypeAsArrow?: boolean; constructor(args?: { timestampAsArrow?: boolean; decimalAsArrow?: boolean; complexTypesAsArrow?: boolean; intervalTypesAsArrow?: boolean; nullTypeAsArrow?: boolean; }); } -export declare class TExecuteStatementReq { - sessionHandle: TSessionHandle; - statement: string; - confOverlay?: { [k: string]: string; }; - runAsync?: boolean; - getDirectResults?: TSparkGetDirectResults; - queryTimeout?: Int64; - canReadArrowResult?: boolean; - canDownloadResult?: boolean; - canDecompressLZ4Result?: boolean; - maxBytesPerFile?: Int64; - useArrowNativeTypes?: TSparkArrowTypes; - resultRowLimit?: Int64; - parameters?: TSparkParameter[]; - maxBytesPerBatch?: Int64; - statementConf?: TStatementConf; - operationId?: THandleIdentifier; - sessionConf?: TDBSqlSessionConf; - rejectHighCostQueries?: boolean; - estimatedCost?: number; - executionVersion?: number; - requestValidation?: Buffer; - resultPersistenceMode?: TResultPersistenceMode; - trimArrowBatchesToLimit?: boolean; - fetchDisposition?: TDBSqlFetchDisposition; - enforceResultPersistenceMode?: boolean; - statementList?: TDBSqlStatement[]; - persistResultManifest?: boolean; - resultRetentionSeconds?: Int64; - resultByteLimit?: Int64; - resultDataFormat?: TDBSqlResultFormat; - originatingClientIdentity?: string; - preferSingleFileResult?: boolean; - preferDriverOnlyUpload?: boolean; - enforceEmbeddedSchemaCorrectness?: boolean; - idempotencyToken?: string; +declare class TExecuteStatementReq { + public sessionHandle: TSessionHandle; + public statement: string; + public confOverlay?: { [k: string]: string; }; + public runAsync?: boolean; + public getDirectResults?: TSparkGetDirectResults; + public queryTimeout?: Int64; + public canReadArrowResult?: boolean; + public canDownloadResult?: boolean; + public canDecompressLZ4Result?: boolean; + public maxBytesPerFile?: Int64; + public useArrowNativeTypes?: TSparkArrowTypes; + public resultRowLimit?: Int64; + public parameters?: TSparkParameter[]; + public maxBytesPerBatch?: Int64; + public statementConf?: TStatementConf; + public operationId?: THandleIdentifier; + public sessionConf?: TDBSqlSessionConf; + public rejectHighCostQueries?: boolean; + public estimatedCost?: number; + public executionVersion?: number; + public requestValidation?: Buffer; + public resultPersistenceMode?: TResultPersistenceMode; + public trimArrowBatchesToLimit?: boolean; + public fetchDisposition?: TDBSqlFetchDisposition; + public enforceResultPersistenceMode?: boolean; + public statementList?: TDBSqlStatement[]; + public persistResultManifest?: boolean; + public resultRetentionSeconds?: Int64; + public resultByteLimit?: Int64; + public resultDataFormat?: TDBSqlResultFormat; + public originatingClientIdentity?: string; + public preferSingleFileResult?: boolean; + public preferDriverOnlyUpload?: boolean; + public enforceEmbeddedSchemaCorrectness?: boolean; + public idempotencyToken?: string; constructor(args?: { sessionHandle: TSessionHandle; statement: string; confOverlay?: { [k: string]: string; }; runAsync?: boolean; getDirectResults?: TSparkGetDirectResults; queryTimeout?: Int64; canReadArrowResult?: boolean; canDownloadResult?: boolean; canDecompressLZ4Result?: boolean; maxBytesPerFile?: Int64; useArrowNativeTypes?: TSparkArrowTypes; resultRowLimit?: Int64; parameters?: TSparkParameter[]; maxBytesPerBatch?: Int64; statementConf?: TStatementConf; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; rejectHighCostQueries?: boolean; estimatedCost?: number; executionVersion?: number; requestValidation?: Buffer; resultPersistenceMode?: TResultPersistenceMode; trimArrowBatchesToLimit?: boolean; fetchDisposition?: TDBSqlFetchDisposition; enforceResultPersistenceMode?: boolean; statementList?: TDBSqlStatement[]; persistResultManifest?: boolean; resultRetentionSeconds?: Int64; resultByteLimit?: Int64; resultDataFormat?: TDBSqlResultFormat; originatingClientIdentity?: string; preferSingleFileResult?: boolean; preferDriverOnlyUpload?: boolean; enforceEmbeddedSchemaCorrectness?: boolean; idempotencyToken?: string; }); } -export declare class TDBSqlStatement { - statement?: string; +declare class TDBSqlStatement { + public statement?: string; constructor(args?: { statement?: string; }); } -export declare class TSparkParameterValue { - stringValue?: string; - doubleValue?: number; - booleanValue?: boolean; +declare class TSparkParameterValue { + public stringValue?: string; + public doubleValue?: number; + public booleanValue?: boolean; constructor(args?: { stringValue?: string; doubleValue?: number; booleanValue?: boolean; }); } -export declare class TSparkParameter { - ordinal?: number; - name?: string; - type?: string; - value?: TSparkParameterValue; +declare class TSparkParameter { + public ordinal?: number; + public name?: string; + public type?: string; + public value?: TSparkParameterValue; constructor(args?: { ordinal?: number; name?: string; type?: string; value?: TSparkParameterValue; }); } -export declare class TStatementConf { - sessionless?: boolean; - initialNamespace?: TNamespace; - client_protocol?: TProtocolVersion; - client_protocol_i64?: Int64; +declare class TStatementConf { + public sessionless?: boolean; + public initialNamespace?: TNamespace; + public client_protocol?: TProtocolVersion; + public client_protocol_i64?: Int64; constructor(args?: { sessionless?: boolean; initialNamespace?: TNamespace; client_protocol?: TProtocolVersion; client_protocol_i64?: Int64; }); } -export declare class TExecuteStatementResp { - status: TStatus; - operationHandle?: TOperationHandle; - directResults?: TSparkDirectResults; - executionRejected?: boolean; - maxClusterCapacity?: number; - queryCost?: number; - sessionConf?: TDBSqlSessionConf; - currentClusterLoad?: number; - idempotencyType?: TOperationIdempotencyType; - remoteResultCacheEnabled?: boolean; - isServerless?: boolean; - operationHandles?: TOperationHandle[]; +declare class TExecuteStatementResp { + public status: TStatus; + public operationHandle?: TOperationHandle; + public directResults?: TSparkDirectResults; + public executionRejected?: boolean; + public maxClusterCapacity?: number; + public queryCost?: number; + public sessionConf?: TDBSqlSessionConf; + public currentClusterLoad?: number; + public idempotencyType?: TOperationIdempotencyType; + public remoteResultCacheEnabled?: boolean; + public isServerless?: boolean; + public operationHandles?: TOperationHandle[]; constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; executionRejected?: boolean; maxClusterCapacity?: number; queryCost?: number; sessionConf?: TDBSqlSessionConf; currentClusterLoad?: number; idempotencyType?: TOperationIdempotencyType; remoteResultCacheEnabled?: boolean; isServerless?: boolean; operationHandles?: TOperationHandle[]; }); } -export declare class TGetTypeInfoReq { - sessionHandle: TSessionHandle; - getDirectResults?: TSparkGetDirectResults; - runAsync?: boolean; - operationId?: THandleIdentifier; - sessionConf?: TDBSqlSessionConf; +declare class TGetTypeInfoReq { + public sessionHandle: TSessionHandle; + public getDirectResults?: TSparkGetDirectResults; + public runAsync?: boolean; + public operationId?: THandleIdentifier; + public sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; getDirectResults?: TSparkGetDirectResults; runAsync?: boolean; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; }); } -export declare class TGetTypeInfoResp { - status: TStatus; - operationHandle?: TOperationHandle; - directResults?: TSparkDirectResults; +declare class TGetTypeInfoResp { + public status: TStatus; + public operationHandle?: TOperationHandle; + public directResults?: TSparkDirectResults; constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; }); } -export declare class TGetCatalogsReq { - sessionHandle: TSessionHandle; - getDirectResults?: TSparkGetDirectResults; - runAsync?: boolean; - operationId?: THandleIdentifier; - sessionConf?: TDBSqlSessionConf; +declare class TGetCatalogsReq { + public sessionHandle: TSessionHandle; + public getDirectResults?: TSparkGetDirectResults; + public runAsync?: boolean; + public operationId?: THandleIdentifier; + public sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; getDirectResults?: TSparkGetDirectResults; runAsync?: boolean; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; }); } -export declare class TGetCatalogsResp { - status: TStatus; - operationHandle?: TOperationHandle; - directResults?: TSparkDirectResults; +declare class TGetCatalogsResp { + public status: TStatus; + public operationHandle?: TOperationHandle; + public directResults?: TSparkDirectResults; constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; }); } -export declare class TGetSchemasReq { - sessionHandle: TSessionHandle; - catalogName?: string; - schemaName?: string; - getDirectResults?: TSparkGetDirectResults; - runAsync?: boolean; - operationId?: THandleIdentifier; - sessionConf?: TDBSqlSessionConf; +declare class TGetSchemasReq { + public sessionHandle: TSessionHandle; + public catalogName?: string; + public schemaName?: string; + public getDirectResults?: TSparkGetDirectResults; + public runAsync?: boolean; + public operationId?: THandleIdentifier; + public sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; catalogName?: string; schemaName?: string; getDirectResults?: TSparkGetDirectResults; runAsync?: boolean; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; }); } -export declare class TGetSchemasResp { - status: TStatus; - operationHandle?: TOperationHandle; - directResults?: TSparkDirectResults; +declare class TGetSchemasResp { + public status: TStatus; + public operationHandle?: TOperationHandle; + public directResults?: TSparkDirectResults; constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; }); } -export declare class TGetTablesReq { - sessionHandle: TSessionHandle; - catalogName?: string; - schemaName?: string; - tableName?: string; - tableTypes?: string[]; - getDirectResults?: TSparkGetDirectResults; - runAsync?: boolean; - operationId?: THandleIdentifier; - sessionConf?: TDBSqlSessionConf; +declare class TGetTablesReq { + public sessionHandle: TSessionHandle; + public catalogName?: string; + public schemaName?: string; + public tableName?: string; + public tableTypes?: string[]; + public getDirectResults?: TSparkGetDirectResults; + public runAsync?: boolean; + public operationId?: THandleIdentifier; + public sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; catalogName?: string; schemaName?: string; tableName?: string; tableTypes?: string[]; getDirectResults?: TSparkGetDirectResults; runAsync?: boolean; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; }); } -export declare class TGetTablesResp { - status: TStatus; - operationHandle?: TOperationHandle; - directResults?: TSparkDirectResults; +declare class TGetTablesResp { + public status: TStatus; + public operationHandle?: TOperationHandle; + public directResults?: TSparkDirectResults; constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; }); } -export declare class TGetTableTypesReq { - sessionHandle: TSessionHandle; - getDirectResults?: TSparkGetDirectResults; - runAsync?: boolean; - operationId?: THandleIdentifier; - sessionConf?: TDBSqlSessionConf; +declare class TGetTableTypesReq { + public sessionHandle: TSessionHandle; + public getDirectResults?: TSparkGetDirectResults; + public runAsync?: boolean; + public operationId?: THandleIdentifier; + public sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; getDirectResults?: TSparkGetDirectResults; runAsync?: boolean; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; }); } -export declare class TGetTableTypesResp { - status: TStatus; - operationHandle?: TOperationHandle; - directResults?: TSparkDirectResults; +declare class TGetTableTypesResp { + public status: TStatus; + public operationHandle?: TOperationHandle; + public directResults?: TSparkDirectResults; constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; }); } -export declare class TGetColumnsReq { - sessionHandle: TSessionHandle; - catalogName?: string; - schemaName?: string; - tableName?: string; - columnName?: string; - getDirectResults?: TSparkGetDirectResults; - runAsync?: boolean; - operationId?: THandleIdentifier; - sessionConf?: TDBSqlSessionConf; +declare class TGetColumnsReq { + public sessionHandle: TSessionHandle; + public catalogName?: string; + public schemaName?: string; + public tableName?: string; + public columnName?: string; + public getDirectResults?: TSparkGetDirectResults; + public runAsync?: boolean; + public operationId?: THandleIdentifier; + public sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; catalogName?: string; schemaName?: string; tableName?: string; columnName?: string; getDirectResults?: TSparkGetDirectResults; runAsync?: boolean; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; }); } -export declare class TGetColumnsResp { - status: TStatus; - operationHandle?: TOperationHandle; - directResults?: TSparkDirectResults; +declare class TGetColumnsResp { + public status: TStatus; + public operationHandle?: TOperationHandle; + public directResults?: TSparkDirectResults; constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; }); } -export declare class TGetFunctionsReq { - sessionHandle: TSessionHandle; - catalogName?: string; - schemaName?: string; - functionName: string; - getDirectResults?: TSparkGetDirectResults; - runAsync?: boolean; - operationId?: THandleIdentifier; - sessionConf?: TDBSqlSessionConf; +declare class TGetFunctionsReq { + public sessionHandle: TSessionHandle; + public catalogName?: string; + public schemaName?: string; + public functionName: string; + public getDirectResults?: TSparkGetDirectResults; + public runAsync?: boolean; + public operationId?: THandleIdentifier; + public sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; catalogName?: string; schemaName?: string; functionName: string; getDirectResults?: TSparkGetDirectResults; runAsync?: boolean; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; }); } -export declare class TGetFunctionsResp { - status: TStatus; - operationHandle?: TOperationHandle; - directResults?: TSparkDirectResults; +declare class TGetFunctionsResp { + public status: TStatus; + public operationHandle?: TOperationHandle; + public directResults?: TSparkDirectResults; constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; }); } -export declare class TGetPrimaryKeysReq { - sessionHandle: TSessionHandle; - catalogName?: string; - schemaName?: string; - tableName?: string; - getDirectResults?: TSparkGetDirectResults; - runAsync?: boolean; - operationId?: THandleIdentifier; - sessionConf?: TDBSqlSessionConf; +declare class TGetPrimaryKeysReq { + public sessionHandle: TSessionHandle; + public catalogName?: string; + public schemaName?: string; + public tableName?: string; + public getDirectResults?: TSparkGetDirectResults; + public runAsync?: boolean; + public operationId?: THandleIdentifier; + public sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; catalogName?: string; schemaName?: string; tableName?: string; getDirectResults?: TSparkGetDirectResults; runAsync?: boolean; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; }); } -export declare class TGetPrimaryKeysResp { - status: TStatus; - operationHandle?: TOperationHandle; - directResults?: TSparkDirectResults; +declare class TGetPrimaryKeysResp { + public status: TStatus; + public operationHandle?: TOperationHandle; + public directResults?: TSparkDirectResults; constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; }); } -export declare class TGetCrossReferenceReq { - sessionHandle: TSessionHandle; - parentCatalogName?: string; - parentSchemaName?: string; - parentTableName?: string; - foreignCatalogName?: string; - foreignSchemaName?: string; - foreignTableName?: string; - getDirectResults?: TSparkGetDirectResults; - runAsync?: boolean; - operationId?: THandleIdentifier; - sessionConf?: TDBSqlSessionConf; +declare class TGetCrossReferenceReq { + public sessionHandle: TSessionHandle; + public parentCatalogName?: string; + public parentSchemaName?: string; + public parentTableName?: string; + public foreignCatalogName?: string; + public foreignSchemaName?: string; + public foreignTableName?: string; + public getDirectResults?: TSparkGetDirectResults; + public runAsync?: boolean; + public operationId?: THandleIdentifier; + public sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; parentCatalogName?: string; parentSchemaName?: string; parentTableName?: string; foreignCatalogName?: string; foreignSchemaName?: string; foreignTableName?: string; getDirectResults?: TSparkGetDirectResults; runAsync?: boolean; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; }); } -export declare class TGetCrossReferenceResp { - status: TStatus; - operationHandle?: TOperationHandle; - directResults?: TSparkDirectResults; +declare class TGetCrossReferenceResp { + public status: TStatus; + public operationHandle?: TOperationHandle; + public directResults?: TSparkDirectResults; constructor(args?: { status: TStatus; operationHandle?: TOperationHandle; directResults?: TSparkDirectResults; }); } -export declare class TGetOperationStatusReq { - operationHandle: TOperationHandle; - getProgressUpdate?: boolean; +declare class TGetOperationStatusReq { + public operationHandle: TOperationHandle; + public getProgressUpdate?: boolean; constructor(args?: { operationHandle: TOperationHandle; getProgressUpdate?: boolean; }); } -export declare class TGetOperationStatusResp { - status: TStatus; - operationState?: TOperationState; - sqlState?: string; - errorCode?: number; - errorMessage?: string; - taskStatus?: string; - operationStarted?: Int64; - operationCompleted?: Int64; - hasResultSet?: boolean; - progressUpdateResponse?: TProgressUpdateResp; - numModifiedRows?: Int64; - displayMessage?: string; - diagnosticInfo?: string; - errorDetailsJson?: string; - responseValidation?: Buffer; - idempotencyType?: TOperationIdempotencyType; - statementTimeout?: Int64; - statementTimeoutLevel?: TOperationTimeoutLevel; +declare class TGetOperationStatusResp { + public status: TStatus; + public operationState?: TOperationState; + public sqlState?: string; + public errorCode?: number; + public errorMessage?: string; + public taskStatus?: string; + public operationStarted?: Int64; + public operationCompleted?: Int64; + public hasResultSet?: boolean; + public progressUpdateResponse?: TProgressUpdateResp; + public numModifiedRows?: Int64; + public displayMessage?: string; + public diagnosticInfo?: string; + public errorDetailsJson?: string; + public responseValidation?: Buffer; + public idempotencyType?: TOperationIdempotencyType; + public statementTimeout?: Int64; + public statementTimeoutLevel?: TOperationTimeoutLevel; constructor(args?: { status: TStatus; operationState?: TOperationState; sqlState?: string; errorCode?: number; errorMessage?: string; taskStatus?: string; operationStarted?: Int64; operationCompleted?: Int64; hasResultSet?: boolean; progressUpdateResponse?: TProgressUpdateResp; numModifiedRows?: Int64; displayMessage?: string; diagnosticInfo?: string; errorDetailsJson?: string; responseValidation?: Buffer; idempotencyType?: TOperationIdempotencyType; statementTimeout?: Int64; statementTimeoutLevel?: TOperationTimeoutLevel; }); } -export declare class TCancelOperationReq { - operationHandle: TOperationHandle; - executionVersion?: number; - replacedByNextAttempt?: boolean; +declare class TCancelOperationReq { + public operationHandle: TOperationHandle; + public executionVersion?: number; + public replacedByNextAttempt?: boolean; constructor(args?: { operationHandle: TOperationHandle; executionVersion?: number; replacedByNextAttempt?: boolean; }); } -export declare class TCancelOperationResp { - status: TStatus; +declare class TCancelOperationResp { + public status: TStatus; constructor(args?: { status: TStatus; }); } -export declare class TCloseOperationReq { - operationHandle: TOperationHandle; +declare class TCloseOperationReq { + public operationHandle: TOperationHandle; constructor(args?: { operationHandle: TOperationHandle; }); } -export declare class TCloseOperationResp { - status: TStatus; +declare class TCloseOperationResp { + public status: TStatus; constructor(args?: { status: TStatus; }); } -export declare class TGetResultSetMetadataReq { - operationHandle: TOperationHandle; - includeCloudResultFiles?: boolean; +declare class TGetResultSetMetadataReq { + public operationHandle: TOperationHandle; + public includeCloudResultFiles?: boolean; constructor(args?: { operationHandle: TOperationHandle; includeCloudResultFiles?: boolean; }); } -export declare class TGetResultSetMetadataResp { - status: TStatus; - schema?: TTableSchema; - resultFormat?: TSparkRowSetType; - lz4Compressed?: boolean; - arrowSchema?: Buffer; - cacheLookupResult?: TCacheLookupResult; - uncompressedBytes?: Int64; - compressedBytes?: Int64; - isStagingOperation?: boolean; - reasonForNoCloudFetch?: TCloudFetchDisabledReason; - resultFiles?: TDBSqlCloudResultFile[]; - manifestFile?: string; - manifestFileFormat?: TDBSqlManifestFileFormat; - cacheLookupLatency?: Int64; - remoteCacheMissReason?: string; - fetchDisposition?: TDBSqlFetchDisposition; - remoteResultCacheEnabled?: boolean; - isServerless?: boolean; - resultDataFormat?: TDBSqlResultFormat; - truncatedByThriftLimit?: boolean; - resultByteLimit?: Int64; +declare class TGetResultSetMetadataResp { + public status: TStatus; + public schema?: TTableSchema; + public resultFormat?: TSparkRowSetType; + public lz4Compressed?: boolean; + public arrowSchema?: Buffer; + public cacheLookupResult?: TCacheLookupResult; + public uncompressedBytes?: Int64; + public compressedBytes?: Int64; + public isStagingOperation?: boolean; + public reasonForNoCloudFetch?: TCloudFetchDisabledReason; + public resultFiles?: TDBSqlCloudResultFile[]; + public manifestFile?: string; + public manifestFileFormat?: TDBSqlManifestFileFormat; + public cacheLookupLatency?: Int64; + public remoteCacheMissReason?: string; + public fetchDisposition?: TDBSqlFetchDisposition; + public remoteResultCacheEnabled?: boolean; + public isServerless?: boolean; + public resultDataFormat?: TDBSqlResultFormat; + public truncatedByThriftLimit?: boolean; + public resultByteLimit?: Int64; constructor(args?: { status: TStatus; schema?: TTableSchema; resultFormat?: TSparkRowSetType; lz4Compressed?: boolean; arrowSchema?: Buffer; cacheLookupResult?: TCacheLookupResult; uncompressedBytes?: Int64; compressedBytes?: Int64; isStagingOperation?: boolean; reasonForNoCloudFetch?: TCloudFetchDisabledReason; resultFiles?: TDBSqlCloudResultFile[]; manifestFile?: string; manifestFileFormat?: TDBSqlManifestFileFormat; cacheLookupLatency?: Int64; remoteCacheMissReason?: string; fetchDisposition?: TDBSqlFetchDisposition; remoteResultCacheEnabled?: boolean; isServerless?: boolean; resultDataFormat?: TDBSqlResultFormat; truncatedByThriftLimit?: boolean; resultByteLimit?: Int64; }); } -export declare class TFetchResultsReq { - operationHandle: TOperationHandle; - orientation?: TFetchOrientation; - maxRows: Int64; - fetchType?: number; - maxBytes?: Int64; - startRowOffset?: Int64; - includeResultSetMetadata?: boolean; +declare class TFetchResultsReq { + public operationHandle: TOperationHandle; + public orientation?: TFetchOrientation; + public maxRows: Int64; + public fetchType?: number; + public maxBytes?: Int64; + public startRowOffset?: Int64; + public includeResultSetMetadata?: boolean; constructor(args?: { operationHandle: TOperationHandle; orientation?: TFetchOrientation; maxRows: Int64; fetchType?: number; maxBytes?: Int64; startRowOffset?: Int64; includeResultSetMetadata?: boolean; }); } -export declare class TFetchResultsResp { - status: TStatus; - hasMoreRows?: boolean; - results?: TRowSet; - resultSetMetadata?: TGetResultSetMetadataResp; - responseValidation?: Buffer; +declare class TFetchResultsResp { + public status: TStatus; + public hasMoreRows?: boolean; + public results?: TRowSet; + public resultSetMetadata?: TGetResultSetMetadataResp; + public responseValidation?: Buffer; constructor(args?: { status: TStatus; hasMoreRows?: boolean; results?: TRowSet; resultSetMetadata?: TGetResultSetMetadataResp; responseValidation?: Buffer; }); } -export declare class TGetDelegationTokenReq { - sessionHandle: TSessionHandle; - owner: string; - renewer: string; - sessionConf?: TDBSqlSessionConf; +declare class TGetDelegationTokenReq { + public sessionHandle: TSessionHandle; + public owner: string; + public renewer: string; + public sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; owner: string; renewer: string; sessionConf?: TDBSqlSessionConf; }); } -export declare class TGetDelegationTokenResp { - status: TStatus; - delegationToken?: string; +declare class TGetDelegationTokenResp { + public status: TStatus; + public delegationToken?: string; constructor(args?: { status: TStatus; delegationToken?: string; }); } -export declare class TCancelDelegationTokenReq { - sessionHandle: TSessionHandle; - delegationToken: string; - sessionConf?: TDBSqlSessionConf; +declare class TCancelDelegationTokenReq { + public sessionHandle: TSessionHandle; + public delegationToken: string; + public sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; delegationToken: string; sessionConf?: TDBSqlSessionConf; }); } -export declare class TCancelDelegationTokenResp { - status: TStatus; +declare class TCancelDelegationTokenResp { + public status: TStatus; constructor(args?: { status: TStatus; }); } -export declare class TRenewDelegationTokenReq { - sessionHandle: TSessionHandle; - delegationToken: string; - sessionConf?: TDBSqlSessionConf; +declare class TRenewDelegationTokenReq { + public sessionHandle: TSessionHandle; + public delegationToken: string; + public sessionConf?: TDBSqlSessionConf; constructor(args?: { sessionHandle: TSessionHandle; delegationToken: string; sessionConf?: TDBSqlSessionConf; }); } -export declare class TRenewDelegationTokenResp { - status: TStatus; +declare class TRenewDelegationTokenResp { + public status: TStatus; constructor(args?: { status: TStatus; }); } -export declare class TProgressUpdateResp { - headerNames: string[]; - rows: string[][]; - progressedPercentage: number; - status: TJobExecutionStatus; - footerSummary: string; - startTime: Int64; +declare class TProgressUpdateResp { + public headerNames: string[]; + public rows: string[][]; + public progressedPercentage: number; + public status: TJobExecutionStatus; + public footerSummary: string; + public startTime: Int64; constructor(args?: { headerNames: string[]; rows: string[][]; progressedPercentage: number; status: TJobExecutionStatus; footerSummary: string; startTime: Int64; }); } -export declare var PRIMITIVE_TYPES: TTypeId[]; +declare var PRIMITIVE_TYPES: TTypeId[]; -export declare var COMPLEX_TYPES: TTypeId[]; +declare var COMPLEX_TYPES: TTypeId[]; -export declare var COLLECTION_TYPES: TTypeId[]; +declare var COLLECTION_TYPES: TTypeId[]; -export declare var TYPE_NAMES: { [k: number /*TTypeId*/]: string; }; +declare var TYPE_NAMES: { [k: number /*TTypeId*/]: string; }; -export declare var CHARACTER_MAXIMUM_LENGTH: string; +declare var CHARACTER_MAXIMUM_LENGTH: string; -export declare var PRECISION: string; +declare var PRECISION: string; -export declare var SCALE: string; +declare var SCALE: string; diff --git a/thrift/TCLIService_types.js b/thrift/TCLIService_types.js index d40c8ae0..772cf7aa 100644 --- a/thrift/TCLIService_types.js +++ b/thrift/TCLIService_types.js @@ -3,12 +3,16 @@ // // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING // -if (typeof Int64 === 'undefined' && typeof require === 'function') { - var Int64 = require('node-int64'); -} +"use strict"; +var thrift = require('thrift'); +var Thrift = thrift.Thrift; +var Q = thrift.Q; +var Int64 = require('node-int64'); -TProtocolVersion = { + +var ttypes = module.exports = {}; +ttypes.TProtocolVersion = { '-7' : '__HIVE_JDBC_WORKAROUND', '__HIVE_JDBC_WORKAROUND' : -7, '65281' : '__TEST_PROTOCOL_VERSION', @@ -48,7 +52,7 @@ TProtocolVersion = { '42247' : 'SPARK_CLI_SERVICE_PROTOCOL_V7', 'SPARK_CLI_SERVICE_PROTOCOL_V7' : 42247 }; -TTypeId = { +ttypes.TTypeId = { '0' : 'BOOLEAN_TYPE', 'BOOLEAN_TYPE' : 0, '1' : 'TINYINT_TYPE', @@ -94,7 +98,7 @@ TTypeId = { '21' : 'INTERVAL_DAY_TIME_TYPE', 'INTERVAL_DAY_TIME_TYPE' : 21 }; -TSparkRowSetType = { +ttypes.TSparkRowSetType = { '0' : 'ARROW_BASED_SET', 'ARROW_BASED_SET' : 0, '1' : 'COLUMN_BASED_SET', @@ -104,7 +108,7 @@ TSparkRowSetType = { '3' : 'URL_BASED_SET', 'URL_BASED_SET' : 3 }; -TDBSqlCompressionCodec = { +ttypes.TDBSqlCompressionCodec = { '0' : 'NONE', 'NONE' : 0, '1' : 'LZ4_FRAME', @@ -112,13 +116,13 @@ TDBSqlCompressionCodec = { '2' : 'LZ4_BLOCK', 'LZ4_BLOCK' : 2 }; -TDBSqlArrowLayout = { +ttypes.TDBSqlArrowLayout = { '0' : 'ARROW_BATCH', 'ARROW_BATCH' : 0, '1' : 'ARROW_STREAMING', 'ARROW_STREAMING' : 1 }; -TOperationIdempotencyType = { +ttypes.TOperationIdempotencyType = { '0' : 'UNKNOWN', 'UNKNOWN' : 0, '1' : 'NON_IDEMPOTENT', @@ -126,13 +130,13 @@ TOperationIdempotencyType = { '2' : 'IDEMPOTENT', 'IDEMPOTENT' : 2 }; -TOperationTimeoutLevel = { +ttypes.TOperationTimeoutLevel = { '0' : 'CLUSTER', 'CLUSTER' : 0, '1' : 'SESSION', 'SESSION' : 1 }; -TStatusCode = { +ttypes.TStatusCode = { '0' : 'SUCCESS_STATUS', 'SUCCESS_STATUS' : 0, '1' : 'SUCCESS_WITH_INFO_STATUS', @@ -144,7 +148,7 @@ TStatusCode = { '4' : 'INVALID_HANDLE_STATUS', 'INVALID_HANDLE_STATUS' : 4 }; -TOperationState = { +ttypes.TOperationState = { '0' : 'INITIALIZED_STATE', 'INITIALIZED_STATE' : 0, '1' : 'RUNNING_STATE', @@ -164,7 +168,7 @@ TOperationState = { '8' : 'TIMEDOUT_STATE', 'TIMEDOUT_STATE' : 8 }; -TOperationType = { +ttypes.TOperationType = { '0' : 'EXECUTE_STATEMENT', 'EXECUTE_STATEMENT' : 0, '1' : 'GET_TYPE_INFO', @@ -184,7 +188,7 @@ TOperationType = { '8' : 'UNKNOWN', 'UNKNOWN' : 8 }; -TGetInfoType = { +ttypes.TGetInfoType = { '0' : 'CLI_MAX_DRIVER_CONNECTIONS', 'CLI_MAX_DRIVER_CONNECTIONS' : 0, '1' : 'CLI_MAX_CONCURRENT_ACTIVITIES', @@ -280,7 +284,7 @@ TGetInfoType = { '10005' : 'CLI_MAX_IDENTIFIER_LEN', 'CLI_MAX_IDENTIFIER_LEN' : 10005 }; -TResultPersistenceMode = { +ttypes.TResultPersistenceMode = { '0' : 'ONLY_LARGE_RESULTS', 'ONLY_LARGE_RESULTS' : 0, '1' : 'ALL_QUERY_RESULTS', @@ -288,7 +292,7 @@ TResultPersistenceMode = { '2' : 'ALL_RESULTS', 'ALL_RESULTS' : 2 }; -TCacheLookupResult = { +ttypes.TCacheLookupResult = { '0' : 'CACHE_INELIGIBLE', 'CACHE_INELIGIBLE' : 0, '1' : 'LOCAL_CACHE_HIT', @@ -298,7 +302,7 @@ TCacheLookupResult = { '3' : 'CACHE_MISS', 'CACHE_MISS' : 3 }; -TCloudFetchDisabledReason = { +ttypes.TCloudFetchDisabledReason = { '0' : 'ARROW_SUPPORT', 'ARROW_SUPPORT' : 0, '1' : 'CLOUD_FETCH_SUPPORT', @@ -316,11 +320,11 @@ TCloudFetchDisabledReason = { '7' : 'UNKNOWN', 'UNKNOWN' : 7 }; -TDBSqlManifestFileFormat = { +ttypes.TDBSqlManifestFileFormat = { '0' : 'THRIFT_GET_RESULT_SET_METADATA_RESP', 'THRIFT_GET_RESULT_SET_METADATA_RESP' : 0 }; -TFetchOrientation = { +ttypes.TFetchOrientation = { '0' : 'FETCH_NEXT', 'FETCH_NEXT' : 0, '1' : 'FETCH_PRIOR', @@ -334,7 +338,7 @@ TFetchOrientation = { '5' : 'FETCH_LAST', 'FETCH_LAST' : 5 }; -TDBSqlFetchDisposition = { +ttypes.TDBSqlFetchDisposition = { '0' : 'DISPOSITION_UNSPECIFIED', 'DISPOSITION_UNSPECIFIED' : 0, '1' : 'DISPOSITION_INLINE', @@ -344,7 +348,7 @@ TDBSqlFetchDisposition = { '3' : 'DISPOSITION_INTERNAL_DBFS', 'DISPOSITION_INTERNAL_DBFS' : 3 }; -TJobExecutionStatus = { +ttypes.TJobExecutionStatus = { '0' : 'IN_PROGRESS', 'IN_PROGRESS' : 0, '1' : 'COMPLETE', @@ -352,7 +356,7 @@ TJobExecutionStatus = { '2' : 'NOT_AVAILABLE', 'NOT_AVAILABLE' : 2 }; -TTypeQualifierValue = function(args) { +var TTypeQualifierValue = module.exports.TTypeQualifierValue = function(args) { this.i32Value = null; this.stringValue = null; if (args) { @@ -377,14 +381,14 @@ TTypeQualifierValue.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.i32Value = input.readI32().value; + this.i32Value = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { - this.stringValue = input.readString().value; + this.stringValue = input.readString(); } else { input.skip(ftype); } @@ -415,11 +419,11 @@ TTypeQualifierValue.prototype.write = function(output) { return; }; -TTypeQualifiers = function(args) { +var TTypeQualifiers = module.exports.TTypeQualifiers = function(args) { this.qualifiers = null; if (args) { if (args.qualifiers !== undefined && args.qualifiers !== null) { - this.qualifiers = Thrift.copyMap(args.qualifiers, [TTypeQualifierValue]); + this.qualifiers = Thrift.copyMap(args.qualifiers, [ttypes.TTypeQualifierValue]); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field qualifiers is unset!'); } @@ -442,15 +446,10 @@ TTypeQualifiers.prototype.read = function(input) { var _rtmp31 = input.readMapBegin(); var _size0 = _rtmp31.size || 0; for (var _i2 = 0; _i2 < _size0; ++_i2) { - if (_i2 > 0 ) { - if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { - input.rstack.pop(); - } - } var key3 = null; var val4 = null; - key3 = input.readString().value; - val4 = new TTypeQualifierValue(); + key3 = input.readString(); + val4 = new ttypes.TTypeQualifierValue(); val4.read(input); this.qualifiers[key3] = val4; } @@ -491,7 +490,7 @@ TTypeQualifiers.prototype.write = function(output) { return; }; -TPrimitiveTypeEntry = function(args) { +var TPrimitiveTypeEntry = module.exports.TPrimitiveTypeEntry = function(args) { this.type = null; this.typeQualifiers = null; if (args) { @@ -501,7 +500,7 @@ TPrimitiveTypeEntry = function(args) { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field type is unset!'); } if (args.typeQualifiers !== undefined && args.typeQualifiers !== null) { - this.typeQualifiers = new TTypeQualifiers(args.typeQualifiers); + this.typeQualifiers = new ttypes.TTypeQualifiers(args.typeQualifiers); } } }; @@ -518,14 +517,14 @@ TPrimitiveTypeEntry.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.type = input.readI32().value; + this.type = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.typeQualifiers = new TTypeQualifiers(); + this.typeQualifiers = new ttypes.TTypeQualifiers(); this.typeQualifiers.read(input); } else { input.skip(ftype); @@ -557,7 +556,7 @@ TPrimitiveTypeEntry.prototype.write = function(output) { return; }; -TArrayTypeEntry = function(args) { +var TArrayTypeEntry = module.exports.TArrayTypeEntry = function(args) { this.objectTypePtr = null; if (args) { if (args.objectTypePtr !== undefined && args.objectTypePtr !== null) { @@ -580,7 +579,7 @@ TArrayTypeEntry.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.objectTypePtr = input.readI32().value; + this.objectTypePtr = input.readI32(); } else { input.skip(ftype); } @@ -609,7 +608,7 @@ TArrayTypeEntry.prototype.write = function(output) { return; }; -TMapTypeEntry = function(args) { +var TMapTypeEntry = module.exports.TMapTypeEntry = function(args) { this.keyTypePtr = null; this.valueTypePtr = null; if (args) { @@ -638,14 +637,14 @@ TMapTypeEntry.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.keyTypePtr = input.readI32().value; + this.keyTypePtr = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I32) { - this.valueTypePtr = input.readI32().value; + this.valueTypePtr = input.readI32(); } else { input.skip(ftype); } @@ -676,7 +675,7 @@ TMapTypeEntry.prototype.write = function(output) { return; }; -TStructTypeEntry = function(args) { +var TStructTypeEntry = module.exports.TStructTypeEntry = function(args) { this.nameToTypePtr = null; if (args) { if (args.nameToTypePtr !== undefined && args.nameToTypePtr !== null) { @@ -703,15 +702,10 @@ TStructTypeEntry.prototype.read = function(input) { var _rtmp38 = input.readMapBegin(); var _size7 = _rtmp38.size || 0; for (var _i9 = 0; _i9 < _size7; ++_i9) { - if (_i9 > 0 ) { - if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { - input.rstack.pop(); - } - } var key10 = null; var val11 = null; - key10 = input.readString().value; - val11 = input.readI32().value; + key10 = input.readString(); + val11 = input.readI32(); this.nameToTypePtr[key10] = val11; } input.readMapEnd(); @@ -751,7 +745,7 @@ TStructTypeEntry.prototype.write = function(output) { return; }; -TUnionTypeEntry = function(args) { +var TUnionTypeEntry = module.exports.TUnionTypeEntry = function(args) { this.nameToTypePtr = null; if (args) { if (args.nameToTypePtr !== undefined && args.nameToTypePtr !== null) { @@ -778,15 +772,10 @@ TUnionTypeEntry.prototype.read = function(input) { var _rtmp315 = input.readMapBegin(); var _size14 = _rtmp315.size || 0; for (var _i16 = 0; _i16 < _size14; ++_i16) { - if (_i16 > 0 ) { - if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { - input.rstack.pop(); - } - } var key17 = null; var val18 = null; - key17 = input.readString().value; - val18 = input.readI32().value; + key17 = input.readString(); + val18 = input.readI32(); this.nameToTypePtr[key17] = val18; } input.readMapEnd(); @@ -826,7 +815,7 @@ TUnionTypeEntry.prototype.write = function(output) { return; }; -TUserDefinedTypeEntry = function(args) { +var TUserDefinedTypeEntry = module.exports.TUserDefinedTypeEntry = function(args) { this.typeClassName = null; if (args) { if (args.typeClassName !== undefined && args.typeClassName !== null) { @@ -849,7 +838,7 @@ TUserDefinedTypeEntry.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.typeClassName = input.readString().value; + this.typeClassName = input.readString(); } else { input.skip(ftype); } @@ -878,7 +867,7 @@ TUserDefinedTypeEntry.prototype.write = function(output) { return; }; -TTypeEntry = function(args) { +var TTypeEntry = module.exports.TTypeEntry = function(args) { this.primitiveEntry = null; this.arrayEntry = null; this.mapEntry = null; @@ -887,22 +876,22 @@ TTypeEntry = function(args) { this.userDefinedTypeEntry = null; if (args) { if (args.primitiveEntry !== undefined && args.primitiveEntry !== null) { - this.primitiveEntry = new TPrimitiveTypeEntry(args.primitiveEntry); + this.primitiveEntry = new ttypes.TPrimitiveTypeEntry(args.primitiveEntry); } if (args.arrayEntry !== undefined && args.arrayEntry !== null) { - this.arrayEntry = new TArrayTypeEntry(args.arrayEntry); + this.arrayEntry = new ttypes.TArrayTypeEntry(args.arrayEntry); } if (args.mapEntry !== undefined && args.mapEntry !== null) { - this.mapEntry = new TMapTypeEntry(args.mapEntry); + this.mapEntry = new ttypes.TMapTypeEntry(args.mapEntry); } if (args.structEntry !== undefined && args.structEntry !== null) { - this.structEntry = new TStructTypeEntry(args.structEntry); + this.structEntry = new ttypes.TStructTypeEntry(args.structEntry); } if (args.unionEntry !== undefined && args.unionEntry !== null) { - this.unionEntry = new TUnionTypeEntry(args.unionEntry); + this.unionEntry = new ttypes.TUnionTypeEntry(args.unionEntry); } if (args.userDefinedTypeEntry !== undefined && args.userDefinedTypeEntry !== null) { - this.userDefinedTypeEntry = new TUserDefinedTypeEntry(args.userDefinedTypeEntry); + this.userDefinedTypeEntry = new ttypes.TUserDefinedTypeEntry(args.userDefinedTypeEntry); } } }; @@ -919,7 +908,7 @@ TTypeEntry.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.primitiveEntry = new TPrimitiveTypeEntry(); + this.primitiveEntry = new ttypes.TPrimitiveTypeEntry(); this.primitiveEntry.read(input); } else { input.skip(ftype); @@ -927,7 +916,7 @@ TTypeEntry.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.arrayEntry = new TArrayTypeEntry(); + this.arrayEntry = new ttypes.TArrayTypeEntry(); this.arrayEntry.read(input); } else { input.skip(ftype); @@ -935,7 +924,7 @@ TTypeEntry.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.STRUCT) { - this.mapEntry = new TMapTypeEntry(); + this.mapEntry = new ttypes.TMapTypeEntry(); this.mapEntry.read(input); } else { input.skip(ftype); @@ -943,7 +932,7 @@ TTypeEntry.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.STRUCT) { - this.structEntry = new TStructTypeEntry(); + this.structEntry = new ttypes.TStructTypeEntry(); this.structEntry.read(input); } else { input.skip(ftype); @@ -951,7 +940,7 @@ TTypeEntry.prototype.read = function(input) { break; case 5: if (ftype == Thrift.Type.STRUCT) { - this.unionEntry = new TUnionTypeEntry(); + this.unionEntry = new ttypes.TUnionTypeEntry(); this.unionEntry.read(input); } else { input.skip(ftype); @@ -959,7 +948,7 @@ TTypeEntry.prototype.read = function(input) { break; case 6: if (ftype == Thrift.Type.STRUCT) { - this.userDefinedTypeEntry = new TUserDefinedTypeEntry(); + this.userDefinedTypeEntry = new ttypes.TUserDefinedTypeEntry(); this.userDefinedTypeEntry.read(input); } else { input.skip(ftype); @@ -1011,11 +1000,11 @@ TTypeEntry.prototype.write = function(output) { return; }; -TTypeDesc = function(args) { +var TTypeDesc = module.exports.TTypeDesc = function(args) { this.types = null; if (args) { if (args.types !== undefined && args.types !== null) { - this.types = Thrift.copyList(args.types, [TTypeEntry]); + this.types = Thrift.copyList(args.types, [ttypes.TTypeEntry]); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field types is unset!'); } @@ -1039,7 +1028,7 @@ TTypeDesc.prototype.read = function(input) { var _size21 = _rtmp322.size || 0; for (var _i23 = 0; _i23 < _size21; ++_i23) { var elem24 = null; - elem24 = new TTypeEntry(); + elem24 = new ttypes.TTypeEntry(); elem24.read(input); this.types.push(elem24); } @@ -1079,7 +1068,7 @@ TTypeDesc.prototype.write = function(output) { return; }; -TColumnDesc = function(args) { +var TColumnDesc = module.exports.TColumnDesc = function(args) { this.columnName = null; this.typeDesc = null; this.position = null; @@ -1091,7 +1080,7 @@ TColumnDesc = function(args) { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field columnName is unset!'); } if (args.typeDesc !== undefined && args.typeDesc !== null) { - this.typeDesc = new TTypeDesc(args.typeDesc); + this.typeDesc = new ttypes.TTypeDesc(args.typeDesc); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field typeDesc is unset!'); } @@ -1118,14 +1107,14 @@ TColumnDesc.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.columnName = input.readString().value; + this.columnName = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.typeDesc = new TTypeDesc(); + this.typeDesc = new ttypes.TTypeDesc(); this.typeDesc.read(input); } else { input.skip(ftype); @@ -1133,14 +1122,14 @@ TColumnDesc.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.I32) { - this.position = input.readI32().value; + this.position = input.readI32(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { - this.comment = input.readString().value; + this.comment = input.readString(); } else { input.skip(ftype); } @@ -1181,11 +1170,11 @@ TColumnDesc.prototype.write = function(output) { return; }; -TTableSchema = function(args) { +var TTableSchema = module.exports.TTableSchema = function(args) { this.columns = null; if (args) { if (args.columns !== undefined && args.columns !== null) { - this.columns = Thrift.copyList(args.columns, [TColumnDesc]); + this.columns = Thrift.copyList(args.columns, [ttypes.TColumnDesc]); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field columns is unset!'); } @@ -1209,7 +1198,7 @@ TTableSchema.prototype.read = function(input) { var _size26 = _rtmp327.size || 0; for (var _i28 = 0; _i28 < _size26; ++_i28) { var elem29 = null; - elem29 = new TColumnDesc(); + elem29 = new ttypes.TColumnDesc(); elem29.read(input); this.columns.push(elem29); } @@ -1249,7 +1238,7 @@ TTableSchema.prototype.write = function(output) { return; }; -TBoolValue = function(args) { +var TBoolValue = module.exports.TBoolValue = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { @@ -1270,7 +1259,7 @@ TBoolValue.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.BOOL) { - this.value = input.readBool().value; + this.value = input.readBool(); } else { input.skip(ftype); } @@ -1299,7 +1288,7 @@ TBoolValue.prototype.write = function(output) { return; }; -TByteValue = function(args) { +var TByteValue = module.exports.TByteValue = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { @@ -1320,7 +1309,7 @@ TByteValue.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.BYTE) { - this.value = input.readByte().value; + this.value = input.readByte(); } else { input.skip(ftype); } @@ -1349,7 +1338,7 @@ TByteValue.prototype.write = function(output) { return; }; -TI16Value = function(args) { +var TI16Value = module.exports.TI16Value = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { @@ -1370,7 +1359,7 @@ TI16Value.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I16) { - this.value = input.readI16().value; + this.value = input.readI16(); } else { input.skip(ftype); } @@ -1399,7 +1388,7 @@ TI16Value.prototype.write = function(output) { return; }; -TI32Value = function(args) { +var TI32Value = module.exports.TI32Value = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { @@ -1420,7 +1409,7 @@ TI32Value.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.value = input.readI32().value; + this.value = input.readI32(); } else { input.skip(ftype); } @@ -1449,7 +1438,7 @@ TI32Value.prototype.write = function(output) { return; }; -TI64Value = function(args) { +var TI64Value = module.exports.TI64Value = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { @@ -1470,7 +1459,7 @@ TI64Value.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I64) { - this.value = input.readI64().value; + this.value = input.readI64(); } else { input.skip(ftype); } @@ -1499,7 +1488,7 @@ TI64Value.prototype.write = function(output) { return; }; -TDoubleValue = function(args) { +var TDoubleValue = module.exports.TDoubleValue = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { @@ -1520,7 +1509,7 @@ TDoubleValue.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.DOUBLE) { - this.value = input.readDouble().value; + this.value = input.readDouble(); } else { input.skip(ftype); } @@ -1549,7 +1538,7 @@ TDoubleValue.prototype.write = function(output) { return; }; -TStringValue = function(args) { +var TStringValue = module.exports.TStringValue = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { @@ -1570,7 +1559,7 @@ TStringValue.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.value = input.readString().value; + this.value = input.readString(); } else { input.skip(ftype); } @@ -1599,7 +1588,7 @@ TStringValue.prototype.write = function(output) { return; }; -TColumnValue = function(args) { +var TColumnValue = module.exports.TColumnValue = function(args) { this.boolVal = null; this.byteVal = null; this.i16Val = null; @@ -1609,25 +1598,25 @@ TColumnValue = function(args) { this.stringVal = null; if (args) { if (args.boolVal !== undefined && args.boolVal !== null) { - this.boolVal = new TBoolValue(args.boolVal); + this.boolVal = new ttypes.TBoolValue(args.boolVal); } if (args.byteVal !== undefined && args.byteVal !== null) { - this.byteVal = new TByteValue(args.byteVal); + this.byteVal = new ttypes.TByteValue(args.byteVal); } if (args.i16Val !== undefined && args.i16Val !== null) { - this.i16Val = new TI16Value(args.i16Val); + this.i16Val = new ttypes.TI16Value(args.i16Val); } if (args.i32Val !== undefined && args.i32Val !== null) { - this.i32Val = new TI32Value(args.i32Val); + this.i32Val = new ttypes.TI32Value(args.i32Val); } if (args.i64Val !== undefined && args.i64Val !== null) { - this.i64Val = new TI64Value(args.i64Val); + this.i64Val = new ttypes.TI64Value(args.i64Val); } if (args.doubleVal !== undefined && args.doubleVal !== null) { - this.doubleVal = new TDoubleValue(args.doubleVal); + this.doubleVal = new ttypes.TDoubleValue(args.doubleVal); } if (args.stringVal !== undefined && args.stringVal !== null) { - this.stringVal = new TStringValue(args.stringVal); + this.stringVal = new ttypes.TStringValue(args.stringVal); } } }; @@ -1644,7 +1633,7 @@ TColumnValue.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.boolVal = new TBoolValue(); + this.boolVal = new ttypes.TBoolValue(); this.boolVal.read(input); } else { input.skip(ftype); @@ -1652,7 +1641,7 @@ TColumnValue.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.byteVal = new TByteValue(); + this.byteVal = new ttypes.TByteValue(); this.byteVal.read(input); } else { input.skip(ftype); @@ -1660,7 +1649,7 @@ TColumnValue.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.STRUCT) { - this.i16Val = new TI16Value(); + this.i16Val = new ttypes.TI16Value(); this.i16Val.read(input); } else { input.skip(ftype); @@ -1668,7 +1657,7 @@ TColumnValue.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.STRUCT) { - this.i32Val = new TI32Value(); + this.i32Val = new ttypes.TI32Value(); this.i32Val.read(input); } else { input.skip(ftype); @@ -1676,7 +1665,7 @@ TColumnValue.prototype.read = function(input) { break; case 5: if (ftype == Thrift.Type.STRUCT) { - this.i64Val = new TI64Value(); + this.i64Val = new ttypes.TI64Value(); this.i64Val.read(input); } else { input.skip(ftype); @@ -1684,7 +1673,7 @@ TColumnValue.prototype.read = function(input) { break; case 6: if (ftype == Thrift.Type.STRUCT) { - this.doubleVal = new TDoubleValue(); + this.doubleVal = new ttypes.TDoubleValue(); this.doubleVal.read(input); } else { input.skip(ftype); @@ -1692,7 +1681,7 @@ TColumnValue.prototype.read = function(input) { break; case 7: if (ftype == Thrift.Type.STRUCT) { - this.stringVal = new TStringValue(); + this.stringVal = new ttypes.TStringValue(); this.stringVal.read(input); } else { input.skip(ftype); @@ -1749,11 +1738,11 @@ TColumnValue.prototype.write = function(output) { return; }; -TRow = function(args) { +var TRow = module.exports.TRow = function(args) { this.colVals = null; if (args) { if (args.colVals !== undefined && args.colVals !== null) { - this.colVals = Thrift.copyList(args.colVals, [TColumnValue]); + this.colVals = Thrift.copyList(args.colVals, [ttypes.TColumnValue]); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field colVals is unset!'); } @@ -1777,7 +1766,7 @@ TRow.prototype.read = function(input) { var _size31 = _rtmp332.size || 0; for (var _i33 = 0; _i33 < _size31; ++_i33) { var elem34 = null; - elem34 = new TColumnValue(); + elem34 = new ttypes.TColumnValue(); elem34.read(input); this.colVals.push(elem34); } @@ -1817,7 +1806,7 @@ TRow.prototype.write = function(output) { return; }; -TBoolColumn = function(args) { +var TBoolColumn = module.exports.TBoolColumn = function(args) { this.values = null; this.nulls = null; if (args) { @@ -1851,7 +1840,7 @@ TBoolColumn.prototype.read = function(input) { var _size36 = _rtmp337.size || 0; for (var _i38 = 0; _i38 < _size36; ++_i38) { var elem39 = null; - elem39 = input.readBool().value; + elem39 = input.readBool(); this.values.push(elem39); } input.readListEnd(); @@ -1861,7 +1850,7 @@ TBoolColumn.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.nulls = input.readBinary().value; + this.nulls = input.readBinary(); } else { input.skip(ftype); } @@ -1899,7 +1888,7 @@ TBoolColumn.prototype.write = function(output) { return; }; -TByteColumn = function(args) { +var TByteColumn = module.exports.TByteColumn = function(args) { this.values = null; this.nulls = null; if (args) { @@ -1933,7 +1922,7 @@ TByteColumn.prototype.read = function(input) { var _size41 = _rtmp342.size || 0; for (var _i43 = 0; _i43 < _size41; ++_i43) { var elem44 = null; - elem44 = input.readByte().value; + elem44 = input.readByte(); this.values.push(elem44); } input.readListEnd(); @@ -1943,7 +1932,7 @@ TByteColumn.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.nulls = input.readBinary().value; + this.nulls = input.readBinary(); } else { input.skip(ftype); } @@ -1981,7 +1970,7 @@ TByteColumn.prototype.write = function(output) { return; }; -TI16Column = function(args) { +var TI16Column = module.exports.TI16Column = function(args) { this.values = null; this.nulls = null; if (args) { @@ -2015,7 +2004,7 @@ TI16Column.prototype.read = function(input) { var _size46 = _rtmp347.size || 0; for (var _i48 = 0; _i48 < _size46; ++_i48) { var elem49 = null; - elem49 = input.readI16().value; + elem49 = input.readI16(); this.values.push(elem49); } input.readListEnd(); @@ -2025,7 +2014,7 @@ TI16Column.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.nulls = input.readBinary().value; + this.nulls = input.readBinary(); } else { input.skip(ftype); } @@ -2063,7 +2052,7 @@ TI16Column.prototype.write = function(output) { return; }; -TI32Column = function(args) { +var TI32Column = module.exports.TI32Column = function(args) { this.values = null; this.nulls = null; if (args) { @@ -2097,7 +2086,7 @@ TI32Column.prototype.read = function(input) { var _size51 = _rtmp352.size || 0; for (var _i53 = 0; _i53 < _size51; ++_i53) { var elem54 = null; - elem54 = input.readI32().value; + elem54 = input.readI32(); this.values.push(elem54); } input.readListEnd(); @@ -2107,7 +2096,7 @@ TI32Column.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.nulls = input.readBinary().value; + this.nulls = input.readBinary(); } else { input.skip(ftype); } @@ -2145,7 +2134,7 @@ TI32Column.prototype.write = function(output) { return; }; -TI64Column = function(args) { +var TI64Column = module.exports.TI64Column = function(args) { this.values = null; this.nulls = null; if (args) { @@ -2179,7 +2168,7 @@ TI64Column.prototype.read = function(input) { var _size56 = _rtmp357.size || 0; for (var _i58 = 0; _i58 < _size56; ++_i58) { var elem59 = null; - elem59 = input.readI64().value; + elem59 = input.readI64(); this.values.push(elem59); } input.readListEnd(); @@ -2189,7 +2178,7 @@ TI64Column.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.nulls = input.readBinary().value; + this.nulls = input.readBinary(); } else { input.skip(ftype); } @@ -2227,7 +2216,7 @@ TI64Column.prototype.write = function(output) { return; }; -TDoubleColumn = function(args) { +var TDoubleColumn = module.exports.TDoubleColumn = function(args) { this.values = null; this.nulls = null; if (args) { @@ -2261,7 +2250,7 @@ TDoubleColumn.prototype.read = function(input) { var _size61 = _rtmp362.size || 0; for (var _i63 = 0; _i63 < _size61; ++_i63) { var elem64 = null; - elem64 = input.readDouble().value; + elem64 = input.readDouble(); this.values.push(elem64); } input.readListEnd(); @@ -2271,7 +2260,7 @@ TDoubleColumn.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.nulls = input.readBinary().value; + this.nulls = input.readBinary(); } else { input.skip(ftype); } @@ -2309,7 +2298,7 @@ TDoubleColumn.prototype.write = function(output) { return; }; -TStringColumn = function(args) { +var TStringColumn = module.exports.TStringColumn = function(args) { this.values = null; this.nulls = null; if (args) { @@ -2343,7 +2332,7 @@ TStringColumn.prototype.read = function(input) { var _size66 = _rtmp367.size || 0; for (var _i68 = 0; _i68 < _size66; ++_i68) { var elem69 = null; - elem69 = input.readString().value; + elem69 = input.readString(); this.values.push(elem69); } input.readListEnd(); @@ -2353,7 +2342,7 @@ TStringColumn.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.nulls = input.readBinary().value; + this.nulls = input.readBinary(); } else { input.skip(ftype); } @@ -2391,7 +2380,7 @@ TStringColumn.prototype.write = function(output) { return; }; -TBinaryColumn = function(args) { +var TBinaryColumn = module.exports.TBinaryColumn = function(args) { this.values = null; this.nulls = null; if (args) { @@ -2425,7 +2414,7 @@ TBinaryColumn.prototype.read = function(input) { var _size71 = _rtmp372.size || 0; for (var _i73 = 0; _i73 < _size71; ++_i73) { var elem74 = null; - elem74 = input.readBinary().value; + elem74 = input.readBinary(); this.values.push(elem74); } input.readListEnd(); @@ -2435,7 +2424,7 @@ TBinaryColumn.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.nulls = input.readBinary().value; + this.nulls = input.readBinary(); } else { input.skip(ftype); } @@ -2473,7 +2462,7 @@ TBinaryColumn.prototype.write = function(output) { return; }; -TColumn = function(args) { +var TColumn = module.exports.TColumn = function(args) { this.boolVal = null; this.byteVal = null; this.i16Val = null; @@ -2484,28 +2473,28 @@ TColumn = function(args) { this.binaryVal = null; if (args) { if (args.boolVal !== undefined && args.boolVal !== null) { - this.boolVal = new TBoolColumn(args.boolVal); + this.boolVal = new ttypes.TBoolColumn(args.boolVal); } if (args.byteVal !== undefined && args.byteVal !== null) { - this.byteVal = new TByteColumn(args.byteVal); + this.byteVal = new ttypes.TByteColumn(args.byteVal); } if (args.i16Val !== undefined && args.i16Val !== null) { - this.i16Val = new TI16Column(args.i16Val); + this.i16Val = new ttypes.TI16Column(args.i16Val); } if (args.i32Val !== undefined && args.i32Val !== null) { - this.i32Val = new TI32Column(args.i32Val); + this.i32Val = new ttypes.TI32Column(args.i32Val); } if (args.i64Val !== undefined && args.i64Val !== null) { - this.i64Val = new TI64Column(args.i64Val); + this.i64Val = new ttypes.TI64Column(args.i64Val); } if (args.doubleVal !== undefined && args.doubleVal !== null) { - this.doubleVal = new TDoubleColumn(args.doubleVal); + this.doubleVal = new ttypes.TDoubleColumn(args.doubleVal); } if (args.stringVal !== undefined && args.stringVal !== null) { - this.stringVal = new TStringColumn(args.stringVal); + this.stringVal = new ttypes.TStringColumn(args.stringVal); } if (args.binaryVal !== undefined && args.binaryVal !== null) { - this.binaryVal = new TBinaryColumn(args.binaryVal); + this.binaryVal = new ttypes.TBinaryColumn(args.binaryVal); } } }; @@ -2522,7 +2511,7 @@ TColumn.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.boolVal = new TBoolColumn(); + this.boolVal = new ttypes.TBoolColumn(); this.boolVal.read(input); } else { input.skip(ftype); @@ -2530,7 +2519,7 @@ TColumn.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.byteVal = new TByteColumn(); + this.byteVal = new ttypes.TByteColumn(); this.byteVal.read(input); } else { input.skip(ftype); @@ -2538,7 +2527,7 @@ TColumn.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.STRUCT) { - this.i16Val = new TI16Column(); + this.i16Val = new ttypes.TI16Column(); this.i16Val.read(input); } else { input.skip(ftype); @@ -2546,7 +2535,7 @@ TColumn.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.STRUCT) { - this.i32Val = new TI32Column(); + this.i32Val = new ttypes.TI32Column(); this.i32Val.read(input); } else { input.skip(ftype); @@ -2554,7 +2543,7 @@ TColumn.prototype.read = function(input) { break; case 5: if (ftype == Thrift.Type.STRUCT) { - this.i64Val = new TI64Column(); + this.i64Val = new ttypes.TI64Column(); this.i64Val.read(input); } else { input.skip(ftype); @@ -2562,7 +2551,7 @@ TColumn.prototype.read = function(input) { break; case 6: if (ftype == Thrift.Type.STRUCT) { - this.doubleVal = new TDoubleColumn(); + this.doubleVal = new ttypes.TDoubleColumn(); this.doubleVal.read(input); } else { input.skip(ftype); @@ -2570,7 +2559,7 @@ TColumn.prototype.read = function(input) { break; case 7: if (ftype == Thrift.Type.STRUCT) { - this.stringVal = new TStringColumn(); + this.stringVal = new ttypes.TStringColumn(); this.stringVal.read(input); } else { input.skip(ftype); @@ -2578,7 +2567,7 @@ TColumn.prototype.read = function(input) { break; case 8: if (ftype == Thrift.Type.STRUCT) { - this.binaryVal = new TBinaryColumn(); + this.binaryVal = new ttypes.TBinaryColumn(); this.binaryVal.read(input); } else { input.skip(ftype); @@ -2640,7 +2629,7 @@ TColumn.prototype.write = function(output) { return; }; -TDBSqlJsonArrayFormat = function(args) { +var TDBSqlJsonArrayFormat = module.exports.TDBSqlJsonArrayFormat = function(args) { this.compressionCodec = null; if (args) { if (args.compressionCodec !== undefined && args.compressionCodec !== null) { @@ -2661,7 +2650,7 @@ TDBSqlJsonArrayFormat.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.compressionCodec = input.readI32().value; + this.compressionCodec = input.readI32(); } else { input.skip(ftype); } @@ -2690,7 +2679,7 @@ TDBSqlJsonArrayFormat.prototype.write = function(output) { return; }; -TDBSqlCsvFormat = function(args) { +var TDBSqlCsvFormat = module.exports.TDBSqlCsvFormat = function(args) { this.compressionCodec = null; if (args) { if (args.compressionCodec !== undefined && args.compressionCodec !== null) { @@ -2711,7 +2700,7 @@ TDBSqlCsvFormat.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.compressionCodec = input.readI32().value; + this.compressionCodec = input.readI32(); } else { input.skip(ftype); } @@ -2740,7 +2729,7 @@ TDBSqlCsvFormat.prototype.write = function(output) { return; }; -TDBSqlArrowFormat = function(args) { +var TDBSqlArrowFormat = module.exports.TDBSqlArrowFormat = function(args) { this.arrowLayout = null; this.compressionCodec = null; if (args) { @@ -2765,14 +2754,14 @@ TDBSqlArrowFormat.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.arrowLayout = input.readI32().value; + this.arrowLayout = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I32) { - this.compressionCodec = input.readI32().value; + this.compressionCodec = input.readI32(); } else { input.skip(ftype); } @@ -2803,19 +2792,19 @@ TDBSqlArrowFormat.prototype.write = function(output) { return; }; -TDBSqlResultFormat = function(args) { +var TDBSqlResultFormat = module.exports.TDBSqlResultFormat = function(args) { this.arrowFormat = null; this.csvFormat = null; this.jsonArrayFormat = null; if (args) { if (args.arrowFormat !== undefined && args.arrowFormat !== null) { - this.arrowFormat = new TDBSqlArrowFormat(args.arrowFormat); + this.arrowFormat = new ttypes.TDBSqlArrowFormat(args.arrowFormat); } if (args.csvFormat !== undefined && args.csvFormat !== null) { - this.csvFormat = new TDBSqlCsvFormat(args.csvFormat); + this.csvFormat = new ttypes.TDBSqlCsvFormat(args.csvFormat); } if (args.jsonArrayFormat !== undefined && args.jsonArrayFormat !== null) { - this.jsonArrayFormat = new TDBSqlJsonArrayFormat(args.jsonArrayFormat); + this.jsonArrayFormat = new ttypes.TDBSqlJsonArrayFormat(args.jsonArrayFormat); } } }; @@ -2832,7 +2821,7 @@ TDBSqlResultFormat.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.arrowFormat = new TDBSqlArrowFormat(); + this.arrowFormat = new ttypes.TDBSqlArrowFormat(); this.arrowFormat.read(input); } else { input.skip(ftype); @@ -2840,7 +2829,7 @@ TDBSqlResultFormat.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.csvFormat = new TDBSqlCsvFormat(); + this.csvFormat = new ttypes.TDBSqlCsvFormat(); this.csvFormat.read(input); } else { input.skip(ftype); @@ -2848,7 +2837,7 @@ TDBSqlResultFormat.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.STRUCT) { - this.jsonArrayFormat = new TDBSqlJsonArrayFormat(); + this.jsonArrayFormat = new ttypes.TDBSqlJsonArrayFormat(); this.jsonArrayFormat.read(input); } else { input.skip(ftype); @@ -2885,7 +2874,7 @@ TDBSqlResultFormat.prototype.write = function(output) { return; }; -TSparkArrowBatch = function(args) { +var TSparkArrowBatch = module.exports.TSparkArrowBatch = function(args) { this.batch = null; this.rowCount = null; if (args) { @@ -2914,14 +2903,14 @@ TSparkArrowBatch.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.batch = input.readBinary().value; + this.batch = input.readBinary(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I64) { - this.rowCount = input.readI64().value; + this.rowCount = input.readI64(); } else { input.skip(ftype); } @@ -2952,7 +2941,7 @@ TSparkArrowBatch.prototype.write = function(output) { return; }; -TSparkArrowResultLink = function(args) { +var TSparkArrowResultLink = module.exports.TSparkArrowResultLink = function(args) { this.fileLink = null; this.expiryTime = null; this.startRowOffset = null; @@ -3003,35 +2992,35 @@ TSparkArrowResultLink.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.fileLink = input.readString().value; + this.fileLink = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I64) { - this.expiryTime = input.readI64().value; + this.expiryTime = input.readI64(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I64) { - this.startRowOffset = input.readI64().value; + this.startRowOffset = input.readI64(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I64) { - this.rowCount = input.readI64().value; + this.rowCount = input.readI64(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.I64) { - this.bytesNum = input.readI64().value; + this.bytesNum = input.readI64(); } else { input.skip(ftype); } @@ -3042,15 +3031,10 @@ TSparkArrowResultLink.prototype.read = function(input) { var _rtmp377 = input.readMapBegin(); var _size76 = _rtmp377.size || 0; for (var _i78 = 0; _i78 < _size76; ++_i78) { - if (_i78 > 0 ) { - if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { - input.rstack.pop(); - } - } var key79 = null; var val80 = null; - key79 = input.readString().value; - val80 = input.readString().value; + key79 = input.readString(); + val80 = input.readString(); this.httpHeaders[key79] = val80; } input.readMapEnd(); @@ -3112,7 +3096,7 @@ TSparkArrowResultLink.prototype.write = function(output) { return; }; -TDBSqlCloudResultFile = function(args) { +var TDBSqlCloudResultFile = module.exports.TDBSqlCloudResultFile = function(args) { this.filePath = null; this.startRowOffset = null; this.rowCount = null; @@ -3161,49 +3145,49 @@ TDBSqlCloudResultFile.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.filePath = input.readString().value; + this.filePath = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I64) { - this.startRowOffset = input.readI64().value; + this.startRowOffset = input.readI64(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I64) { - this.rowCount = input.readI64().value; + this.rowCount = input.readI64(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I64) { - this.uncompressedBytes = input.readI64().value; + this.uncompressedBytes = input.readI64(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.I64) { - this.compressedBytes = input.readI64().value; + this.compressedBytes = input.readI64(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRING) { - this.fileLink = input.readString().value; + this.fileLink = input.readString(); } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.I64) { - this.linkExpiryTime = input.readI64().value; + this.linkExpiryTime = input.readI64(); } else { input.skip(ftype); } @@ -3214,15 +3198,10 @@ TDBSqlCloudResultFile.prototype.read = function(input) { var _rtmp384 = input.readMapBegin(); var _size83 = _rtmp384.size || 0; for (var _i85 = 0; _i85 < _size83; ++_i85) { - if (_i85 > 0 ) { - if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { - input.rstack.pop(); - } - } var key86 = null; var val87 = null; - key86 = input.readString().value; - val87 = input.readString().value; + key86 = input.readString(); + val87 = input.readString(); this.httpHeaders[key86] = val87; } input.readMapEnd(); @@ -3294,7 +3273,7 @@ TDBSqlCloudResultFile.prototype.write = function(output) { return; }; -TRowSet = function(args) { +var TRowSet = module.exports.TRowSet = function(args) { this.startRowOffset = null; this.rows = null; this.columns = null; @@ -3310,12 +3289,12 @@ TRowSet = function(args) { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field startRowOffset is unset!'); } if (args.rows !== undefined && args.rows !== null) { - this.rows = Thrift.copyList(args.rows, [TRow]); + this.rows = Thrift.copyList(args.rows, [ttypes.TRow]); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field rows is unset!'); } if (args.columns !== undefined && args.columns !== null) { - this.columns = Thrift.copyList(args.columns, [TColumn]); + this.columns = Thrift.copyList(args.columns, [ttypes.TColumn]); } if (args.binaryColumns !== undefined && args.binaryColumns !== null) { this.binaryColumns = args.binaryColumns; @@ -3324,13 +3303,13 @@ TRowSet = function(args) { this.columnCount = args.columnCount; } if (args.arrowBatches !== undefined && args.arrowBatches !== null) { - this.arrowBatches = Thrift.copyList(args.arrowBatches, [TSparkArrowBatch]); + this.arrowBatches = Thrift.copyList(args.arrowBatches, [ttypes.TSparkArrowBatch]); } if (args.resultLinks !== undefined && args.resultLinks !== null) { - this.resultLinks = Thrift.copyList(args.resultLinks, [TSparkArrowResultLink]); + this.resultLinks = Thrift.copyList(args.resultLinks, [ttypes.TSparkArrowResultLink]); } if (args.cloudFetchResults !== undefined && args.cloudFetchResults !== null) { - this.cloudFetchResults = Thrift.copyList(args.cloudFetchResults, [TDBSqlCloudResultFile]); + this.cloudFetchResults = Thrift.copyList(args.cloudFetchResults, [ttypes.TDBSqlCloudResultFile]); } } }; @@ -3347,7 +3326,7 @@ TRowSet.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I64) { - this.startRowOffset = input.readI64().value; + this.startRowOffset = input.readI64(); } else { input.skip(ftype); } @@ -3359,7 +3338,7 @@ TRowSet.prototype.read = function(input) { var _size90 = _rtmp391.size || 0; for (var _i92 = 0; _i92 < _size90; ++_i92) { var elem93 = null; - elem93 = new TRow(); + elem93 = new ttypes.TRow(); elem93.read(input); this.rows.push(elem93); } @@ -3375,7 +3354,7 @@ TRowSet.prototype.read = function(input) { var _size94 = _rtmp395.size || 0; for (var _i96 = 0; _i96 < _size94; ++_i96) { var elem97 = null; - elem97 = new TColumn(); + elem97 = new ttypes.TColumn(); elem97.read(input); this.columns.push(elem97); } @@ -3386,14 +3365,14 @@ TRowSet.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.STRING) { - this.binaryColumns = input.readBinary().value; + this.binaryColumns = input.readBinary(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.I32) { - this.columnCount = input.readI32().value; + this.columnCount = input.readI32(); } else { input.skip(ftype); } @@ -3405,7 +3384,7 @@ TRowSet.prototype.read = function(input) { var _size98 = _rtmp399.size || 0; for (var _i100 = 0; _i100 < _size98; ++_i100) { var elem101 = null; - elem101 = new TSparkArrowBatch(); + elem101 = new ttypes.TSparkArrowBatch(); elem101.read(input); this.arrowBatches.push(elem101); } @@ -3421,7 +3400,7 @@ TRowSet.prototype.read = function(input) { var _size102 = _rtmp3103.size || 0; for (var _i104 = 0; _i104 < _size102; ++_i104) { var elem105 = null; - elem105 = new TSparkArrowResultLink(); + elem105 = new ttypes.TSparkArrowResultLink(); elem105.read(input); this.resultLinks.push(elem105); } @@ -3437,7 +3416,7 @@ TRowSet.prototype.read = function(input) { var _size106 = _rtmp3107.size || 0; for (var _i108 = 0; _i108 < _size106; ++_i108) { var elem109 = null; - elem109 = new TDBSqlCloudResultFile(); + elem109 = new ttypes.TDBSqlCloudResultFile(); elem109.read(input); this.cloudFetchResults.push(elem109); } @@ -3537,7 +3516,7 @@ TRowSet.prototype.write = function(output) { return; }; -TDBSqlTempView = function(args) { +var TDBSqlTempView = module.exports.TDBSqlTempView = function(args) { this.name = null; this.sqlStatement = null; this.properties = null; @@ -3570,14 +3549,14 @@ TDBSqlTempView.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.name = input.readString().value; + this.name = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { - this.sqlStatement = input.readString().value; + this.sqlStatement = input.readString(); } else { input.skip(ftype); } @@ -3588,15 +3567,10 @@ TDBSqlTempView.prototype.read = function(input) { var _rtmp3116 = input.readMapBegin(); var _size115 = _rtmp3116.size || 0; for (var _i117 = 0; _i117 < _size115; ++_i117) { - if (_i117 > 0 ) { - if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { - input.rstack.pop(); - } - } var key118 = null; var val119 = null; - key118 = input.readString().value; - val119 = input.readString().value; + key118 = input.readString(); + val119 = input.readString(); this.properties[key118] = val119; } input.readMapEnd(); @@ -3606,7 +3580,7 @@ TDBSqlTempView.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.STRING) { - this.viewSchema = input.readString().value; + this.viewSchema = input.readString(); } else { input.skip(ftype); } @@ -3655,7 +3629,7 @@ TDBSqlTempView.prototype.write = function(output) { return; }; -TDBSqlSessionCapabilities = function(args) { +var TDBSqlSessionCapabilities = module.exports.TDBSqlSessionCapabilities = function(args) { this.supportsMultipleCatalogs = null; if (args) { if (args.supportsMultipleCatalogs !== undefined && args.supportsMultipleCatalogs !== null) { @@ -3676,7 +3650,7 @@ TDBSqlSessionCapabilities.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.BOOL) { - this.supportsMultipleCatalogs = input.readBool().value; + this.supportsMultipleCatalogs = input.readBool(); } else { input.skip(ftype); } @@ -3705,7 +3679,7 @@ TDBSqlSessionCapabilities.prototype.write = function(output) { return; }; -TExpressionInfo = function(args) { +var TExpressionInfo = module.exports.TExpressionInfo = function(args) { this.className = null; this.usage = null; this.name = null; @@ -3770,84 +3744,84 @@ TExpressionInfo.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.className = input.readString().value; + this.className = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { - this.usage = input.readString().value; + this.usage = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.name = input.readString().value; + this.name = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { - this.extended = input.readString().value; + this.extended = input.readString(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { - this.db = input.readString().value; + this.db = input.readString(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRING) { - this.arguments = input.readString().value; + this.arguments = input.readString(); } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.STRING) { - this.examples = input.readString().value; + this.examples = input.readString(); } else { input.skip(ftype); } break; case 8: if (ftype == Thrift.Type.STRING) { - this.note = input.readString().value; + this.note = input.readString(); } else { input.skip(ftype); } break; case 9: if (ftype == Thrift.Type.STRING) { - this.group = input.readString().value; + this.group = input.readString(); } else { input.skip(ftype); } break; case 10: if (ftype == Thrift.Type.STRING) { - this.since = input.readString().value; + this.since = input.readString(); } else { input.skip(ftype); } break; case 11: if (ftype == Thrift.Type.STRING) { - this.deprecated = input.readString().value; + this.deprecated = input.readString(); } else { input.skip(ftype); } break; case 12: if (ftype == Thrift.Type.STRING) { - this.source = input.readString().value; + this.source = input.readString(); } else { input.skip(ftype); } @@ -3928,7 +3902,7 @@ TExpressionInfo.prototype.write = function(output) { return; }; -TDBSqlConfValue = function(args) { +var TDBSqlConfValue = module.exports.TDBSqlConfValue = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { @@ -3949,7 +3923,7 @@ TDBSqlConfValue.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.value = input.readString().value; + this.value = input.readString(); } else { input.skip(ftype); } @@ -3978,7 +3952,7 @@ TDBSqlConfValue.prototype.write = function(output) { return; }; -TDBSqlSessionConf = function(args) { +var TDBSqlSessionConf = module.exports.TDBSqlSessionConf = function(args) { this.confs = null; this.tempViews = null; this.currentDatabase = null; @@ -3991,7 +3965,7 @@ TDBSqlSessionConf = function(args) { this.confs = Thrift.copyMap(args.confs, [null]); } if (args.tempViews !== undefined && args.tempViews !== null) { - this.tempViews = Thrift.copyList(args.tempViews, [TDBSqlTempView]); + this.tempViews = Thrift.copyList(args.tempViews, [ttypes.TDBSqlTempView]); } if (args.currentDatabase !== undefined && args.currentDatabase !== null) { this.currentDatabase = args.currentDatabase; @@ -4000,13 +3974,13 @@ TDBSqlSessionConf = function(args) { this.currentCatalog = args.currentCatalog; } if (args.sessionCapabilities !== undefined && args.sessionCapabilities !== null) { - this.sessionCapabilities = new TDBSqlSessionCapabilities(args.sessionCapabilities); + this.sessionCapabilities = new ttypes.TDBSqlSessionCapabilities(args.sessionCapabilities); } if (args.expressionsInfos !== undefined && args.expressionsInfos !== null) { - this.expressionsInfos = Thrift.copyList(args.expressionsInfos, [TExpressionInfo]); + this.expressionsInfos = Thrift.copyList(args.expressionsInfos, [ttypes.TExpressionInfo]); } if (args.internalConfs !== undefined && args.internalConfs !== null) { - this.internalConfs = Thrift.copyMap(args.internalConfs, [TDBSqlConfValue]); + this.internalConfs = Thrift.copyMap(args.internalConfs, [ttypes.TDBSqlConfValue]); } } }; @@ -4027,15 +4001,10 @@ TDBSqlSessionConf.prototype.read = function(input) { var _rtmp3123 = input.readMapBegin(); var _size122 = _rtmp3123.size || 0; for (var _i124 = 0; _i124 < _size122; ++_i124) { - if (_i124 > 0 ) { - if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { - input.rstack.pop(); - } - } var key125 = null; var val126 = null; - key125 = input.readString().value; - val126 = input.readString().value; + key125 = input.readString(); + val126 = input.readString(); this.confs[key125] = val126; } input.readMapEnd(); @@ -4050,7 +4019,7 @@ TDBSqlSessionConf.prototype.read = function(input) { var _size127 = _rtmp3128.size || 0; for (var _i129 = 0; _i129 < _size127; ++_i129) { var elem130 = null; - elem130 = new TDBSqlTempView(); + elem130 = new ttypes.TDBSqlTempView(); elem130.read(input); this.tempViews.push(elem130); } @@ -4061,21 +4030,21 @@ TDBSqlSessionConf.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.STRING) { - this.currentDatabase = input.readString().value; + this.currentDatabase = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { - this.currentCatalog = input.readString().value; + this.currentCatalog = input.readString(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRUCT) { - this.sessionCapabilities = new TDBSqlSessionCapabilities(); + this.sessionCapabilities = new ttypes.TDBSqlSessionCapabilities(); this.sessionCapabilities.read(input); } else { input.skip(ftype); @@ -4088,7 +4057,7 @@ TDBSqlSessionConf.prototype.read = function(input) { var _size131 = _rtmp3132.size || 0; for (var _i133 = 0; _i133 < _size131; ++_i133) { var elem134 = null; - elem134 = new TExpressionInfo(); + elem134 = new ttypes.TExpressionInfo(); elem134.read(input); this.expressionsInfos.push(elem134); } @@ -4103,15 +4072,10 @@ TDBSqlSessionConf.prototype.read = function(input) { var _rtmp3136 = input.readMapBegin(); var _size135 = _rtmp3136.size || 0; for (var _i137 = 0; _i137 < _size135; ++_i137) { - if (_i137 > 0 ) { - if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { - input.rstack.pop(); - } - } var key138 = null; var val139 = null; - key138 = input.readString().value; - val139 = new TDBSqlConfValue(); + key138 = input.readString(); + val139 = new ttypes.TDBSqlConfValue(); val139.read(input); this.internalConfs[key138] = val139; } @@ -4201,7 +4165,7 @@ TDBSqlSessionConf.prototype.write = function(output) { return; }; -TStatus = function(args) { +var TStatus = module.exports.TStatus = function(args) { this.statusCode = null; this.infoMessages = null; this.sqlState = null; @@ -4252,7 +4216,7 @@ TStatus.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.statusCode = input.readI32().value; + this.statusCode = input.readI32(); } else { input.skip(ftype); } @@ -4264,7 +4228,7 @@ TStatus.prototype.read = function(input) { var _size146 = _rtmp3147.size || 0; for (var _i148 = 0; _i148 < _size146; ++_i148) { var elem149 = null; - elem149 = input.readString().value; + elem149 = input.readString(); this.infoMessages.push(elem149); } input.readListEnd(); @@ -4274,42 +4238,42 @@ TStatus.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.STRING) { - this.sqlState = input.readString().value; + this.sqlState = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { - this.errorCode = input.readI32().value; + this.errorCode = input.readI32(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { - this.errorMessage = input.readString().value; + this.errorMessage = input.readString(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRING) { - this.displayMessage = input.readString().value; + this.displayMessage = input.readString(); } else { input.skip(ftype); } break; case 1281: if (ftype == Thrift.Type.STRING) { - this.errorDetailsJson = input.readString().value; + this.errorDetailsJson = input.readString(); } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRING) { - this.responseValidation = input.readBinary().value; + this.responseValidation = input.readBinary(); } else { input.skip(ftype); } @@ -4377,7 +4341,7 @@ TStatus.prototype.write = function(output) { return; }; -TNamespace = function(args) { +var TNamespace = module.exports.TNamespace = function(args) { this.catalogName = null; this.schemaName = null; if (args) { @@ -4402,14 +4366,14 @@ TNamespace.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.catalogName = input.readString().value; + this.catalogName = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { - this.schemaName = input.readString().value; + this.schemaName = input.readString(); } else { input.skip(ftype); } @@ -4440,7 +4404,7 @@ TNamespace.prototype.write = function(output) { return; }; -THandleIdentifier = function(args) { +var THandleIdentifier = module.exports.THandleIdentifier = function(args) { this.guid = null; this.secret = null; this.executionVersion = null; @@ -4473,21 +4437,21 @@ THandleIdentifier.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.guid = input.readBinary().value; + this.guid = input.readBinary(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { - this.secret = input.readBinary().value; + this.secret = input.readBinary(); } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.I16) { - this.executionVersion = input.readI16().value; + this.executionVersion = input.readI16(); } else { input.skip(ftype); } @@ -4523,12 +4487,12 @@ THandleIdentifier.prototype.write = function(output) { return; }; -TSessionHandle = function(args) { +var TSessionHandle = module.exports.TSessionHandle = function(args) { this.sessionId = null; this.serverProtocolVersion = null; if (args) { if (args.sessionId !== undefined && args.sessionId !== null) { - this.sessionId = new THandleIdentifier(args.sessionId); + this.sessionId = new ttypes.THandleIdentifier(args.sessionId); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionId is unset!'); } @@ -4550,7 +4514,7 @@ TSessionHandle.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionId = new THandleIdentifier(); + this.sessionId = new ttypes.THandleIdentifier(); this.sessionId.read(input); } else { input.skip(ftype); @@ -4558,7 +4522,7 @@ TSessionHandle.prototype.read = function(input) { break; case 3329: if (ftype == Thrift.Type.I32) { - this.serverProtocolVersion = input.readI32().value; + this.serverProtocolVersion = input.readI32(); } else { input.skip(ftype); } @@ -4589,14 +4553,14 @@ TSessionHandle.prototype.write = function(output) { return; }; -TOperationHandle = function(args) { +var TOperationHandle = module.exports.TOperationHandle = function(args) { this.operationId = null; this.operationType = null; this.hasResultSet = null; this.modifiedRowCount = null; if (args) { if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new THandleIdentifier(args.operationId); + this.operationId = new ttypes.THandleIdentifier(args.operationId); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field operationId is unset!'); } @@ -4628,7 +4592,7 @@ TOperationHandle.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new THandleIdentifier(); + this.operationId = new ttypes.THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -4636,21 +4600,21 @@ TOperationHandle.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.I32) { - this.operationType = input.readI32().value; + this.operationType = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.BOOL) { - this.hasResultSet = input.readBool().value; + this.hasResultSet = input.readBool(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.DOUBLE) { - this.modifiedRowCount = input.readDouble().value; + this.modifiedRowCount = input.readDouble(); } else { input.skip(ftype); } @@ -4691,7 +4655,7 @@ TOperationHandle.prototype.write = function(output) { return; }; -TOpenSessionReq = function(args) { +var TOpenSessionReq = module.exports.TOpenSessionReq = function(args) { this.client_protocol = -7; this.username = null; this.password = null; @@ -4725,13 +4689,13 @@ TOpenSessionReq = function(args) { this.connectionProperties = Thrift.copyMap(args.connectionProperties, [null]); } if (args.initialNamespace !== undefined && args.initialNamespace !== null) { - this.initialNamespace = new TNamespace(args.initialNamespace); + this.initialNamespace = new ttypes.TNamespace(args.initialNamespace); } if (args.canUseMultipleCatalogs !== undefined && args.canUseMultipleCatalogs !== null) { this.canUseMultipleCatalogs = args.canUseMultipleCatalogs; } if (args.sessionId !== undefined && args.sessionId !== null) { - this.sessionId = new THandleIdentifier(args.sessionId); + this.sessionId = new ttypes.THandleIdentifier(args.sessionId); } } }; @@ -4748,21 +4712,21 @@ TOpenSessionReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.client_protocol = input.readI32().value; + this.client_protocol = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { - this.username = input.readString().value; + this.username = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.password = input.readString().value; + this.password = input.readString(); } else { input.skip(ftype); } @@ -4773,15 +4737,10 @@ TOpenSessionReq.prototype.read = function(input) { var _rtmp3152 = input.readMapBegin(); var _size151 = _rtmp3152.size || 0; for (var _i153 = 0; _i153 < _size151; ++_i153) { - if (_i153 > 0 ) { - if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { - input.rstack.pop(); - } - } var key154 = null; var val155 = null; - key154 = input.readString().value; - val155 = input.readString().value; + key154 = input.readString(); + val155 = input.readString(); this.configuration[key154] = val155; } input.readMapEnd(); @@ -4796,7 +4755,7 @@ TOpenSessionReq.prototype.read = function(input) { var _size156 = _rtmp3157.size || 0; for (var _i158 = 0; _i158 < _size156; ++_i158) { var elem159 = null; - elem159 = input.readI32().value; + elem159 = input.readI32(); this.getInfos.push(elem159); } input.readListEnd(); @@ -4806,7 +4765,7 @@ TOpenSessionReq.prototype.read = function(input) { break; case 1282: if (ftype == Thrift.Type.I64) { - this.client_protocol_i64 = input.readI64().value; + this.client_protocol_i64 = input.readI64(); } else { input.skip(ftype); } @@ -4817,15 +4776,10 @@ TOpenSessionReq.prototype.read = function(input) { var _rtmp3161 = input.readMapBegin(); var _size160 = _rtmp3161.size || 0; for (var _i162 = 0; _i162 < _size160; ++_i162) { - if (_i162 > 0 ) { - if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { - input.rstack.pop(); - } - } var key163 = null; var val164 = null; - key163 = input.readString().value; - val164 = input.readString().value; + key163 = input.readString(); + val164 = input.readString(); this.connectionProperties[key163] = val164; } input.readMapEnd(); @@ -4835,7 +4789,7 @@ TOpenSessionReq.prototype.read = function(input) { break; case 1284: if (ftype == Thrift.Type.STRUCT) { - this.initialNamespace = new TNamespace(); + this.initialNamespace = new ttypes.TNamespace(); this.initialNamespace.read(input); } else { input.skip(ftype); @@ -4843,14 +4797,14 @@ TOpenSessionReq.prototype.read = function(input) { break; case 1285: if (ftype == Thrift.Type.BOOL) { - this.canUseMultipleCatalogs = input.readBool().value; + this.canUseMultipleCatalogs = input.readBool(); } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.sessionId = new THandleIdentifier(); + this.sessionId = new ttypes.THandleIdentifier(); this.sessionId.read(input); } else { input.skip(ftype); @@ -4945,7 +4899,7 @@ TOpenSessionReq.prototype.write = function(output) { return; }; -TOpenSessionResp = function(args) { +var TOpenSessionResp = module.exports.TOpenSessionResp = function(args) { this.status = null; this.serverProtocolVersion = null; this.sessionHandle = null; @@ -4955,7 +4909,7 @@ TOpenSessionResp = function(args) { this.getInfos = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } @@ -4965,13 +4919,13 @@ TOpenSessionResp = function(args) { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field serverProtocolVersion is unset!'); } if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new TSessionHandle(args.sessionHandle); + this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); } if (args.configuration !== undefined && args.configuration !== null) { this.configuration = Thrift.copyMap(args.configuration, [null]); } if (args.initialNamespace !== undefined && args.initialNamespace !== null) { - this.initialNamespace = new TNamespace(args.initialNamespace); + this.initialNamespace = new ttypes.TNamespace(args.initialNamespace); } if (args.canUseMultipleCatalogs !== undefined && args.canUseMultipleCatalogs !== null) { this.canUseMultipleCatalogs = args.canUseMultipleCatalogs; @@ -4994,7 +4948,7 @@ TOpenSessionResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -5002,14 +4956,14 @@ TOpenSessionResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.I32) { - this.serverProtocolVersion = input.readI32().value; + this.serverProtocolVersion = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new TSessionHandle(); + this.sessionHandle = new ttypes.TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -5021,15 +4975,10 @@ TOpenSessionResp.prototype.read = function(input) { var _rtmp3171 = input.readMapBegin(); var _size170 = _rtmp3171.size || 0; for (var _i172 = 0; _i172 < _size170; ++_i172) { - if (_i172 > 0 ) { - if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { - input.rstack.pop(); - } - } var key173 = null; var val174 = null; - key173 = input.readString().value; - val174 = input.readString().value; + key173 = input.readString(); + val174 = input.readString(); this.configuration[key173] = val174; } input.readMapEnd(); @@ -5039,7 +4988,7 @@ TOpenSessionResp.prototype.read = function(input) { break; case 1284: if (ftype == Thrift.Type.STRUCT) { - this.initialNamespace = new TNamespace(); + this.initialNamespace = new ttypes.TNamespace(); this.initialNamespace.read(input); } else { input.skip(ftype); @@ -5047,7 +4996,7 @@ TOpenSessionResp.prototype.read = function(input) { break; case 1285: if (ftype == Thrift.Type.BOOL) { - this.canUseMultipleCatalogs = input.readBool().value; + this.canUseMultipleCatalogs = input.readBool(); } else { input.skip(ftype); } @@ -5059,7 +5008,7 @@ TOpenSessionResp.prototype.read = function(input) { var _size175 = _rtmp3176.size || 0; for (var _i177 = 0; _i177 < _size175; ++_i177) { var elem178 = null; - elem178 = new TGetInfoValue(); + elem178 = new ttypes.TGetInfoValue(); elem178.read(input); this.getInfos.push(elem178); } @@ -5134,11 +5083,11 @@ TOpenSessionResp.prototype.write = function(output) { return; }; -TCloseSessionReq = function(args) { +var TCloseSessionReq = module.exports.TCloseSessionReq = function(args) { this.sessionHandle = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new TSessionHandle(args.sessionHandle); + this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -5157,7 +5106,7 @@ TCloseSessionReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new TSessionHandle(); + this.sessionHandle = new ttypes.TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -5187,11 +5136,11 @@ TCloseSessionReq.prototype.write = function(output) { return; }; -TCloseSessionResp = function(args) { +var TCloseSessionResp = module.exports.TCloseSessionResp = function(args) { this.status = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } @@ -5210,7 +5159,7 @@ TCloseSessionResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -5240,7 +5189,7 @@ TCloseSessionResp.prototype.write = function(output) { return; }; -TGetInfoValue = function(args) { +var TGetInfoValue = module.exports.TGetInfoValue = function(args) { this.stringValue = null; this.smallIntValue = null; this.integerBitmask = null; @@ -5281,42 +5230,42 @@ TGetInfoValue.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.stringValue = input.readString().value; + this.stringValue = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I16) { - this.smallIntValue = input.readI16().value; + this.smallIntValue = input.readI16(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { - this.integerBitmask = input.readI32().value; + this.integerBitmask = input.readI32(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { - this.integerFlag = input.readI32().value; + this.integerFlag = input.readI32(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.I32) { - this.binaryValue = input.readI32().value; + this.binaryValue = input.readI32(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.I64) { - this.lenValue = input.readI64().value; + this.lenValue = input.readI64(); } else { input.skip(ftype); } @@ -5367,13 +5316,13 @@ TGetInfoValue.prototype.write = function(output) { return; }; -TGetInfoReq = function(args) { +var TGetInfoReq = module.exports.TGetInfoReq = function(args) { this.sessionHandle = null; this.infoType = null; this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new TSessionHandle(args.sessionHandle); + this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -5383,7 +5332,7 @@ TGetInfoReq = function(args) { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field infoType is unset!'); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); } } }; @@ -5400,7 +5349,7 @@ TGetInfoReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new TSessionHandle(); + this.sessionHandle = new ttypes.TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -5408,14 +5357,14 @@ TGetInfoReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.I32) { - this.infoType = input.readI32().value; + this.infoType = input.readI32(); } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new TDBSqlSessionConf(); + this.sessionConf = new ttypes.TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -5452,17 +5401,17 @@ TGetInfoReq.prototype.write = function(output) { return; }; -TGetInfoResp = function(args) { +var TGetInfoResp = module.exports.TGetInfoResp = function(args) { this.status = null; this.infoValue = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.infoValue !== undefined && args.infoValue !== null) { - this.infoValue = new TGetInfoValue(args.infoValue); + this.infoValue = new ttypes.TGetInfoValue(args.infoValue); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field infoValue is unset!'); } @@ -5481,7 +5430,7 @@ TGetInfoResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -5489,7 +5438,7 @@ TGetInfoResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.infoValue = new TGetInfoValue(); + this.infoValue = new ttypes.TGetInfoValue(); this.infoValue.read(input); } else { input.skip(ftype); @@ -5521,7 +5470,7 @@ TGetInfoResp.prototype.write = function(output) { return; }; -TSparkGetDirectResults = function(args) { +var TSparkGetDirectResults = module.exports.TSparkGetDirectResults = function(args) { this.maxRows = null; this.maxBytes = null; if (args) { @@ -5548,14 +5497,14 @@ TSparkGetDirectResults.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I64) { - this.maxRows = input.readI64().value; + this.maxRows = input.readI64(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I64) { - this.maxBytes = input.readI64().value; + this.maxBytes = input.readI64(); } else { input.skip(ftype); } @@ -5586,23 +5535,23 @@ TSparkGetDirectResults.prototype.write = function(output) { return; }; -TSparkDirectResults = function(args) { +var TSparkDirectResults = module.exports.TSparkDirectResults = function(args) { this.operationStatus = null; this.resultSetMetadata = null; this.resultSet = null; this.closeOperation = null; if (args) { if (args.operationStatus !== undefined && args.operationStatus !== null) { - this.operationStatus = new TGetOperationStatusResp(args.operationStatus); + this.operationStatus = new ttypes.TGetOperationStatusResp(args.operationStatus); } if (args.resultSetMetadata !== undefined && args.resultSetMetadata !== null) { - this.resultSetMetadata = new TGetResultSetMetadataResp(args.resultSetMetadata); + this.resultSetMetadata = new ttypes.TGetResultSetMetadataResp(args.resultSetMetadata); } if (args.resultSet !== undefined && args.resultSet !== null) { - this.resultSet = new TFetchResultsResp(args.resultSet); + this.resultSet = new ttypes.TFetchResultsResp(args.resultSet); } if (args.closeOperation !== undefined && args.closeOperation !== null) { - this.closeOperation = new TCloseOperationResp(args.closeOperation); + this.closeOperation = new ttypes.TCloseOperationResp(args.closeOperation); } } }; @@ -5619,7 +5568,7 @@ TSparkDirectResults.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.operationStatus = new TGetOperationStatusResp(); + this.operationStatus = new ttypes.TGetOperationStatusResp(); this.operationStatus.read(input); } else { input.skip(ftype); @@ -5627,7 +5576,7 @@ TSparkDirectResults.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.resultSetMetadata = new TGetResultSetMetadataResp(); + this.resultSetMetadata = new ttypes.TGetResultSetMetadataResp(); this.resultSetMetadata.read(input); } else { input.skip(ftype); @@ -5635,7 +5584,7 @@ TSparkDirectResults.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.STRUCT) { - this.resultSet = new TFetchResultsResp(); + this.resultSet = new ttypes.TFetchResultsResp(); this.resultSet.read(input); } else { input.skip(ftype); @@ -5643,7 +5592,7 @@ TSparkDirectResults.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.STRUCT) { - this.closeOperation = new TCloseOperationResp(); + this.closeOperation = new ttypes.TCloseOperationResp(); this.closeOperation.read(input); } else { input.skip(ftype); @@ -5685,7 +5634,7 @@ TSparkDirectResults.prototype.write = function(output) { return; }; -TSparkArrowTypes = function(args) { +var TSparkArrowTypes = module.exports.TSparkArrowTypes = function(args) { this.timestampAsArrow = null; this.decimalAsArrow = null; this.complexTypesAsArrow = null; @@ -5722,35 +5671,35 @@ TSparkArrowTypes.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.BOOL) { - this.timestampAsArrow = input.readBool().value; + this.timestampAsArrow = input.readBool(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.BOOL) { - this.decimalAsArrow = input.readBool().value; + this.decimalAsArrow = input.readBool(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.BOOL) { - this.complexTypesAsArrow = input.readBool().value; + this.complexTypesAsArrow = input.readBool(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.BOOL) { - this.intervalTypesAsArrow = input.readBool().value; + this.intervalTypesAsArrow = input.readBool(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.BOOL) { - this.nullTypeAsArrow = input.readBool().value; + this.nullTypeAsArrow = input.readBool(); } else { input.skip(ftype); } @@ -5796,7 +5745,7 @@ TSparkArrowTypes.prototype.write = function(output) { return; }; -TExecuteStatementReq = function(args) { +var TExecuteStatementReq = module.exports.TExecuteStatementReq = function(args) { this.sessionHandle = null; this.statement = null; this.confOverlay = null; @@ -5834,7 +5783,7 @@ TExecuteStatementReq = function(args) { this.idempotencyToken = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new TSessionHandle(args.sessionHandle); + this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -5850,7 +5799,7 @@ TExecuteStatementReq = function(args) { this.runAsync = args.runAsync; } if (args.getDirectResults !== undefined && args.getDirectResults !== null) { - this.getDirectResults = new TSparkGetDirectResults(args.getDirectResults); + this.getDirectResults = new ttypes.TSparkGetDirectResults(args.getDirectResults); } if (args.queryTimeout !== undefined && args.queryTimeout !== null) { this.queryTimeout = args.queryTimeout; @@ -5868,25 +5817,25 @@ TExecuteStatementReq = function(args) { this.maxBytesPerFile = args.maxBytesPerFile; } if (args.useArrowNativeTypes !== undefined && args.useArrowNativeTypes !== null) { - this.useArrowNativeTypes = new TSparkArrowTypes(args.useArrowNativeTypes); + this.useArrowNativeTypes = new ttypes.TSparkArrowTypes(args.useArrowNativeTypes); } if (args.resultRowLimit !== undefined && args.resultRowLimit !== null) { this.resultRowLimit = args.resultRowLimit; } if (args.parameters !== undefined && args.parameters !== null) { - this.parameters = Thrift.copyList(args.parameters, [TSparkParameter]); + this.parameters = Thrift.copyList(args.parameters, [ttypes.TSparkParameter]); } if (args.maxBytesPerBatch !== undefined && args.maxBytesPerBatch !== null) { this.maxBytesPerBatch = args.maxBytesPerBatch; } if (args.statementConf !== undefined && args.statementConf !== null) { - this.statementConf = new TStatementConf(args.statementConf); + this.statementConf = new ttypes.TStatementConf(args.statementConf); } if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new THandleIdentifier(args.operationId); + this.operationId = new ttypes.THandleIdentifier(args.operationId); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); } if (args.rejectHighCostQueries !== undefined && args.rejectHighCostQueries !== null) { this.rejectHighCostQueries = args.rejectHighCostQueries; @@ -5925,7 +5874,7 @@ TExecuteStatementReq = function(args) { this.resultByteLimit = args.resultByteLimit; } if (args.resultDataFormat !== undefined && args.resultDataFormat !== null) { - this.resultDataFormat = new TDBSqlResultFormat(args.resultDataFormat); + this.resultDataFormat = new ttypes.TDBSqlResultFormat(args.resultDataFormat); } if (args.originatingClientIdentity !== undefined && args.originatingClientIdentity !== null) { this.originatingClientIdentity = args.originatingClientIdentity; @@ -5957,7 +5906,7 @@ TExecuteStatementReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new TSessionHandle(); + this.sessionHandle = new ttypes.TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -5965,7 +5914,7 @@ TExecuteStatementReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.statement = input.readString().value; + this.statement = input.readString(); } else { input.skip(ftype); } @@ -5976,15 +5925,10 @@ TExecuteStatementReq.prototype.read = function(input) { var _rtmp3183 = input.readMapBegin(); var _size182 = _rtmp3183.size || 0; for (var _i184 = 0; _i184 < _size182; ++_i184) { - if (_i184 > 0 ) { - if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { - input.rstack.pop(); - } - } var key185 = null; var val186 = null; - key185 = input.readString().value; - val186 = input.readString().value; + key185 = input.readString(); + val186 = input.readString(); this.confOverlay[key185] = val186; } input.readMapEnd(); @@ -5994,14 +5938,14 @@ TExecuteStatementReq.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.BOOL) { - this.runAsync = input.readBool().value; + this.runAsync = input.readBool(); } else { input.skip(ftype); } break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.getDirectResults = new TSparkGetDirectResults(); + this.getDirectResults = new ttypes.TSparkGetDirectResults(); this.getDirectResults.read(input); } else { input.skip(ftype); @@ -6009,42 +5953,42 @@ TExecuteStatementReq.prototype.read = function(input) { break; case 5: if (ftype == Thrift.Type.I64) { - this.queryTimeout = input.readI64().value; + this.queryTimeout = input.readI64(); } else { input.skip(ftype); } break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.canReadArrowResult = input.readBool().value; + this.canReadArrowResult = input.readBool(); } else { input.skip(ftype); } break; case 1283: if (ftype == Thrift.Type.BOOL) { - this.canDownloadResult = input.readBool().value; + this.canDownloadResult = input.readBool(); } else { input.skip(ftype); } break; case 1284: if (ftype == Thrift.Type.BOOL) { - this.canDecompressLZ4Result = input.readBool().value; + this.canDecompressLZ4Result = input.readBool(); } else { input.skip(ftype); } break; case 1285: if (ftype == Thrift.Type.I64) { - this.maxBytesPerFile = input.readI64().value; + this.maxBytesPerFile = input.readI64(); } else { input.skip(ftype); } break; case 1286: if (ftype == Thrift.Type.STRUCT) { - this.useArrowNativeTypes = new TSparkArrowTypes(); + this.useArrowNativeTypes = new ttypes.TSparkArrowTypes(); this.useArrowNativeTypes.read(input); } else { input.skip(ftype); @@ -6052,7 +5996,7 @@ TExecuteStatementReq.prototype.read = function(input) { break; case 1287: if (ftype == Thrift.Type.I64) { - this.resultRowLimit = input.readI64().value; + this.resultRowLimit = input.readI64(); } else { input.skip(ftype); } @@ -6064,7 +6008,7 @@ TExecuteStatementReq.prototype.read = function(input) { var _size187 = _rtmp3188.size || 0; for (var _i189 = 0; _i189 < _size187; ++_i189) { var elem190 = null; - elem190 = new TSparkParameter(); + elem190 = new ttypes.TSparkParameter(); elem190.read(input); this.parameters.push(elem190); } @@ -6075,14 +6019,14 @@ TExecuteStatementReq.prototype.read = function(input) { break; case 1289: if (ftype == Thrift.Type.I64) { - this.maxBytesPerBatch = input.readI64().value; + this.maxBytesPerBatch = input.readI64(); } else { input.skip(ftype); } break; case 1296: if (ftype == Thrift.Type.STRUCT) { - this.statementConf = new TStatementConf(); + this.statementConf = new ttypes.TStatementConf(); this.statementConf.read(input); } else { input.skip(ftype); @@ -6090,7 +6034,7 @@ TExecuteStatementReq.prototype.read = function(input) { break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new THandleIdentifier(); + this.operationId = new ttypes.THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -6098,7 +6042,7 @@ TExecuteStatementReq.prototype.read = function(input) { break; case 3330: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new TDBSqlSessionConf(); + this.sessionConf = new ttypes.TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -6106,56 +6050,56 @@ TExecuteStatementReq.prototype.read = function(input) { break; case 3331: if (ftype == Thrift.Type.BOOL) { - this.rejectHighCostQueries = input.readBool().value; + this.rejectHighCostQueries = input.readBool(); } else { input.skip(ftype); } break; case 3332: if (ftype == Thrift.Type.DOUBLE) { - this.estimatedCost = input.readDouble().value; + this.estimatedCost = input.readDouble(); } else { input.skip(ftype); } break; case 3333: if (ftype == Thrift.Type.I16) { - this.executionVersion = input.readI16().value; + this.executionVersion = input.readI16(); } else { input.skip(ftype); } break; case 3334: if (ftype == Thrift.Type.STRING) { - this.requestValidation = input.readBinary().value; + this.requestValidation = input.readBinary(); } else { input.skip(ftype); } break; case 3335: if (ftype == Thrift.Type.I32) { - this.resultPersistenceMode = input.readI32().value; + this.resultPersistenceMode = input.readI32(); } else { input.skip(ftype); } break; case 3336: if (ftype == Thrift.Type.BOOL) { - this.trimArrowBatchesToLimit = input.readBool().value; + this.trimArrowBatchesToLimit = input.readBool(); } else { input.skip(ftype); } break; case 3337: if (ftype == Thrift.Type.I32) { - this.fetchDisposition = input.readI32().value; + this.fetchDisposition = input.readI32(); } else { input.skip(ftype); } break; case 3344: if (ftype == Thrift.Type.BOOL) { - this.enforceResultPersistenceMode = input.readBool().value; + this.enforceResultPersistenceMode = input.readBool(); } else { input.skip(ftype); } @@ -6167,7 +6111,7 @@ TExecuteStatementReq.prototype.read = function(input) { var _size191 = _rtmp3192.size || 0; for (var _i193 = 0; _i193 < _size191; ++_i193) { var elem194 = null; - elem194 = new TDBSqlStatement(); + elem194 = new ttypes.TDBSqlStatement(); elem194.read(input); this.statementList.push(elem194); } @@ -6178,28 +6122,28 @@ TExecuteStatementReq.prototype.read = function(input) { break; case 3346: if (ftype == Thrift.Type.BOOL) { - this.persistResultManifest = input.readBool().value; + this.persistResultManifest = input.readBool(); } else { input.skip(ftype); } break; case 3347: if (ftype == Thrift.Type.I64) { - this.resultRetentionSeconds = input.readI64().value; + this.resultRetentionSeconds = input.readI64(); } else { input.skip(ftype); } break; case 3348: if (ftype == Thrift.Type.I64) { - this.resultByteLimit = input.readI64().value; + this.resultByteLimit = input.readI64(); } else { input.skip(ftype); } break; case 3349: if (ftype == Thrift.Type.STRUCT) { - this.resultDataFormat = new TDBSqlResultFormat(); + this.resultDataFormat = new ttypes.TDBSqlResultFormat(); this.resultDataFormat.read(input); } else { input.skip(ftype); @@ -6207,35 +6151,35 @@ TExecuteStatementReq.prototype.read = function(input) { break; case 3350: if (ftype == Thrift.Type.STRING) { - this.originatingClientIdentity = input.readString().value; + this.originatingClientIdentity = input.readString(); } else { input.skip(ftype); } break; case 3351: if (ftype == Thrift.Type.BOOL) { - this.preferSingleFileResult = input.readBool().value; + this.preferSingleFileResult = input.readBool(); } else { input.skip(ftype); } break; case 3352: if (ftype == Thrift.Type.BOOL) { - this.preferDriverOnlyUpload = input.readBool().value; + this.preferDriverOnlyUpload = input.readBool(); } else { input.skip(ftype); } break; case 3353: if (ftype == Thrift.Type.BOOL) { - this.enforceEmbeddedSchemaCorrectness = input.readBool().value; + this.enforceEmbeddedSchemaCorrectness = input.readBool(); } else { input.skip(ftype); } break; case 3360: if (ftype == Thrift.Type.STRING) { - this.idempotencyToken = input.readString().value; + this.idempotencyToken = input.readString(); } else { input.skip(ftype); } @@ -6453,7 +6397,7 @@ TExecuteStatementReq.prototype.write = function(output) { return; }; -TDBSqlStatement = function(args) { +var TDBSqlStatement = module.exports.TDBSqlStatement = function(args) { this.statement = null; if (args) { if (args.statement !== undefined && args.statement !== null) { @@ -6474,7 +6418,7 @@ TDBSqlStatement.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.statement = input.readString().value; + this.statement = input.readString(); } else { input.skip(ftype); } @@ -6503,7 +6447,7 @@ TDBSqlStatement.prototype.write = function(output) { return; }; -TSparkParameterValue = function(args) { +var TSparkParameterValue = module.exports.TSparkParameterValue = function(args) { this.stringValue = null; this.doubleValue = null; this.booleanValue = null; @@ -6532,21 +6476,21 @@ TSparkParameterValue.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { - this.stringValue = input.readString().value; + this.stringValue = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.DOUBLE) { - this.doubleValue = input.readDouble().value; + this.doubleValue = input.readDouble(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.BOOL) { - this.booleanValue = input.readBool().value; + this.booleanValue = input.readBool(); } else { input.skip(ftype); } @@ -6582,7 +6526,7 @@ TSparkParameterValue.prototype.write = function(output) { return; }; -TSparkParameter = function(args) { +var TSparkParameter = module.exports.TSparkParameter = function(args) { this.ordinal = null; this.name = null; this.type = null; @@ -6598,7 +6542,7 @@ TSparkParameter = function(args) { this.type = args.type; } if (args.value !== undefined && args.value !== null) { - this.value = new TSparkParameterValue(args.value); + this.value = new ttypes.TSparkParameterValue(args.value); } } }; @@ -6615,28 +6559,28 @@ TSparkParameter.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.I32) { - this.ordinal = input.readI32().value; + this.ordinal = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { - this.name = input.readString().value; + this.name = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.type = input.readString().value; + this.type = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRUCT) { - this.value = new TSparkParameterValue(); + this.value = new ttypes.TSparkParameterValue(); this.value.read(input); } else { input.skip(ftype); @@ -6678,7 +6622,7 @@ TSparkParameter.prototype.write = function(output) { return; }; -TStatementConf = function(args) { +var TStatementConf = module.exports.TStatementConf = function(args) { this.sessionless = null; this.initialNamespace = null; this.client_protocol = null; @@ -6688,7 +6632,7 @@ TStatementConf = function(args) { this.sessionless = args.sessionless; } if (args.initialNamespace !== undefined && args.initialNamespace !== null) { - this.initialNamespace = new TNamespace(args.initialNamespace); + this.initialNamespace = new ttypes.TNamespace(args.initialNamespace); } if (args.client_protocol !== undefined && args.client_protocol !== null) { this.client_protocol = args.client_protocol; @@ -6711,14 +6655,14 @@ TStatementConf.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.BOOL) { - this.sessionless = input.readBool().value; + this.sessionless = input.readBool(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.initialNamespace = new TNamespace(); + this.initialNamespace = new ttypes.TNamespace(); this.initialNamespace.read(input); } else { input.skip(ftype); @@ -6726,14 +6670,14 @@ TStatementConf.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.I32) { - this.client_protocol = input.readI32().value; + this.client_protocol = input.readI32(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I64) { - this.client_protocol_i64 = input.readI64().value; + this.client_protocol_i64 = input.readI64(); } else { input.skip(ftype); } @@ -6774,7 +6718,7 @@ TStatementConf.prototype.write = function(output) { return; }; -TExecuteStatementResp = function(args) { +var TExecuteStatementResp = module.exports.TExecuteStatementResp = function(args) { this.status = null; this.operationHandle = null; this.directResults = null; @@ -6789,15 +6733,15 @@ TExecuteStatementResp = function(args) { this.operationHandles = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new TOperationHandle(args.operationHandle); + this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); } if (args.directResults !== undefined && args.directResults !== null) { - this.directResults = new TSparkDirectResults(args.directResults); + this.directResults = new ttypes.TSparkDirectResults(args.directResults); } if (args.executionRejected !== undefined && args.executionRejected !== null) { this.executionRejected = args.executionRejected; @@ -6809,7 +6753,7 @@ TExecuteStatementResp = function(args) { this.queryCost = args.queryCost; } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); } if (args.currentClusterLoad !== undefined && args.currentClusterLoad !== null) { this.currentClusterLoad = args.currentClusterLoad; @@ -6824,7 +6768,7 @@ TExecuteStatementResp = function(args) { this.isServerless = args.isServerless; } if (args.operationHandles !== undefined && args.operationHandles !== null) { - this.operationHandles = Thrift.copyList(args.operationHandles, [TOperationHandle]); + this.operationHandles = Thrift.copyList(args.operationHandles, [ttypes.TOperationHandle]); } } }; @@ -6841,7 +6785,7 @@ TExecuteStatementResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -6849,7 +6793,7 @@ TExecuteStatementResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new TOperationHandle(); + this.operationHandle = new ttypes.TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -6857,7 +6801,7 @@ TExecuteStatementResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.directResults = new TSparkDirectResults(); + this.directResults = new ttypes.TSparkDirectResults(); this.directResults.read(input); } else { input.skip(ftype); @@ -6865,28 +6809,28 @@ TExecuteStatementResp.prototype.read = function(input) { break; case 3329: if (ftype == Thrift.Type.BOOL) { - this.executionRejected = input.readBool().value; + this.executionRejected = input.readBool(); } else { input.skip(ftype); } break; case 3330: if (ftype == Thrift.Type.DOUBLE) { - this.maxClusterCapacity = input.readDouble().value; + this.maxClusterCapacity = input.readDouble(); } else { input.skip(ftype); } break; case 3331: if (ftype == Thrift.Type.DOUBLE) { - this.queryCost = input.readDouble().value; + this.queryCost = input.readDouble(); } else { input.skip(ftype); } break; case 3332: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new TDBSqlSessionConf(); + this.sessionConf = new ttypes.TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -6894,28 +6838,28 @@ TExecuteStatementResp.prototype.read = function(input) { break; case 3333: if (ftype == Thrift.Type.DOUBLE) { - this.currentClusterLoad = input.readDouble().value; + this.currentClusterLoad = input.readDouble(); } else { input.skip(ftype); } break; case 3334: if (ftype == Thrift.Type.I32) { - this.idempotencyType = input.readI32().value; + this.idempotencyType = input.readI32(); } else { input.skip(ftype); } break; case 3335: if (ftype == Thrift.Type.BOOL) { - this.remoteResultCacheEnabled = input.readBool().value; + this.remoteResultCacheEnabled = input.readBool(); } else { input.skip(ftype); } break; case 3336: if (ftype == Thrift.Type.BOOL) { - this.isServerless = input.readBool().value; + this.isServerless = input.readBool(); } else { input.skip(ftype); } @@ -6927,7 +6871,7 @@ TExecuteStatementResp.prototype.read = function(input) { var _size199 = _rtmp3200.size || 0; for (var _i201 = 0; _i201 < _size199; ++_i201) { var elem202 = null; - elem202 = new TOperationHandle(); + elem202 = new ttypes.TOperationHandle(); elem202.read(input); this.operationHandles.push(elem202); } @@ -7019,7 +6963,7 @@ TExecuteStatementResp.prototype.write = function(output) { return; }; -TGetTypeInfoReq = function(args) { +var TGetTypeInfoReq = module.exports.TGetTypeInfoReq = function(args) { this.sessionHandle = null; this.getDirectResults = null; this.runAsync = false; @@ -7027,21 +6971,21 @@ TGetTypeInfoReq = function(args) { this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new TSessionHandle(args.sessionHandle); + this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } if (args.getDirectResults !== undefined && args.getDirectResults !== null) { - this.getDirectResults = new TSparkGetDirectResults(args.getDirectResults); + this.getDirectResults = new ttypes.TSparkGetDirectResults(args.getDirectResults); } if (args.runAsync !== undefined && args.runAsync !== null) { this.runAsync = args.runAsync; } if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new THandleIdentifier(args.operationId); + this.operationId = new ttypes.THandleIdentifier(args.operationId); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); } } }; @@ -7058,7 +7002,7 @@ TGetTypeInfoReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new TSessionHandle(); + this.sessionHandle = new ttypes.TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -7066,7 +7010,7 @@ TGetTypeInfoReq.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.getDirectResults = new TSparkGetDirectResults(); + this.getDirectResults = new ttypes.TSparkGetDirectResults(); this.getDirectResults.read(input); } else { input.skip(ftype); @@ -7074,14 +7018,14 @@ TGetTypeInfoReq.prototype.read = function(input) { break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.runAsync = input.readBool().value; + this.runAsync = input.readBool(); } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new THandleIdentifier(); + this.operationId = new ttypes.THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -7089,7 +7033,7 @@ TGetTypeInfoReq.prototype.read = function(input) { break; case 3330: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new TDBSqlSessionConf(); + this.sessionConf = new ttypes.TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -7136,21 +7080,21 @@ TGetTypeInfoReq.prototype.write = function(output) { return; }; -TGetTypeInfoResp = function(args) { +var TGetTypeInfoResp = module.exports.TGetTypeInfoResp = function(args) { this.status = null; this.operationHandle = null; this.directResults = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new TOperationHandle(args.operationHandle); + this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); } if (args.directResults !== undefined && args.directResults !== null) { - this.directResults = new TSparkDirectResults(args.directResults); + this.directResults = new ttypes.TSparkDirectResults(args.directResults); } } }; @@ -7167,7 +7111,7 @@ TGetTypeInfoResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -7175,7 +7119,7 @@ TGetTypeInfoResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new TOperationHandle(); + this.operationHandle = new ttypes.TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -7183,7 +7127,7 @@ TGetTypeInfoResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.directResults = new TSparkDirectResults(); + this.directResults = new ttypes.TSparkDirectResults(); this.directResults.read(input); } else { input.skip(ftype); @@ -7220,7 +7164,7 @@ TGetTypeInfoResp.prototype.write = function(output) { return; }; -TGetCatalogsReq = function(args) { +var TGetCatalogsReq = module.exports.TGetCatalogsReq = function(args) { this.sessionHandle = null; this.getDirectResults = null; this.runAsync = false; @@ -7228,21 +7172,21 @@ TGetCatalogsReq = function(args) { this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new TSessionHandle(args.sessionHandle); + this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } if (args.getDirectResults !== undefined && args.getDirectResults !== null) { - this.getDirectResults = new TSparkGetDirectResults(args.getDirectResults); + this.getDirectResults = new ttypes.TSparkGetDirectResults(args.getDirectResults); } if (args.runAsync !== undefined && args.runAsync !== null) { this.runAsync = args.runAsync; } if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new THandleIdentifier(args.operationId); + this.operationId = new ttypes.THandleIdentifier(args.operationId); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); } } }; @@ -7259,7 +7203,7 @@ TGetCatalogsReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new TSessionHandle(); + this.sessionHandle = new ttypes.TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -7267,7 +7211,7 @@ TGetCatalogsReq.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.getDirectResults = new TSparkGetDirectResults(); + this.getDirectResults = new ttypes.TSparkGetDirectResults(); this.getDirectResults.read(input); } else { input.skip(ftype); @@ -7275,14 +7219,14 @@ TGetCatalogsReq.prototype.read = function(input) { break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.runAsync = input.readBool().value; + this.runAsync = input.readBool(); } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new THandleIdentifier(); + this.operationId = new ttypes.THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -7290,7 +7234,7 @@ TGetCatalogsReq.prototype.read = function(input) { break; case 3330: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new TDBSqlSessionConf(); + this.sessionConf = new ttypes.TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -7337,21 +7281,21 @@ TGetCatalogsReq.prototype.write = function(output) { return; }; -TGetCatalogsResp = function(args) { +var TGetCatalogsResp = module.exports.TGetCatalogsResp = function(args) { this.status = null; this.operationHandle = null; this.directResults = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new TOperationHandle(args.operationHandle); + this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); } if (args.directResults !== undefined && args.directResults !== null) { - this.directResults = new TSparkDirectResults(args.directResults); + this.directResults = new ttypes.TSparkDirectResults(args.directResults); } } }; @@ -7368,7 +7312,7 @@ TGetCatalogsResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -7376,7 +7320,7 @@ TGetCatalogsResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new TOperationHandle(); + this.operationHandle = new ttypes.TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -7384,7 +7328,7 @@ TGetCatalogsResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.directResults = new TSparkDirectResults(); + this.directResults = new ttypes.TSparkDirectResults(); this.directResults.read(input); } else { input.skip(ftype); @@ -7421,7 +7365,7 @@ TGetCatalogsResp.prototype.write = function(output) { return; }; -TGetSchemasReq = function(args) { +var TGetSchemasReq = module.exports.TGetSchemasReq = function(args) { this.sessionHandle = null; this.catalogName = null; this.schemaName = null; @@ -7431,7 +7375,7 @@ TGetSchemasReq = function(args) { this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new TSessionHandle(args.sessionHandle); + this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -7442,16 +7386,16 @@ TGetSchemasReq = function(args) { this.schemaName = args.schemaName; } if (args.getDirectResults !== undefined && args.getDirectResults !== null) { - this.getDirectResults = new TSparkGetDirectResults(args.getDirectResults); + this.getDirectResults = new ttypes.TSparkGetDirectResults(args.getDirectResults); } if (args.runAsync !== undefined && args.runAsync !== null) { this.runAsync = args.runAsync; } if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new THandleIdentifier(args.operationId); + this.operationId = new ttypes.THandleIdentifier(args.operationId); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); } } }; @@ -7468,7 +7412,7 @@ TGetSchemasReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new TSessionHandle(); + this.sessionHandle = new ttypes.TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -7476,21 +7420,21 @@ TGetSchemasReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.catalogName = input.readString().value; + this.catalogName = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.schemaName = input.readString().value; + this.schemaName = input.readString(); } else { input.skip(ftype); } break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.getDirectResults = new TSparkGetDirectResults(); + this.getDirectResults = new ttypes.TSparkGetDirectResults(); this.getDirectResults.read(input); } else { input.skip(ftype); @@ -7498,14 +7442,14 @@ TGetSchemasReq.prototype.read = function(input) { break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.runAsync = input.readBool().value; + this.runAsync = input.readBool(); } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new THandleIdentifier(); + this.operationId = new ttypes.THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -7513,7 +7457,7 @@ TGetSchemasReq.prototype.read = function(input) { break; case 3330: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new TDBSqlSessionConf(); + this.sessionConf = new ttypes.TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -7570,21 +7514,21 @@ TGetSchemasReq.prototype.write = function(output) { return; }; -TGetSchemasResp = function(args) { +var TGetSchemasResp = module.exports.TGetSchemasResp = function(args) { this.status = null; this.operationHandle = null; this.directResults = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new TOperationHandle(args.operationHandle); + this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); } if (args.directResults !== undefined && args.directResults !== null) { - this.directResults = new TSparkDirectResults(args.directResults); + this.directResults = new ttypes.TSparkDirectResults(args.directResults); } } }; @@ -7601,7 +7545,7 @@ TGetSchemasResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -7609,7 +7553,7 @@ TGetSchemasResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new TOperationHandle(); + this.operationHandle = new ttypes.TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -7617,7 +7561,7 @@ TGetSchemasResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.directResults = new TSparkDirectResults(); + this.directResults = new ttypes.TSparkDirectResults(); this.directResults.read(input); } else { input.skip(ftype); @@ -7654,7 +7598,7 @@ TGetSchemasResp.prototype.write = function(output) { return; }; -TGetTablesReq = function(args) { +var TGetTablesReq = module.exports.TGetTablesReq = function(args) { this.sessionHandle = null; this.catalogName = null; this.schemaName = null; @@ -7666,7 +7610,7 @@ TGetTablesReq = function(args) { this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new TSessionHandle(args.sessionHandle); + this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -7683,16 +7627,16 @@ TGetTablesReq = function(args) { this.tableTypes = Thrift.copyList(args.tableTypes, [null]); } if (args.getDirectResults !== undefined && args.getDirectResults !== null) { - this.getDirectResults = new TSparkGetDirectResults(args.getDirectResults); + this.getDirectResults = new ttypes.TSparkGetDirectResults(args.getDirectResults); } if (args.runAsync !== undefined && args.runAsync !== null) { this.runAsync = args.runAsync; } if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new THandleIdentifier(args.operationId); + this.operationId = new ttypes.THandleIdentifier(args.operationId); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); } } }; @@ -7709,7 +7653,7 @@ TGetTablesReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new TSessionHandle(); + this.sessionHandle = new ttypes.TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -7717,21 +7661,21 @@ TGetTablesReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.catalogName = input.readString().value; + this.catalogName = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.schemaName = input.readString().value; + this.schemaName = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { - this.tableName = input.readString().value; + this.tableName = input.readString(); } else { input.skip(ftype); } @@ -7743,7 +7687,7 @@ TGetTablesReq.prototype.read = function(input) { var _size204 = _rtmp3205.size || 0; for (var _i206 = 0; _i206 < _size204; ++_i206) { var elem207 = null; - elem207 = input.readString().value; + elem207 = input.readString(); this.tableTypes.push(elem207); } input.readListEnd(); @@ -7753,7 +7697,7 @@ TGetTablesReq.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.getDirectResults = new TSparkGetDirectResults(); + this.getDirectResults = new ttypes.TSparkGetDirectResults(); this.getDirectResults.read(input); } else { input.skip(ftype); @@ -7761,14 +7705,14 @@ TGetTablesReq.prototype.read = function(input) { break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.runAsync = input.readBool().value; + this.runAsync = input.readBool(); } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new THandleIdentifier(); + this.operationId = new ttypes.THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -7776,7 +7720,7 @@ TGetTablesReq.prototype.read = function(input) { break; case 3330: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new TDBSqlSessionConf(); + this.sessionConf = new ttypes.TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -7850,21 +7794,21 @@ TGetTablesReq.prototype.write = function(output) { return; }; -TGetTablesResp = function(args) { +var TGetTablesResp = module.exports.TGetTablesResp = function(args) { this.status = null; this.operationHandle = null; this.directResults = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new TOperationHandle(args.operationHandle); + this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); } if (args.directResults !== undefined && args.directResults !== null) { - this.directResults = new TSparkDirectResults(args.directResults); + this.directResults = new ttypes.TSparkDirectResults(args.directResults); } } }; @@ -7881,7 +7825,7 @@ TGetTablesResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -7889,7 +7833,7 @@ TGetTablesResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new TOperationHandle(); + this.operationHandle = new ttypes.TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -7897,7 +7841,7 @@ TGetTablesResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.directResults = new TSparkDirectResults(); + this.directResults = new ttypes.TSparkDirectResults(); this.directResults.read(input); } else { input.skip(ftype); @@ -7934,7 +7878,7 @@ TGetTablesResp.prototype.write = function(output) { return; }; -TGetTableTypesReq = function(args) { +var TGetTableTypesReq = module.exports.TGetTableTypesReq = function(args) { this.sessionHandle = null; this.getDirectResults = null; this.runAsync = false; @@ -7942,21 +7886,21 @@ TGetTableTypesReq = function(args) { this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new TSessionHandle(args.sessionHandle); + this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } if (args.getDirectResults !== undefined && args.getDirectResults !== null) { - this.getDirectResults = new TSparkGetDirectResults(args.getDirectResults); + this.getDirectResults = new ttypes.TSparkGetDirectResults(args.getDirectResults); } if (args.runAsync !== undefined && args.runAsync !== null) { this.runAsync = args.runAsync; } if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new THandleIdentifier(args.operationId); + this.operationId = new ttypes.THandleIdentifier(args.operationId); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); } } }; @@ -7973,7 +7917,7 @@ TGetTableTypesReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new TSessionHandle(); + this.sessionHandle = new ttypes.TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -7981,7 +7925,7 @@ TGetTableTypesReq.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.getDirectResults = new TSparkGetDirectResults(); + this.getDirectResults = new ttypes.TSparkGetDirectResults(); this.getDirectResults.read(input); } else { input.skip(ftype); @@ -7989,14 +7933,14 @@ TGetTableTypesReq.prototype.read = function(input) { break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.runAsync = input.readBool().value; + this.runAsync = input.readBool(); } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new THandleIdentifier(); + this.operationId = new ttypes.THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -8004,7 +7948,7 @@ TGetTableTypesReq.prototype.read = function(input) { break; case 3330: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new TDBSqlSessionConf(); + this.sessionConf = new ttypes.TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -8051,21 +7995,21 @@ TGetTableTypesReq.prototype.write = function(output) { return; }; -TGetTableTypesResp = function(args) { +var TGetTableTypesResp = module.exports.TGetTableTypesResp = function(args) { this.status = null; this.operationHandle = null; this.directResults = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new TOperationHandle(args.operationHandle); + this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); } if (args.directResults !== undefined && args.directResults !== null) { - this.directResults = new TSparkDirectResults(args.directResults); + this.directResults = new ttypes.TSparkDirectResults(args.directResults); } } }; @@ -8082,7 +8026,7 @@ TGetTableTypesResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -8090,7 +8034,7 @@ TGetTableTypesResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new TOperationHandle(); + this.operationHandle = new ttypes.TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -8098,7 +8042,7 @@ TGetTableTypesResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.directResults = new TSparkDirectResults(); + this.directResults = new ttypes.TSparkDirectResults(); this.directResults.read(input); } else { input.skip(ftype); @@ -8135,7 +8079,7 @@ TGetTableTypesResp.prototype.write = function(output) { return; }; -TGetColumnsReq = function(args) { +var TGetColumnsReq = module.exports.TGetColumnsReq = function(args) { this.sessionHandle = null; this.catalogName = null; this.schemaName = null; @@ -8147,7 +8091,7 @@ TGetColumnsReq = function(args) { this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new TSessionHandle(args.sessionHandle); + this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -8164,16 +8108,16 @@ TGetColumnsReq = function(args) { this.columnName = args.columnName; } if (args.getDirectResults !== undefined && args.getDirectResults !== null) { - this.getDirectResults = new TSparkGetDirectResults(args.getDirectResults); + this.getDirectResults = new ttypes.TSparkGetDirectResults(args.getDirectResults); } if (args.runAsync !== undefined && args.runAsync !== null) { this.runAsync = args.runAsync; } if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new THandleIdentifier(args.operationId); + this.operationId = new ttypes.THandleIdentifier(args.operationId); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); } } }; @@ -8190,7 +8134,7 @@ TGetColumnsReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new TSessionHandle(); + this.sessionHandle = new ttypes.TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -8198,35 +8142,35 @@ TGetColumnsReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.catalogName = input.readString().value; + this.catalogName = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.schemaName = input.readString().value; + this.schemaName = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { - this.tableName = input.readString().value; + this.tableName = input.readString(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { - this.columnName = input.readString().value; + this.columnName = input.readString(); } else { input.skip(ftype); } break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.getDirectResults = new TSparkGetDirectResults(); + this.getDirectResults = new ttypes.TSparkGetDirectResults(); this.getDirectResults.read(input); } else { input.skip(ftype); @@ -8234,14 +8178,14 @@ TGetColumnsReq.prototype.read = function(input) { break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.runAsync = input.readBool().value; + this.runAsync = input.readBool(); } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new THandleIdentifier(); + this.operationId = new ttypes.THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -8249,7 +8193,7 @@ TGetColumnsReq.prototype.read = function(input) { break; case 3330: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new TDBSqlSessionConf(); + this.sessionConf = new ttypes.TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -8316,21 +8260,21 @@ TGetColumnsReq.prototype.write = function(output) { return; }; -TGetColumnsResp = function(args) { +var TGetColumnsResp = module.exports.TGetColumnsResp = function(args) { this.status = null; this.operationHandle = null; this.directResults = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new TOperationHandle(args.operationHandle); + this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); } if (args.directResults !== undefined && args.directResults !== null) { - this.directResults = new TSparkDirectResults(args.directResults); + this.directResults = new ttypes.TSparkDirectResults(args.directResults); } } }; @@ -8347,7 +8291,7 @@ TGetColumnsResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -8355,7 +8299,7 @@ TGetColumnsResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new TOperationHandle(); + this.operationHandle = new ttypes.TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -8363,7 +8307,7 @@ TGetColumnsResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.directResults = new TSparkDirectResults(); + this.directResults = new ttypes.TSparkDirectResults(); this.directResults.read(input); } else { input.skip(ftype); @@ -8400,7 +8344,7 @@ TGetColumnsResp.prototype.write = function(output) { return; }; -TGetFunctionsReq = function(args) { +var TGetFunctionsReq = module.exports.TGetFunctionsReq = function(args) { this.sessionHandle = null; this.catalogName = null; this.schemaName = null; @@ -8411,7 +8355,7 @@ TGetFunctionsReq = function(args) { this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new TSessionHandle(args.sessionHandle); + this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -8427,16 +8371,16 @@ TGetFunctionsReq = function(args) { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field functionName is unset!'); } if (args.getDirectResults !== undefined && args.getDirectResults !== null) { - this.getDirectResults = new TSparkGetDirectResults(args.getDirectResults); + this.getDirectResults = new ttypes.TSparkGetDirectResults(args.getDirectResults); } if (args.runAsync !== undefined && args.runAsync !== null) { this.runAsync = args.runAsync; } if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new THandleIdentifier(args.operationId); + this.operationId = new ttypes.THandleIdentifier(args.operationId); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); } } }; @@ -8453,7 +8397,7 @@ TGetFunctionsReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new TSessionHandle(); + this.sessionHandle = new ttypes.TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -8461,28 +8405,28 @@ TGetFunctionsReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.catalogName = input.readString().value; + this.catalogName = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.schemaName = input.readString().value; + this.schemaName = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { - this.functionName = input.readString().value; + this.functionName = input.readString(); } else { input.skip(ftype); } break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.getDirectResults = new TSparkGetDirectResults(); + this.getDirectResults = new ttypes.TSparkGetDirectResults(); this.getDirectResults.read(input); } else { input.skip(ftype); @@ -8490,14 +8434,14 @@ TGetFunctionsReq.prototype.read = function(input) { break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.runAsync = input.readBool().value; + this.runAsync = input.readBool(); } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new THandleIdentifier(); + this.operationId = new ttypes.THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -8505,7 +8449,7 @@ TGetFunctionsReq.prototype.read = function(input) { break; case 3330: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new TDBSqlSessionConf(); + this.sessionConf = new ttypes.TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -8567,21 +8511,21 @@ TGetFunctionsReq.prototype.write = function(output) { return; }; -TGetFunctionsResp = function(args) { +var TGetFunctionsResp = module.exports.TGetFunctionsResp = function(args) { this.status = null; this.operationHandle = null; this.directResults = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new TOperationHandle(args.operationHandle); + this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); } if (args.directResults !== undefined && args.directResults !== null) { - this.directResults = new TSparkDirectResults(args.directResults); + this.directResults = new ttypes.TSparkDirectResults(args.directResults); } } }; @@ -8598,7 +8542,7 @@ TGetFunctionsResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -8606,7 +8550,7 @@ TGetFunctionsResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new TOperationHandle(); + this.operationHandle = new ttypes.TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -8614,7 +8558,7 @@ TGetFunctionsResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.directResults = new TSparkDirectResults(); + this.directResults = new ttypes.TSparkDirectResults(); this.directResults.read(input); } else { input.skip(ftype); @@ -8651,7 +8595,7 @@ TGetFunctionsResp.prototype.write = function(output) { return; }; -TGetPrimaryKeysReq = function(args) { +var TGetPrimaryKeysReq = module.exports.TGetPrimaryKeysReq = function(args) { this.sessionHandle = null; this.catalogName = null; this.schemaName = null; @@ -8662,7 +8606,7 @@ TGetPrimaryKeysReq = function(args) { this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new TSessionHandle(args.sessionHandle); + this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -8676,16 +8620,16 @@ TGetPrimaryKeysReq = function(args) { this.tableName = args.tableName; } if (args.getDirectResults !== undefined && args.getDirectResults !== null) { - this.getDirectResults = new TSparkGetDirectResults(args.getDirectResults); + this.getDirectResults = new ttypes.TSparkGetDirectResults(args.getDirectResults); } if (args.runAsync !== undefined && args.runAsync !== null) { this.runAsync = args.runAsync; } if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new THandleIdentifier(args.operationId); + this.operationId = new ttypes.THandleIdentifier(args.operationId); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); } } }; @@ -8702,7 +8646,7 @@ TGetPrimaryKeysReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new TSessionHandle(); + this.sessionHandle = new ttypes.TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -8710,28 +8654,28 @@ TGetPrimaryKeysReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.catalogName = input.readString().value; + this.catalogName = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.schemaName = input.readString().value; + this.schemaName = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { - this.tableName = input.readString().value; + this.tableName = input.readString(); } else { input.skip(ftype); } break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.getDirectResults = new TSparkGetDirectResults(); + this.getDirectResults = new ttypes.TSparkGetDirectResults(); this.getDirectResults.read(input); } else { input.skip(ftype); @@ -8739,14 +8683,14 @@ TGetPrimaryKeysReq.prototype.read = function(input) { break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.runAsync = input.readBool().value; + this.runAsync = input.readBool(); } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new THandleIdentifier(); + this.operationId = new ttypes.THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -8754,7 +8698,7 @@ TGetPrimaryKeysReq.prototype.read = function(input) { break; case 3330: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new TDBSqlSessionConf(); + this.sessionConf = new ttypes.TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -8816,21 +8760,21 @@ TGetPrimaryKeysReq.prototype.write = function(output) { return; }; -TGetPrimaryKeysResp = function(args) { +var TGetPrimaryKeysResp = module.exports.TGetPrimaryKeysResp = function(args) { this.status = null; this.operationHandle = null; this.directResults = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new TOperationHandle(args.operationHandle); + this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); } if (args.directResults !== undefined && args.directResults !== null) { - this.directResults = new TSparkDirectResults(args.directResults); + this.directResults = new ttypes.TSparkDirectResults(args.directResults); } } }; @@ -8847,7 +8791,7 @@ TGetPrimaryKeysResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -8855,7 +8799,7 @@ TGetPrimaryKeysResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new TOperationHandle(); + this.operationHandle = new ttypes.TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -8863,7 +8807,7 @@ TGetPrimaryKeysResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.directResults = new TSparkDirectResults(); + this.directResults = new ttypes.TSparkDirectResults(); this.directResults.read(input); } else { input.skip(ftype); @@ -8900,7 +8844,7 @@ TGetPrimaryKeysResp.prototype.write = function(output) { return; }; -TGetCrossReferenceReq = function(args) { +var TGetCrossReferenceReq = module.exports.TGetCrossReferenceReq = function(args) { this.sessionHandle = null; this.parentCatalogName = null; this.parentSchemaName = null; @@ -8914,7 +8858,7 @@ TGetCrossReferenceReq = function(args) { this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new TSessionHandle(args.sessionHandle); + this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -8937,16 +8881,16 @@ TGetCrossReferenceReq = function(args) { this.foreignTableName = args.foreignTableName; } if (args.getDirectResults !== undefined && args.getDirectResults !== null) { - this.getDirectResults = new TSparkGetDirectResults(args.getDirectResults); + this.getDirectResults = new ttypes.TSparkGetDirectResults(args.getDirectResults); } if (args.runAsync !== undefined && args.runAsync !== null) { this.runAsync = args.runAsync; } if (args.operationId !== undefined && args.operationId !== null) { - this.operationId = new THandleIdentifier(args.operationId); + this.operationId = new ttypes.THandleIdentifier(args.operationId); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); } } }; @@ -8963,7 +8907,7 @@ TGetCrossReferenceReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new TSessionHandle(); + this.sessionHandle = new ttypes.TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -8971,49 +8915,49 @@ TGetCrossReferenceReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.parentCatalogName = input.readString().value; + this.parentCatalogName = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.parentSchemaName = input.readString().value; + this.parentSchemaName = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { - this.parentTableName = input.readString().value; + this.parentTableName = input.readString(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { - this.foreignCatalogName = input.readString().value; + this.foreignCatalogName = input.readString(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRING) { - this.foreignSchemaName = input.readString().value; + this.foreignSchemaName = input.readString(); } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.STRING) { - this.foreignTableName = input.readString().value; + this.foreignTableName = input.readString(); } else { input.skip(ftype); } break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.getDirectResults = new TSparkGetDirectResults(); + this.getDirectResults = new ttypes.TSparkGetDirectResults(); this.getDirectResults.read(input); } else { input.skip(ftype); @@ -9021,14 +8965,14 @@ TGetCrossReferenceReq.prototype.read = function(input) { break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.runAsync = input.readBool().value; + this.runAsync = input.readBool(); } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.operationId = new THandleIdentifier(); + this.operationId = new ttypes.THandleIdentifier(); this.operationId.read(input); } else { input.skip(ftype); @@ -9036,7 +8980,7 @@ TGetCrossReferenceReq.prototype.read = function(input) { break; case 3330: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new TDBSqlSessionConf(); + this.sessionConf = new ttypes.TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -9113,21 +9057,21 @@ TGetCrossReferenceReq.prototype.write = function(output) { return; }; -TGetCrossReferenceResp = function(args) { +var TGetCrossReferenceResp = module.exports.TGetCrossReferenceResp = function(args) { this.status = null; this.operationHandle = null; this.directResults = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new TOperationHandle(args.operationHandle); + this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); } if (args.directResults !== undefined && args.directResults !== null) { - this.directResults = new TSparkDirectResults(args.directResults); + this.directResults = new ttypes.TSparkDirectResults(args.directResults); } } }; @@ -9144,7 +9088,7 @@ TGetCrossReferenceResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -9152,7 +9096,7 @@ TGetCrossReferenceResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new TOperationHandle(); + this.operationHandle = new ttypes.TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -9160,7 +9104,7 @@ TGetCrossReferenceResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.directResults = new TSparkDirectResults(); + this.directResults = new ttypes.TSparkDirectResults(); this.directResults.read(input); } else { input.skip(ftype); @@ -9197,12 +9141,12 @@ TGetCrossReferenceResp.prototype.write = function(output) { return; }; -TGetOperationStatusReq = function(args) { +var TGetOperationStatusReq = module.exports.TGetOperationStatusReq = function(args) { this.operationHandle = null; this.getProgressUpdate = null; if (args) { if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new TOperationHandle(args.operationHandle); + this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field operationHandle is unset!'); } @@ -9224,7 +9168,7 @@ TGetOperationStatusReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new TOperationHandle(); + this.operationHandle = new ttypes.TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -9232,7 +9176,7 @@ TGetOperationStatusReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.BOOL) { - this.getProgressUpdate = input.readBool().value; + this.getProgressUpdate = input.readBool(); } else { input.skip(ftype); } @@ -9263,7 +9207,7 @@ TGetOperationStatusReq.prototype.write = function(output) { return; }; -TGetOperationStatusResp = function(args) { +var TGetOperationStatusResp = module.exports.TGetOperationStatusResp = function(args) { this.status = null; this.operationState = null; this.sqlState = null; @@ -9284,7 +9228,7 @@ TGetOperationStatusResp = function(args) { this.statementTimeoutLevel = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } @@ -9313,7 +9257,7 @@ TGetOperationStatusResp = function(args) { this.hasResultSet = args.hasResultSet; } if (args.progressUpdateResponse !== undefined && args.progressUpdateResponse !== null) { - this.progressUpdateResponse = new TProgressUpdateResp(args.progressUpdateResponse); + this.progressUpdateResponse = new ttypes.TProgressUpdateResp(args.progressUpdateResponse); } if (args.numModifiedRows !== undefined && args.numModifiedRows !== null) { this.numModifiedRows = args.numModifiedRows; @@ -9354,7 +9298,7 @@ TGetOperationStatusResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -9362,63 +9306,63 @@ TGetOperationStatusResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.I32) { - this.operationState = input.readI32().value; + this.operationState = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.sqlState = input.readString().value; + this.sqlState = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { - this.errorCode = input.readI32().value; + this.errorCode = input.readI32(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { - this.errorMessage = input.readString().value; + this.errorMessage = input.readString(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRING) { - this.taskStatus = input.readString().value; + this.taskStatus = input.readString(); } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.I64) { - this.operationStarted = input.readI64().value; + this.operationStarted = input.readI64(); } else { input.skip(ftype); } break; case 8: if (ftype == Thrift.Type.I64) { - this.operationCompleted = input.readI64().value; + this.operationCompleted = input.readI64(); } else { input.skip(ftype); } break; case 9: if (ftype == Thrift.Type.BOOL) { - this.hasResultSet = input.readBool().value; + this.hasResultSet = input.readBool(); } else { input.skip(ftype); } break; case 10: if (ftype == Thrift.Type.STRUCT) { - this.progressUpdateResponse = new TProgressUpdateResp(); + this.progressUpdateResponse = new ttypes.TProgressUpdateResp(); this.progressUpdateResponse.read(input); } else { input.skip(ftype); @@ -9426,56 +9370,56 @@ TGetOperationStatusResp.prototype.read = function(input) { break; case 11: if (ftype == Thrift.Type.I64) { - this.numModifiedRows = input.readI64().value; + this.numModifiedRows = input.readI64(); } else { input.skip(ftype); } break; case 1281: if (ftype == Thrift.Type.STRING) { - this.displayMessage = input.readString().value; + this.displayMessage = input.readString(); } else { input.skip(ftype); } break; case 1282: if (ftype == Thrift.Type.STRING) { - this.diagnosticInfo = input.readString().value; + this.diagnosticInfo = input.readString(); } else { input.skip(ftype); } break; case 1283: if (ftype == Thrift.Type.STRING) { - this.errorDetailsJson = input.readString().value; + this.errorDetailsJson = input.readString(); } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRING) { - this.responseValidation = input.readBinary().value; + this.responseValidation = input.readBinary(); } else { input.skip(ftype); } break; case 3330: if (ftype == Thrift.Type.I32) { - this.idempotencyType = input.readI32().value; + this.idempotencyType = input.readI32(); } else { input.skip(ftype); } break; case 3331: if (ftype == Thrift.Type.I64) { - this.statementTimeout = input.readI64().value; + this.statementTimeout = input.readI64(); } else { input.skip(ftype); } break; case 3332: if (ftype == Thrift.Type.I32) { - this.statementTimeoutLevel = input.readI32().value; + this.statementTimeoutLevel = input.readI32(); } else { input.skip(ftype); } @@ -9586,13 +9530,13 @@ TGetOperationStatusResp.prototype.write = function(output) { return; }; -TCancelOperationReq = function(args) { +var TCancelOperationReq = module.exports.TCancelOperationReq = function(args) { this.operationHandle = null; this.executionVersion = null; this.replacedByNextAttempt = null; if (args) { if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new TOperationHandle(args.operationHandle); + this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field operationHandle is unset!'); } @@ -9617,7 +9561,7 @@ TCancelOperationReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new TOperationHandle(); + this.operationHandle = new ttypes.TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -9625,14 +9569,14 @@ TCancelOperationReq.prototype.read = function(input) { break; case 3329: if (ftype == Thrift.Type.I16) { - this.executionVersion = input.readI16().value; + this.executionVersion = input.readI16(); } else { input.skip(ftype); } break; case 3330: if (ftype == Thrift.Type.BOOL) { - this.replacedByNextAttempt = input.readBool().value; + this.replacedByNextAttempt = input.readBool(); } else { input.skip(ftype); } @@ -9668,11 +9612,11 @@ TCancelOperationReq.prototype.write = function(output) { return; }; -TCancelOperationResp = function(args) { +var TCancelOperationResp = module.exports.TCancelOperationResp = function(args) { this.status = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } @@ -9691,7 +9635,7 @@ TCancelOperationResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -9721,11 +9665,11 @@ TCancelOperationResp.prototype.write = function(output) { return; }; -TCloseOperationReq = function(args) { +var TCloseOperationReq = module.exports.TCloseOperationReq = function(args) { this.operationHandle = null; if (args) { if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new TOperationHandle(args.operationHandle); + this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field operationHandle is unset!'); } @@ -9744,7 +9688,7 @@ TCloseOperationReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new TOperationHandle(); + this.operationHandle = new ttypes.TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -9774,11 +9718,11 @@ TCloseOperationReq.prototype.write = function(output) { return; }; -TCloseOperationResp = function(args) { +var TCloseOperationResp = module.exports.TCloseOperationResp = function(args) { this.status = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } @@ -9797,7 +9741,7 @@ TCloseOperationResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -9827,12 +9771,12 @@ TCloseOperationResp.prototype.write = function(output) { return; }; -TGetResultSetMetadataReq = function(args) { +var TGetResultSetMetadataReq = module.exports.TGetResultSetMetadataReq = function(args) { this.operationHandle = null; this.includeCloudResultFiles = null; if (args) { if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new TOperationHandle(args.operationHandle); + this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field operationHandle is unset!'); } @@ -9854,7 +9798,7 @@ TGetResultSetMetadataReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new TOperationHandle(); + this.operationHandle = new ttypes.TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -9862,7 +9806,7 @@ TGetResultSetMetadataReq.prototype.read = function(input) { break; case 3329: if (ftype == Thrift.Type.BOOL) { - this.includeCloudResultFiles = input.readBool().value; + this.includeCloudResultFiles = input.readBool(); } else { input.skip(ftype); } @@ -9893,7 +9837,7 @@ TGetResultSetMetadataReq.prototype.write = function(output) { return; }; -TGetResultSetMetadataResp = function(args) { +var TGetResultSetMetadataResp = module.exports.TGetResultSetMetadataResp = function(args) { this.status = null; this.schema = null; this.resultFormat = null; @@ -9917,12 +9861,12 @@ TGetResultSetMetadataResp = function(args) { this.resultByteLimit = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } if (args.schema !== undefined && args.schema !== null) { - this.schema = new TTableSchema(args.schema); + this.schema = new ttypes.TTableSchema(args.schema); } if (args.resultFormat !== undefined && args.resultFormat !== null) { this.resultFormat = args.resultFormat; @@ -9949,7 +9893,7 @@ TGetResultSetMetadataResp = function(args) { this.reasonForNoCloudFetch = args.reasonForNoCloudFetch; } if (args.resultFiles !== undefined && args.resultFiles !== null) { - this.resultFiles = Thrift.copyList(args.resultFiles, [TDBSqlCloudResultFile]); + this.resultFiles = Thrift.copyList(args.resultFiles, [ttypes.TDBSqlCloudResultFile]); } if (args.manifestFile !== undefined && args.manifestFile !== null) { this.manifestFile = args.manifestFile; @@ -9973,7 +9917,7 @@ TGetResultSetMetadataResp = function(args) { this.isServerless = args.isServerless; } if (args.resultDataFormat !== undefined && args.resultDataFormat !== null) { - this.resultDataFormat = new TDBSqlResultFormat(args.resultDataFormat); + this.resultDataFormat = new ttypes.TDBSqlResultFormat(args.resultDataFormat); } if (args.truncatedByThriftLimit !== undefined && args.truncatedByThriftLimit !== null) { this.truncatedByThriftLimit = args.truncatedByThriftLimit; @@ -9996,7 +9940,7 @@ TGetResultSetMetadataResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -10004,7 +9948,7 @@ TGetResultSetMetadataResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRUCT) { - this.schema = new TTableSchema(); + this.schema = new ttypes.TTableSchema(); this.schema.read(input); } else { input.skip(ftype); @@ -10012,56 +9956,56 @@ TGetResultSetMetadataResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.I32) { - this.resultFormat = input.readI32().value; + this.resultFormat = input.readI32(); } else { input.skip(ftype); } break; case 1282: if (ftype == Thrift.Type.BOOL) { - this.lz4Compressed = input.readBool().value; + this.lz4Compressed = input.readBool(); } else { input.skip(ftype); } break; case 1283: if (ftype == Thrift.Type.STRING) { - this.arrowSchema = input.readBinary().value; + this.arrowSchema = input.readBinary(); } else { input.skip(ftype); } break; case 1284: if (ftype == Thrift.Type.I32) { - this.cacheLookupResult = input.readI32().value; + this.cacheLookupResult = input.readI32(); } else { input.skip(ftype); } break; case 1285: if (ftype == Thrift.Type.I64) { - this.uncompressedBytes = input.readI64().value; + this.uncompressedBytes = input.readI64(); } else { input.skip(ftype); } break; case 1286: if (ftype == Thrift.Type.I64) { - this.compressedBytes = input.readI64().value; + this.compressedBytes = input.readI64(); } else { input.skip(ftype); } break; case 1287: if (ftype == Thrift.Type.BOOL) { - this.isStagingOperation = input.readBool().value; + this.isStagingOperation = input.readBool(); } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.I32) { - this.reasonForNoCloudFetch = input.readI32().value; + this.reasonForNoCloudFetch = input.readI32(); } else { input.skip(ftype); } @@ -10073,7 +10017,7 @@ TGetResultSetMetadataResp.prototype.read = function(input) { var _size209 = _rtmp3210.size || 0; for (var _i211 = 0; _i211 < _size209; ++_i211) { var elem212 = null; - elem212 = new TDBSqlCloudResultFile(); + elem212 = new ttypes.TDBSqlCloudResultFile(); elem212.read(input); this.resultFiles.push(elem212); } @@ -10084,56 +10028,56 @@ TGetResultSetMetadataResp.prototype.read = function(input) { break; case 3331: if (ftype == Thrift.Type.STRING) { - this.manifestFile = input.readString().value; + this.manifestFile = input.readString(); } else { input.skip(ftype); } break; case 3332: if (ftype == Thrift.Type.I32) { - this.manifestFileFormat = input.readI32().value; + this.manifestFileFormat = input.readI32(); } else { input.skip(ftype); } break; case 3333: if (ftype == Thrift.Type.I64) { - this.cacheLookupLatency = input.readI64().value; + this.cacheLookupLatency = input.readI64(); } else { input.skip(ftype); } break; case 3334: if (ftype == Thrift.Type.STRING) { - this.remoteCacheMissReason = input.readString().value; + this.remoteCacheMissReason = input.readString(); } else { input.skip(ftype); } break; case 3335: if (ftype == Thrift.Type.I32) { - this.fetchDisposition = input.readI32().value; + this.fetchDisposition = input.readI32(); } else { input.skip(ftype); } break; case 3336: if (ftype == Thrift.Type.BOOL) { - this.remoteResultCacheEnabled = input.readBool().value; + this.remoteResultCacheEnabled = input.readBool(); } else { input.skip(ftype); } break; case 3337: if (ftype == Thrift.Type.BOOL) { - this.isServerless = input.readBool().value; + this.isServerless = input.readBool(); } else { input.skip(ftype); } break; case 3344: if (ftype == Thrift.Type.STRUCT) { - this.resultDataFormat = new TDBSqlResultFormat(); + this.resultDataFormat = new ttypes.TDBSqlResultFormat(); this.resultDataFormat.read(input); } else { input.skip(ftype); @@ -10141,14 +10085,14 @@ TGetResultSetMetadataResp.prototype.read = function(input) { break; case 3345: if (ftype == Thrift.Type.BOOL) { - this.truncatedByThriftLimit = input.readBool().value; + this.truncatedByThriftLimit = input.readBool(); } else { input.skip(ftype); } break; case 3346: if (ftype == Thrift.Type.I64) { - this.resultByteLimit = input.readI64().value; + this.resultByteLimit = input.readI64(); } else { input.skip(ftype); } @@ -10281,7 +10225,7 @@ TGetResultSetMetadataResp.prototype.write = function(output) { return; }; -TFetchResultsReq = function(args) { +var TFetchResultsReq = module.exports.TFetchResultsReq = function(args) { this.operationHandle = null; this.orientation = 0; this.maxRows = null; @@ -10291,7 +10235,7 @@ TFetchResultsReq = function(args) { this.includeResultSetMetadata = null; if (args) { if (args.operationHandle !== undefined && args.operationHandle !== null) { - this.operationHandle = new TOperationHandle(args.operationHandle); + this.operationHandle = new ttypes.TOperationHandle(args.operationHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field operationHandle is unset!'); } @@ -10332,7 +10276,7 @@ TFetchResultsReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.operationHandle = new TOperationHandle(); + this.operationHandle = new ttypes.TOperationHandle(); this.operationHandle.read(input); } else { input.skip(ftype); @@ -10340,42 +10284,42 @@ TFetchResultsReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.I32) { - this.orientation = input.readI32().value; + this.orientation = input.readI32(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I64) { - this.maxRows = input.readI64().value; + this.maxRows = input.readI64(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I16) { - this.fetchType = input.readI16().value; + this.fetchType = input.readI16(); } else { input.skip(ftype); } break; case 1281: if (ftype == Thrift.Type.I64) { - this.maxBytes = input.readI64().value; + this.maxBytes = input.readI64(); } else { input.skip(ftype); } break; case 1282: if (ftype == Thrift.Type.I64) { - this.startRowOffset = input.readI64().value; + this.startRowOffset = input.readI64(); } else { input.skip(ftype); } break; case 1283: if (ftype == Thrift.Type.BOOL) { - this.includeResultSetMetadata = input.readBool().value; + this.includeResultSetMetadata = input.readBool(); } else { input.skip(ftype); } @@ -10431,7 +10375,7 @@ TFetchResultsReq.prototype.write = function(output) { return; }; -TFetchResultsResp = function(args) { +var TFetchResultsResp = module.exports.TFetchResultsResp = function(args) { this.status = null; this.hasMoreRows = null; this.results = null; @@ -10439,7 +10383,7 @@ TFetchResultsResp = function(args) { this.responseValidation = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } @@ -10447,10 +10391,10 @@ TFetchResultsResp = function(args) { this.hasMoreRows = args.hasMoreRows; } if (args.results !== undefined && args.results !== null) { - this.results = new TRowSet(args.results); + this.results = new ttypes.TRowSet(args.results); } if (args.resultSetMetadata !== undefined && args.resultSetMetadata !== null) { - this.resultSetMetadata = new TGetResultSetMetadataResp(args.resultSetMetadata); + this.resultSetMetadata = new ttypes.TGetResultSetMetadataResp(args.resultSetMetadata); } if (args.responseValidation !== undefined && args.responseValidation !== null) { this.responseValidation = args.responseValidation; @@ -10470,7 +10414,7 @@ TFetchResultsResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -10478,14 +10422,14 @@ TFetchResultsResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.BOOL) { - this.hasMoreRows = input.readBool().value; + this.hasMoreRows = input.readBool(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRUCT) { - this.results = new TRowSet(); + this.results = new ttypes.TRowSet(); this.results.read(input); } else { input.skip(ftype); @@ -10493,7 +10437,7 @@ TFetchResultsResp.prototype.read = function(input) { break; case 1281: if (ftype == Thrift.Type.STRUCT) { - this.resultSetMetadata = new TGetResultSetMetadataResp(); + this.resultSetMetadata = new ttypes.TGetResultSetMetadataResp(); this.resultSetMetadata.read(input); } else { input.skip(ftype); @@ -10501,7 +10445,7 @@ TFetchResultsResp.prototype.read = function(input) { break; case 3329: if (ftype == Thrift.Type.STRING) { - this.responseValidation = input.readBinary().value; + this.responseValidation = input.readBinary(); } else { input.skip(ftype); } @@ -10547,14 +10491,14 @@ TFetchResultsResp.prototype.write = function(output) { return; }; -TGetDelegationTokenReq = function(args) { +var TGetDelegationTokenReq = module.exports.TGetDelegationTokenReq = function(args) { this.sessionHandle = null; this.owner = null; this.renewer = null; this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new TSessionHandle(args.sessionHandle); + this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -10569,7 +10513,7 @@ TGetDelegationTokenReq = function(args) { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field renewer is unset!'); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); } } }; @@ -10586,7 +10530,7 @@ TGetDelegationTokenReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new TSessionHandle(); + this.sessionHandle = new ttypes.TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -10594,21 +10538,21 @@ TGetDelegationTokenReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.owner = input.readString().value; + this.owner = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { - this.renewer = input.readString().value; + this.renewer = input.readString(); } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new TDBSqlSessionConf(); + this.sessionConf = new ttypes.TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -10650,12 +10594,12 @@ TGetDelegationTokenReq.prototype.write = function(output) { return; }; -TGetDelegationTokenResp = function(args) { +var TGetDelegationTokenResp = module.exports.TGetDelegationTokenResp = function(args) { this.status = null; this.delegationToken = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } @@ -10677,7 +10621,7 @@ TGetDelegationTokenResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -10685,7 +10629,7 @@ TGetDelegationTokenResp.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.delegationToken = input.readString().value; + this.delegationToken = input.readString(); } else { input.skip(ftype); } @@ -10716,13 +10660,13 @@ TGetDelegationTokenResp.prototype.write = function(output) { return; }; -TCancelDelegationTokenReq = function(args) { +var TCancelDelegationTokenReq = module.exports.TCancelDelegationTokenReq = function(args) { this.sessionHandle = null; this.delegationToken = null; this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new TSessionHandle(args.sessionHandle); + this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -10732,7 +10676,7 @@ TCancelDelegationTokenReq = function(args) { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field delegationToken is unset!'); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); } } }; @@ -10749,7 +10693,7 @@ TCancelDelegationTokenReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new TSessionHandle(); + this.sessionHandle = new ttypes.TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -10757,14 +10701,14 @@ TCancelDelegationTokenReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.delegationToken = input.readString().value; + this.delegationToken = input.readString(); } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new TDBSqlSessionConf(); + this.sessionConf = new ttypes.TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -10801,11 +10745,11 @@ TCancelDelegationTokenReq.prototype.write = function(output) { return; }; -TCancelDelegationTokenResp = function(args) { +var TCancelDelegationTokenResp = module.exports.TCancelDelegationTokenResp = function(args) { this.status = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } @@ -10824,7 +10768,7 @@ TCancelDelegationTokenResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -10854,13 +10798,13 @@ TCancelDelegationTokenResp.prototype.write = function(output) { return; }; -TRenewDelegationTokenReq = function(args) { +var TRenewDelegationTokenReq = module.exports.TRenewDelegationTokenReq = function(args) { this.sessionHandle = null; this.delegationToken = null; this.sessionConf = null; if (args) { if (args.sessionHandle !== undefined && args.sessionHandle !== null) { - this.sessionHandle = new TSessionHandle(args.sessionHandle); + this.sessionHandle = new ttypes.TSessionHandle(args.sessionHandle); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sessionHandle is unset!'); } @@ -10870,7 +10814,7 @@ TRenewDelegationTokenReq = function(args) { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field delegationToken is unset!'); } if (args.sessionConf !== undefined && args.sessionConf !== null) { - this.sessionConf = new TDBSqlSessionConf(args.sessionConf); + this.sessionConf = new ttypes.TDBSqlSessionConf(args.sessionConf); } } }; @@ -10887,7 +10831,7 @@ TRenewDelegationTokenReq.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.sessionHandle = new TSessionHandle(); + this.sessionHandle = new ttypes.TSessionHandle(); this.sessionHandle.read(input); } else { input.skip(ftype); @@ -10895,14 +10839,14 @@ TRenewDelegationTokenReq.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.delegationToken = input.readString().value; + this.delegationToken = input.readString(); } else { input.skip(ftype); } break; case 3329: if (ftype == Thrift.Type.STRUCT) { - this.sessionConf = new TDBSqlSessionConf(); + this.sessionConf = new ttypes.TDBSqlSessionConf(); this.sessionConf.read(input); } else { input.skip(ftype); @@ -10939,11 +10883,11 @@ TRenewDelegationTokenReq.prototype.write = function(output) { return; }; -TRenewDelegationTokenResp = function(args) { +var TRenewDelegationTokenResp = module.exports.TRenewDelegationTokenResp = function(args) { this.status = null; if (args) { if (args.status !== undefined && args.status !== null) { - this.status = new TStatus(args.status); + this.status = new ttypes.TStatus(args.status); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field status is unset!'); } @@ -10962,7 +10906,7 @@ TRenewDelegationTokenResp.prototype.read = function(input) { switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { - this.status = new TStatus(); + this.status = new ttypes.TStatus(); this.status.read(input); } else { input.skip(ftype); @@ -10992,7 +10936,7 @@ TRenewDelegationTokenResp.prototype.write = function(output) { return; }; -TProgressUpdateResp = function(args) { +var TProgressUpdateResp = module.exports.TProgressUpdateResp = function(args) { this.headerNames = null; this.rows = null; this.progressedPercentage = null; @@ -11050,7 +10994,7 @@ TProgressUpdateResp.prototype.read = function(input) { var _size214 = _rtmp3215.size || 0; for (var _i216 = 0; _i216 < _size214; ++_i216) { var elem217 = null; - elem217 = input.readString().value; + elem217 = input.readString(); this.headerNames.push(elem217); } input.readListEnd(); @@ -11070,7 +11014,7 @@ TProgressUpdateResp.prototype.read = function(input) { var _size222 = _rtmp3223.size || 0; for (var _i224 = 0; _i224 < _size222; ++_i224) { var elem225 = null; - elem225 = input.readString().value; + elem225 = input.readString(); elem221.push(elem225); } input.readListEnd(); @@ -11083,28 +11027,28 @@ TProgressUpdateResp.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.DOUBLE) { - this.progressedPercentage = input.readDouble().value; + this.progressedPercentage = input.readDouble(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { - this.status = input.readI32().value; + this.status = input.readI32(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { - this.footerSummary = input.readString().value; + this.footerSummary = input.readString(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.I64) { - this.startTime = input.readI64().value; + this.startTime = input.readI64(); } else { input.skip(ftype); } @@ -11176,10 +11120,10 @@ TProgressUpdateResp.prototype.write = function(output) { return; }; -PRIMITIVE_TYPES = [0,1,2,3,4,5,6,7,8,9,15,16,17,18,19,20,21]; -COMPLEX_TYPES = [10,11,12,13,14]; -COLLECTION_TYPES = [10,11]; -TYPE_NAMES = { +ttypes.PRIMITIVE_TYPES = [0,1,2,3,4,5,6,7,8,9,15,16,17,18,19,20,21]; +ttypes.COMPLEX_TYPES = [10,11,12,13,14]; +ttypes.COLLECTION_TYPES = [10,11]; +ttypes.TYPE_NAMES = { 10 : 'ARRAY', 4 : 'BIGINT', 9 : 'BINARY', @@ -11202,6 +11146,6 @@ TYPE_NAMES = { 13 : 'UNIONTYPE', 18 : 'VARCHAR' }; -CHARACTER_MAXIMUM_LENGTH = 'characterMaximumLength'; -PRECISION = 'precision'; -SCALE = 'scale'; +ttypes.CHARACTER_MAXIMUM_LENGTH = 'characterMaximumLength'; +ttypes.PRECISION = 'precision'; +ttypes.SCALE = 'scale';