public function getIterator(array $options = array())
{
if ($this->iterator === null) {
$iterator = $this->execute($options);
if ($iterator !== null && !$iterator instanceof Iterator) {
throw new \BadMethodCallException('Query execution did not return an iterator. This query may not support returning iterators. ');
}
$this->iterator = $iterator;
}
return $this->iterator;
}