Esempio n. 1
0
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'message', 'type' => TType::STRING), 2 => array('var' => 'errorCode', 'type' => TType::I32), 3 => array('var' => 'SQLState', 'type' => TType::STRING));
     }
     if (is_array($vals)) {
         if (isset($vals['message'])) {
             $this->message = $vals['message'];
         }
         if (isset($vals['errorCode'])) {
             $this->errorCode = $vals['errorCode'];
         }
         if (isset($vals['SQLState'])) {
             $this->SQLState = $vals['SQLState'];
         }
     }
 }
Esempio n. 2
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('ThriftHive_getQueryPlan_result');
     if ($this->success !== null) {
         if (!is_object($this->success)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
         $xfer += $this->success->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->ex !== null) {
         $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
         $xfer += $this->ex->write($output);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'message', 'type' => TType::STRING));
     }
     if (is_array($vals)) {
         if (isset($vals['message'])) {
             $this->message = $vals['message'];
         }
     }
 }