Beispiel #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);
            }
        }
Beispiel #2
0
 public TGetColumnsResp(TStatus status) : this()
 {
     Status = status;
 }
Beispiel #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);
            }
        }
Beispiel #4
0
 public TFetchResultsResp(TStatus status) : this()
 {
     Status = status;
 }
Beispiel #5
0
 public TGetTypeInfoResp(TStatus status) : this()
 {
     Status = status;
 }
Beispiel #6
0
 public TCancelDelegationTokenResp(TStatus status) : this()
 {
     Status = status;
 }
 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);
            }
        }
Beispiel #9
0
 public TGetSchemasResp(TStatus status) : this()
 {
     Status = status;
 }
Beispiel #10
0
 public TGetInfoResp(TStatus status, TGetInfoValue infoValue) : this()
 {
     Status    = status;
     InfoValue = infoValue;
 }
Beispiel #11
0
 public TGetCatalogsResp(TStatus status) : this()
 {
     Status = status;
 }
Beispiel #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);
            }
        }
Beispiel #13
0
 public TOpenSessionResp(TStatus status, TProtocolVersion serverProtocolVersion) : this()
 {
     Status = status;
     ServerProtocolVersion = serverProtocolVersion;
 }
Beispiel #14
0
 public TCloseSessionResp(TStatus status) : this()
 {
     Status = status;
 }
 public TRenewDelegationTokenResp(TStatus status) : this()
 {
     Status = status;
 }
 public TGetOperationStatusResp(TStatus status) : this()
 {
     Status = status;
 }
 public TExecuteStatementResp(TStatus status) : this()
 {
     Status = status;
 }
 public TGetResultSetMetadataResp(TStatus status) : this()
 {
     Status = status;
 }
Beispiel #19
0
 public TCancelOperationResp(TStatus status) : this()
 {
     Status = status;
 }
Beispiel #20
0
 public TGetTableTypesResp(TStatus status) : this()
 {
     Status = status;
 }
 public TCloseOperationResp(TStatus status) : this()
 {
     Status = status;
 }