示例#1
0
        public void Read(TProtocol iprot)
        {
            var    isset_status    = false;
            var    isset_infoValue = false;
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.Struct)
                    {
                        Status = new TStatus();
                        Status.Read(iprot);
                        isset_status = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Struct)
                    {
                        InfoValue = new TGetInfoValue();
                        InfoValue.Read(iprot);
                        isset_infoValue = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
            if (!isset_status)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_infoValue)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
        }
示例#2
0
 public TGetColumnsResp(TStatus status) : this()
 {
     Status = status;
 }
示例#3
0
        public void Read(TProtocol iprot)
        {
            var    isset_status = false;
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.Struct)
                    {
                        Status = new TStatus();
                        Status.Read(iprot);
                        isset_status = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Bool)
                    {
                        HasMoreRows = iprot.ReadBool();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.Struct)
                    {
                        Results = new TRowSet();
                        Results.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
            if (!isset_status)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
        }
示例#4
0
 public TFetchResultsResp(TStatus status) : this()
 {
     Status = status;
 }
示例#5
0
 public TGetTypeInfoResp(TStatus status) : this()
 {
     Status = status;
 }
示例#6
0
 public TCancelDelegationTokenResp(TStatus status) : this()
 {
     Status = status;
 }
示例#7
0
 public TGetFunctionsResp(TStatus status) : this()
 {
     Status = status;
 }
        public void Read(TProtocol iprot)
        {
            var    isset_status = false;
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.Struct)
                    {
                        Status = new TStatus();
                        Status.Read(iprot);
                        isset_status = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.I32)
                    {
                        OperationState = (TOperationState)iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.String)
                    {
                        SqlState = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 4:
                    if (field.Type == TType.I32)
                    {
                        ErrorCode = iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 5:
                    if (field.Type == TType.String)
                    {
                        ErrorMessage = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
            if (!isset_status)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
        }
示例#9
0
 public TGetSchemasResp(TStatus status) : this()
 {
     Status = status;
 }
示例#10
0
 public TGetInfoResp(TStatus status, TGetInfoValue infoValue) : this()
 {
     Status    = status;
     InfoValue = infoValue;
 }
示例#11
0
 public TGetCatalogsResp(TStatus status) : this()
 {
     Status = status;
 }
示例#12
0
        public void Read(TProtocol iprot)
        {
            var    isset_status = false;
            var    isset_serverProtocolVersion = false;
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.Struct)
                    {
                        Status = new TStatus();
                        Status.Read(iprot);
                        isset_status = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.I32)
                    {
                        ServerProtocolVersion       = (TProtocolVersion)iprot.ReadI32();
                        isset_serverProtocolVersion = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.Struct)
                    {
                        SessionHandle = new TSessionHandle();
                        SessionHandle.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 4:
                    if (field.Type == TType.Map)
                    {
                        {
                            Configuration = new Dictionary <String, String>();
                            var _map76 = iprot.ReadMapBegin();
                            for (var _i77 = 0; _i77 < _map76.Count; ++_i77)
                            {
                                String _key78;
                                String _val79;
                                _key78 = iprot.ReadString();
                                _val79 = iprot.ReadString();
                                Configuration[_key78] = _val79;
                            }
                            iprot.ReadMapEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
            if (!isset_status)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_serverProtocolVersion)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
        }
示例#13
0
 public TOpenSessionResp(TStatus status, TProtocolVersion serverProtocolVersion) : this()
 {
     Status = status;
     ServerProtocolVersion = serverProtocolVersion;
 }
示例#14
0
 public TCloseSessionResp(TStatus status) : this()
 {
     Status = status;
 }
 public TRenewDelegationTokenResp(TStatus status) : this()
 {
     Status = status;
 }
 public TGetOperationStatusResp(TStatus status) : this()
 {
     Status = status;
 }
示例#17
0
 public TExecuteStatementResp(TStatus status) : this()
 {
     Status = status;
 }
 public TGetResultSetMetadataResp(TStatus status) : this()
 {
     Status = status;
 }
示例#19
0
 public TCancelOperationResp(TStatus status) : this()
 {
     Status = status;
 }
示例#20
0
 public TGetTableTypesResp(TStatus status) : this()
 {
     Status = status;
 }
示例#21
0
 public TCloseOperationResp(TStatus status) : this()
 {
     Status = status;
 }