protected function ensureCursor()
{
if ($this->cursor === null) {
$convertedCommand = TypeConverter::fromLegacy($this->command);
if (isset($convertedCommand->cursor)) {
if ($convertedCommand->cursor === true || $convertedCommand->cursor === []) {
$convertedCommand->cursor = new \stdClass();
}
}
$this->cursor = $this->db->command($convertedCommand, $this->getOptions());
}
return $this->cursor;
}