Пример #1
0
        public void Read(TProtocol iprot)
        {
            bool   isset_status    = false;
            bool   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 TGetTablesResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #3
0
 public TGetTypeInfoResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #4
0
 public TGetSchemasResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #5
0
 public TGetOperationStatusResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #6
0
 public TGetFunctionsResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #7
0
 public TOpenSessionResp(TStatus status, TProtocolVersion serverProtocolVersion) : this()
 {
     this.Status = status;
     this.ServerProtocolVersion = serverProtocolVersion;
 }
Пример #8
0
 public TFetchResultsResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #9
0
 public TExecuteStatementResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #10
0
 public TGetLogResp(TStatus status, string log) : this()
 {
     this.Status = status;
     this.Log    = log;
 }
Пример #11
0
 public TGetResultSetMetadataResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #12
0
 public TCancelOperationResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #13
0
 public TGetCatalogsResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #14
0
        public void Read(TProtocol iprot)
        {
            bool   isset_status = false;
            bool   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>();
                            TMap _map67 = iprot.ReadMapBegin();
                            for (int _i68 = 0; _i68 < _map67.Count; ++_i68)
                            {
                                string _key69;
                                string _val70;
                                _key69 = iprot.ReadString();
                                _val70 = iprot.ReadString();
                                Configuration[_key69] = _val70;
                            }
                            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);
            }
        }
Пример #15
0
 public TCloseSessionResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #16
0
 public TCloseOperationResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #17
0
 public TGetInfoResp(TStatus status, TGetInfoValue infoValue) : this()
 {
     this.Status    = status;
     this.InfoValue = infoValue;
 }
Пример #18
0
        public void Read(TProtocol iprot)
        {
            bool   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);
            }
        }
Пример #19
0
 public TGetColumnsResp(TStatus status) : this()
 {
     this.Status = status;
 }