Added more detail in obtaining first result

This commit is contained in:
Juan Pablo Vial
2022-09-12 21:45:14 -03:00
parent 6dda8e1515
commit 758ff0e282
2 changed files with 7 additions and 2 deletions

View File

@ -37,7 +37,11 @@ class ResultSet implements RSInterface
{
return $this->getStatement()->fetchAll(PDO::FETCH_OBJ);
}
public function getFirst(): mixed
public function getFirstAsArray(): array
{
return $this->getStatement()->fetch(PDO::FETCH_ASSOC);
}
public function getFirstAsObject(): object
{
return $this->getStatement()->fetch(PDO::FETCH_OBJ);
}