class Result implements IteratorAggregate

Represents a database result set.

Methods

__construct(Explorer $explorer, SqlLiteral $query, Result|null $result, float $time)

No description

getConnection()

No description

getQuery()

No description

string
getQueryString() deprecated

No description

array
getParameters()

No description

int|null
getColumnCount()

No description

int|null
getRowCount()

No description

float
getTime()

No description

void
dump()

Displays result set as HTML table.

getIterator()

No description

array|null
fetchAssoc(string|null $path = null)

Returns the next row as an associative array, or null if there are no more rows.

Row|null
fetch()

Returns the next row as a Row object or null if there are no more rows.

mixed
fetchField()

Returns the first field of the next row or null if there are no more rows.

array|null
fetchList()

Returns the next row as indexed array or null if there are no more rows.

array|null
fetchFields()

Alias for fetchList().

array
fetchPairs(string|int|Closure|null $keyOrCallback = null, string|int|null $value = null)

No description

array
fetchAll()

Returns all remaining rows as array of Row objects.

Details

at line 30
__construct(Explorer $explorer, SqlLiteral $query, Result|null $result, float $time)

No description

Parameters

Explorer $explorer
SqlLiteral $query
Result|null $result
float $time

at line 39
Explorer getConnection()

No description

Return Value

Explorer

at line 47
SqlLiteral getQuery()

No description

Return Value

SqlLiteral

at line 54
string getQueryString() deprecated

deprecated use getQuery()->getSql()

No description

Return Value

string

at line 60
array getParameters()

No description

Return Value

array

at line 67
int|null getColumnCount()

No description

Return Value

int|null

at line 73
int|null getRowCount()

No description

Return Value

int|null

at line 79
float getTime()

No description

Return Value

float

at line 91
void dump()

Displays result set as HTML table.

Return Value

void

at line 101
Generator getIterator()

No description

Return Value

Generator

at line 122
array|null fetchAssoc(string|null $path = null)

Returns the next row as an associative array, or null if there are no more rows.

When $path is given, fetches all rows and restructures them using Arrays::associate().

Parameters

string|null $path

Return Value

array|null

at line 146
Row|null fetch()

Returns the next row as a Row object or null if there are no more rows.

Return Value

Row|null

at line 156
mixed fetchField()

Returns the first field of the next row or null if there are no more rows.

Return Value

mixed

at line 167
array|null fetchList()

Returns the next row as indexed array or null if there are no more rows.

Return Value

array|null

at line 178
array|null fetchFields()

Alias for fetchList().

Return Value

array|null

at line 191
array fetchPairs(string|int|Closure|null $keyOrCallback = null, string|int|null $value = null)

No description

Parameters

string|int|Closure|null $keyOrCallback
string|int|null $value

Return Value

array

at line 201
array fetchAll()

Returns all remaining rows as array of Row objects.

Return Value

array