Esempio n. 1
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.Struct)
                    {
                        OperationHandle = new TOperationHandle();
                        OperationHandle.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);
            }
        }
Esempio n. 2
0
        public void Execute(string statement)
        {
            CloseOperation();
            var execReq = new TExecuteStatementReq()
            {
                SessionHandle = m_Session,
                Statement     = statement,
            };

            m_LastSchema = null;
            var execResp = m_Client.ExecuteStatement(execReq);

            execResp.Status.CheckStatus();
            m_Operation = execResp.OperationHandle;
        }
Esempio n. 3
0
 public TGetOperationStatusReq(TOperationHandle operationHandle) : this()
 {
     this.OperationHandle = operationHandle;
 }
 public TGetResultSetMetadataReq(TOperationHandle operationHandle) : this()
 {
     this.OperationHandle = operationHandle;
 }
Esempio n. 5
0
 public TCancelOperationReq(TOperationHandle operationHandle) : this()
 {
     this.OperationHandle = operationHandle;
 }
Esempio n. 6
0
        public void Read(TProtocol iprot)
        {
            bool   isset_operationHandle = false;
            bool   isset_orientation     = false;
            bool   isset_maxRows         = 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)
                    {
                        OperationHandle = new TOperationHandle();
                        OperationHandle.Read(iprot);
                        isset_operationHandle = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.I32)
                    {
                        Orientation       = (TFetchOrientation)iprot.ReadI32();
                        isset_orientation = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.I64)
                    {
                        MaxRows       = iprot.ReadI64();
                        isset_maxRows = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
            if (!isset_operationHandle)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_orientation)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_maxRows)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
        }
Esempio n. 7
0
 public TFetchResultsReq(TOperationHandle operationHandle, TFetchOrientation orientation, long maxRows) : this()
 {
     this.OperationHandle = operationHandle;
     this.Orientation     = orientation;
     this.MaxRows         = maxRows;
 }
Esempio n. 8
0
 public TCloseOperationReq(TOperationHandle operationHandle) : this()
 {
     this.OperationHandle = operationHandle;
 }