public function __construct($queryStr, $client) { $queryCleaner = new \ThriftSQL\Utils\QueryCleaner(); $this->_client = $client; $this->_ready = false; $this->_handle = $this->_client->query(new \ThriftSQL\Query(array('query' => $queryCleaner->clean($queryStr)))); }
public function query($queryStr) { try { $queryCleaner = new \ThriftSQL\Utils\QueryCleaner(); $response = $this->_client->ExecuteStatement(new \ThriftSQL\TExecuteStatementReq(array('sessionHandle' => $this->_sessionHandle, 'statement' => $queryCleaner->clean($queryStr), 'runAsync' => true))); return new \ThriftSQL\HiveQuery($response, $this->_client); } catch (Exception $e) { throw new \ThriftSQL\Exception($e->getMessage()); } }