Result
Less than 1 minute
Result
Interface for database query result sets.
interface ResultProvides methods for fetching rows, models, columns, and metadata from query results. Implementations must support flexible data retrieval and conversion.
Methods
__toString
Returns a string representation of the result set.
public __toString(): stringtoString
Returns the result set as a string.
public toString(): stringcount
Returns the number of rows in the result set.
public count(): intfetch
public fetch(int $fetchStyle = '\PDO::FETCH_ASSOC', int $cursorOrientation = '\PDO::FETCH_ORI_NEXT', int $cursorOffset, false $): voidParameters
| Parameter | Type | Description |
|---|---|---|
$fetchStyle | int | |
$cursorOrientation | int | |
$cursorOffset | int | |
$ | false |
fetchModel
Fetches the next row as an instance of the specified model class.
public fetchModel(string $modelClass): mixedParameters
| Parameter | Type | Description |
|---|---|---|
$modelClass | string |
fetchAllModel
public fetchAllModel(string $modelClass, ?string $keyColumn): voidParameters
| Parameter | Type | Description |
|---|---|---|
$modelClass | string | |
$keyColumn | string |
fetchAll
public fetchAll(int $fetchMode = '\PDO::FETCH_ASSOC', mixed $fetchArgument, false $): voidParameters
| Parameter | Type | Description |
|---|---|---|
$fetchMode | int | |
$fetchArgument | mixed | |
$ | false |
fetchColumn
Fetches a single column from the next row in the result set.
public fetchColumn(int $columnNumber): mixedParameters
| Parameter | Type | Description |
|---|---|---|
$columnNumber | int |
fetchObject
public fetchObject(string $className = 'stdClass', array $constructorArgs): objectParameters
| Parameter | Type | Description |
|---|---|---|
$className | string | |
$constructorArgs | array |
rowCount
Returns the number of rows affected by the query.
public rowCount(): intcolumnCount
Returns the number of columns in the result set.
public columnCount(): introw
Fetches a single row from the result set as a Row object.
public row(int $cursorOrientation = '\PDO::FETCH_ORI_NEXT', int $offset): ?RowParameters
| Parameter | Type | Description |
|---|---|---|
$cursorOrientation | int | |
$offset | int |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:25 +0000