示例#1
0
        public void Read(TProtocol iprot)
        {
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.I32)
                    {
                        this.space_id         = iprot.ReadI32();
                        this.__isset.space_id = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.List)
                    {
                        {
                            this.column_names = new List <byte[]>();
                            TList _list36 = iprot.ReadListBegin();
                            for (int _i37 = 0; _i37 < _list36.Count; ++_i37)
                            {
                                byte[] _elem38 = null;
                                _elem38 = iprot.ReadBinary();
                                this.column_names.Add(_elem38);
                            }
                            iprot.ReadListEnd();
                        }
                        this.__isset.column_names = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.Map)
                    {
                        {
                            this.parts = new Dictionary <int, List <nebula.Row> >();
                            TMap _map39 = iprot.ReadMapBegin();
                            for (int _i40 = 0; _i40 < _map39.Count; ++_i40)
                            {
                                int _key41;
                                List <nebula.Row> _val42;
                                _key41 = iprot.ReadI32();
                                {
                                    _val42 = new List <nebula.Row>();
                                    TList _list43 = iprot.ReadListBegin();
                                    for (int _i44 = 0; _i44 < _list43.Count; ++_i44)
                                    {
                                        nebula.Row _elem45 = new nebula.Row();
                                        _elem45 = new nebula.Row();
                                        _elem45.Read(iprot);
                                        _val42.Add(_elem45);
                                    }
                                    iprot.ReadListEnd();
                                }
                                this.parts[_key41] = _val42;
                            }
                            iprot.ReadMapEnd();
                        }
                        this.__isset.parts = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 4:
                    if (field.Type == TType.Struct)
                    {
                        this.traverse_spec = new TraverseSpec();
                        this.traverse_spec.Read(iprot);
                        this.__isset.traverse_spec = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
示例#2
0
        public void Read(TProtocol iprot)
        {
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.I32)
                    {
                        this.space_id         = iprot.ReadI32();
                        this.__isset.space_id = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.List)
                    {
                        {
                            this.column_names = new List <byte[]>();
                            TList _list49 = iprot.ReadListBegin();
                            for (int _i50 = 0; _i50 < _list49.Count; ++_i50)
                            {
                                byte[] _elem51 = null;
                                _elem51 = iprot.ReadBinary();
                                this.column_names.Add(_elem51);
                            }
                            iprot.ReadListEnd();
                        }
                        this.__isset.column_names = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.Map)
                    {
                        {
                            this.parts = new Dictionary <int, List <nebula.Row> >();
                            TMap _map52 = iprot.ReadMapBegin();
                            for (int _i53 = 0; _i53 < _map52.Count; ++_i53)
                            {
                                int _key54;
                                List <nebula.Row> _val55;
                                _key54 = iprot.ReadI32();
                                {
                                    _val55 = new List <nebula.Row>();
                                    TList _list56 = iprot.ReadListBegin();
                                    for (int _i57 = 0; _i57 < _list56.Count; ++_i57)
                                    {
                                        nebula.Row _elem58 = new nebula.Row();
                                        _elem58 = new nebula.Row();
                                        _elem58.Read(iprot);
                                        _val55.Add(_elem58);
                                    }
                                    iprot.ReadListEnd();
                                }
                                this.parts[_key54] = _val55;
                            }
                            iprot.ReadMapEnd();
                        }
                        this.__isset.parts = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 4:
                    if (field.Type == TType.List)
                    {
                        {
                            this.vertex_props = new List <VertexProp>();
                            TList _list59 = iprot.ReadListBegin();
                            for (int _i60 = 0; _i60 < _list59.Count; ++_i60)
                            {
                                VertexProp _elem61 = new VertexProp();
                                _elem61 = new VertexProp();
                                _elem61.Read(iprot);
                                this.vertex_props.Add(_elem61);
                            }
                            iprot.ReadListEnd();
                        }
                        this.__isset.vertex_props = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 5:
                    if (field.Type == TType.List)
                    {
                        {
                            this.edge_props = new List <EdgeProp>();
                            TList _list62 = iprot.ReadListBegin();
                            for (int _i63 = 0; _i63 < _list62.Count; ++_i63)
                            {
                                EdgeProp _elem64 = new EdgeProp();
                                _elem64 = new EdgeProp();
                                _elem64.Read(iprot);
                                this.edge_props.Add(_elem64);
                            }
                            iprot.ReadListEnd();
                        }
                        this.__isset.edge_props = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 6:
                    if (field.Type == TType.List)
                    {
                        {
                            this.expressions = new List <Expr>();
                            TList _list65 = iprot.ReadListBegin();
                            for (int _i66 = 0; _i66 < _list65.Count; ++_i66)
                            {
                                Expr _elem67 = new Expr();
                                _elem67 = new Expr();
                                _elem67.Read(iprot);
                                this.expressions.Add(_elem67);
                            }
                            iprot.ReadListEnd();
                        }
                        this.__isset.expressions = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 7:
                    if (field.Type == TType.Bool)
                    {
                        this.dedup         = iprot.ReadBool();
                        this.__isset.dedup = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 8:
                    if (field.Type == TType.List)
                    {
                        {
                            this.order_by = new List <OrderBy>();
                            TList _list68 = iprot.ReadListBegin();
                            for (int _i69 = 0; _i69 < _list68.Count; ++_i69)
                            {
                                OrderBy _elem70 = new OrderBy();
                                _elem70 = new OrderBy();
                                _elem70.Read(iprot);
                                this.order_by.Add(_elem70);
                            }
                            iprot.ReadListEnd();
                        }
                        this.__isset.order_by = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 9:
                    if (field.Type == TType.I64)
                    {
                        this.limit         = iprot.ReadI64();
                        this.__isset.limit = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 10:
                    if (field.Type == TType.String)
                    {
                        this.filter         = iprot.ReadBinary();
                        this.__isset.filter = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }