Example #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.List)
                    {
                        {
                            this.edge_types = new List <int>();
                            TList _list12 = iprot.ReadListBegin();
                            for (int _i13 = 0; _i13 < _list12.Count; ++_i13)
                            {
                                int _elem14 = 0;
                                _elem14 = iprot.ReadI32();
                                this.edge_types.Add(_elem14);
                            }
                            iprot.ReadListEnd();
                        }
                        this.__isset.edge_types = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.I32)
                    {
                        this.edge_direction         = (EdgeDirection)iprot.ReadI32();
                        this.__isset.edge_direction = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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

                case 4:
                    if (field.Type == TType.List)
                    {
                        {
                            this.stat_props = new List <StatProp>();
                            TList _list15 = iprot.ReadListBegin();
                            for (int _i16 = 0; _i16 < _list15.Count; ++_i16)
                            {
                                StatProp _elem17 = new StatProp();
                                _elem17 = new StatProp();
                                _elem17.Read(iprot);
                                this.stat_props.Add(_elem17);
                            }
                            iprot.ReadListEnd();
                        }
                        this.__isset.stat_props = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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

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

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

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

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

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

                case 11:
                    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();
        }
Example #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.I32)
                    {
                        this.part_id         = iprot.ReadI32();
                        this.__isset.part_id = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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

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

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

                case 6:
                    if (field.Type == TType.I32)
                    {
                        this.limit         = iprot.ReadI32();
                        this.__isset.limit = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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

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

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
        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();
        }