/**
* Accepts a query string
*
* @param string $queryString
* @param bool $throw
* @throws ApiException
* @return Cassandra\Rows
*/
public function query($queryString, $throw = false)
{
if (empty($this->cluster) || empty($this->session)) {
throw new ApiException('Query failure - missing connection stream');
}
$query = new Cassandra\SimpleStatement($queryString);
try {
$result = $this->session->execute($query);
return $result;
} catch (\Cassandra\Exception\RuntimeException $e) {
LogException::e($e);
if ($throw) {
throw new ApiException('Query Failure', r_server);
}
}
}