result->closeCursor();
}
public function fetch(int $fetchMode = PDO::FETCH_ASSOC) {
$this->fetchRows();
return parent::fetch($fetchMode);
}
public function fetchAll(int $fetchMode = PDO::FETCH_ASSOC): array {
$this->fetchRows();
return parent::fetchAll($fetchMode);
}
public function rowCount(): int {
$this->fetchRows();
return parent::rowCount();
}
private function fetchRows(): void {
if (!$this->fetched) {
$this->fetched = true;
$this->rows = $this->result->fetchAll();
foreach ($this->splitOfParts as $part) {
$this->rows = $part->mergeWith($this->rows);
}
$this->count = count($this->rows);
}
}
}
ion>
blob: 5c3ca8d00fe2dd24a72d6a1846ae76a70e135e21 (
plain)