class ResultSet implements Iterator, IRowContainer

Represents a database result set.

Methods

__construct(Connection $connection, string $queryString, array $params, callable|null $normalizer = null)

No description

getConnection() deprecated

No description

PDOStatement|null
getPdoStatement()

No description

string
getQueryString()

No description

array
getParameters()

No description

int|null
getColumnCount()

No description

int|null
getRowCount()

No description

array
getColumnTypes()

No description

float
getTime()

No description

array
normalizeRow(array $row)

No description

void
dump()

Displays result set as HTML table.

void
rewind()

No description

Row|false|null
current()

No description

int
key()

No description

void
next()

No description

bool
valid()

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)

Returns all rows as associative array, where first argument specifies key column and second value column.

array
fetchAll()

Returns all remaining rows as array of Row objects.

Details

at line 35
__construct(Connection $connection, string $queryString, array $params, callable|null $normalizer = null)

No description

Parameters

Connection $connection
string $queryString
array $params
callable|null $normalizer

at line 70
Connection getConnection() deprecated

deprecated

No description

Return Value

Connection

at line 77
PDOStatement|null getPdoStatement()

internal  
 

No description

Return Value

PDOStatement|null

at line 83
string getQueryString()

No description

Return Value

string

at line 89
array getParameters()

No description

Return Value

array

at line 95
int|null getColumnCount()

No description

Return Value

int|null

at line 101
int|null getRowCount()

No description

Return Value

int|null

at line 107
array getColumnTypes()

No description

Return Value

array

at line 114
float getTime()

No description

Return Value

float

at line 121
array normalizeRow(array $row)

internal  
 

No description

Parameters

array $row

Return Value

array

at line 135
void dump()

Displays result set as HTML table.

Return Value

void

at line 144
void rewind()

No description

Return Value

void

at line 152
Row|false|null current()

No description

Return Value

Row|false|null

at line 158
int key()

No description

Return Value

int

at line 164
void next()

No description

Return Value

void

at line 170
bool valid()

No description

Return Value

bool

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

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

Parameters

string|null $path

Return Value

array|null

at line 209
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 224
mixed fetchField()

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

Return Value

mixed

at line 234
array|null fetchList()

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

Return Value

array|null

at line 244
array|null fetchFields()

Alias for fetchList().

Return Value

array|null

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

Returns all rows as associative array, where first argument specifies key column and second value column.

For duplicate keys, the last value is used. When using null as key, array is indexed from zero. Alternatively accepts callback returning value or key-value pairs.

Parameters

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

Return Value

array

at line 265
array fetchAll()

Returns all remaining rows as array of Row objects.

Return Value

array