Add Result::fetchRow()

This commit is contained in:
Aaron Piotrowski 2022-11-12 23:20:34 -06:00
parent 73596dffc1
commit 48f694d3ab
No known key found for this signature in database
GPG Key ID: 5B456E6AABA44A63

View File

@ -8,6 +8,14 @@ namespace Amp\Sql;
*/
interface Result extends \Traversable
{
/**
* Returns the next row in the result set or null if no rows remain. This method may be used as an alternative
* to foreach iteration to obtain single rows from the result.
*
* @return array<string, TFieldValue>|null
*/
public function fetchRow(): ?array;
/**
* Resolves with a new instance of Result if another result is available after this result. Resolves with null if
* no further results are available.