public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) { oprot.IncrementRecursionDepth(); try { var struc = new TStruct("TSFetchResultsResp"); await oprot.WriteStructBeginAsync(struc, cancellationToken); var field = new TField(); field.Name = "status"; field.Type = TType.Struct; field.ID = 1; await oprot.WriteFieldBeginAsync(field, cancellationToken); await Status.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); field.Name = "hasResultSet"; field.Type = TType.Bool; field.ID = 2; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteBoolAsync(HasResultSet, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); field.Name = "isAlign"; field.Type = TType.Bool; field.ID = 3; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteBoolAsync(IsAlign, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); if (QueryDataSet != null && __isset.queryDataSet) { field.Name = "queryDataSet"; field.Type = TType.Struct; field.ID = 4; await oprot.WriteFieldBeginAsync(field, cancellationToken); await QueryDataSet.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (NonAlignQueryDataSet != null && __isset.nonAlignQueryDataSet) { field.Name = "nonAlignQueryDataSet"; field.Type = TType.Struct; field.ID = 5; await oprot.WriteFieldBeginAsync(field, cancellationToken); await NonAlignQueryDataSet.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } await oprot.WriteFieldStopAsync(cancellationToken); await oprot.WriteStructEndAsync(cancellationToken); } finally { oprot.DecrementRecursionDepth(); } }
public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) { oprot.IncrementRecursionDepth(); try { var struc = new TStruct("TSExecuteStatementResp"); await oprot.WriteStructBeginAsync(struc, cancellationToken); var field = new TField(); field.Name = "status"; field.Type = TType.Struct; field.ID = 1; await oprot.WriteFieldBeginAsync(field, cancellationToken); await Status.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); if (__isset.queryId) { field.Name = "queryId"; field.Type = TType.I64; field.ID = 2; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteI64Async(QueryId, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (Columns != null && __isset.columns) { field.Name = "columns"; field.Type = TType.List; field.ID = 3; await oprot.WriteFieldBeginAsync(field, cancellationToken); { await oprot.WriteListBeginAsync(new TList(TType.String, Columns.Count), cancellationToken); foreach (string _iter14 in Columns) { await oprot.WriteStringAsync(_iter14, cancellationToken); } await oprot.WriteListEndAsync(cancellationToken); } await oprot.WriteFieldEndAsync(cancellationToken); } if (OperationType != null && __isset.operationType) { field.Name = "operationType"; field.Type = TType.String; field.ID = 4; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteStringAsync(OperationType, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (__isset.ignoreTimeStamp) { field.Name = "ignoreTimeStamp"; field.Type = TType.Bool; field.ID = 5; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteBoolAsync(IgnoreTimeStamp, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (DataTypeList != null && __isset.dataTypeList) { field.Name = "dataTypeList"; field.Type = TType.List; field.ID = 6; await oprot.WriteFieldBeginAsync(field, cancellationToken); { await oprot.WriteListBeginAsync(new TList(TType.String, DataTypeList.Count), cancellationToken); foreach (string _iter15 in DataTypeList) { await oprot.WriteStringAsync(_iter15, cancellationToken); } await oprot.WriteListEndAsync(cancellationToken); } await oprot.WriteFieldEndAsync(cancellationToken); } if (QueryDataSet != null && __isset.queryDataSet) { field.Name = "queryDataSet"; field.Type = TType.Struct; field.ID = 7; await oprot.WriteFieldBeginAsync(field, cancellationToken); await QueryDataSet.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (NonAlignQueryDataSet != null && __isset.nonAlignQueryDataSet) { field.Name = "nonAlignQueryDataSet"; field.Type = TType.Struct; field.ID = 8; await oprot.WriteFieldBeginAsync(field, cancellationToken); await NonAlignQueryDataSet.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (ColumnNameIndexMap != null && __isset.columnNameIndexMap) { field.Name = "columnNameIndexMap"; field.Type = TType.Map; field.ID = 9; await oprot.WriteFieldBeginAsync(field, cancellationToken); { await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.I32, ColumnNameIndexMap.Count), cancellationToken); foreach (string _iter16 in ColumnNameIndexMap.Keys) { await oprot.WriteStringAsync(_iter16, cancellationToken); await oprot.WriteI32Async(ColumnNameIndexMap[_iter16], cancellationToken); } await oprot.WriteMapEndAsync(cancellationToken); } await oprot.WriteFieldEndAsync(cancellationToken); } await oprot.WriteFieldStopAsync(cancellationToken); await oprot.WriteStructEndAsync(cancellationToken); } finally { oprot.DecrementRecursionDepth(); } }