class ResultSet implements Iterator, IRowContainer

Represents a result set.

Traits

Strict class for better experience.

Methods

__construct(Connection $connection, string $queryString, array $params)

No description

getConnection()

No description

getPdoStatement()

No description

string
getQueryString()

No description

array
getParameters()

No description

int|null
getColumnCount()

No description

int|null
getRowCount()

No description

float
getTime()

No description

array
normalizeRow(array $row)

Normalizes result row.

void
dump()

Displays complete result set as HTML table for debug purposes.

void
rewind()

No description

current()

No description

key()

No description

void
next()

No description

bool
valid()

No description

IRow|null
fetch()

Fetches single row object.

mixed
fetchField($column = 0)

Fetches single field.

array|null
fetchFields()

Fetches array of fields.

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

Fetches all rows as associative array.

array
fetchAll()

Fetches all rows.

array
fetchAssoc(string $path)

Fetches all rows and returns associative tree.

Details

at line 51
__construct(Connection $connection, string $queryString, array $params)

Parameters

Connection $connection
string $queryString
array $params

at line 81
Connection getConnection()

Return Value

Connection

at line 90
PDOStatement getPdoStatement()

Return Value

PDOStatement

at line 96
string getQueryString()

Return Value

string

at line 102
array getParameters()

Return Value

array

at line 108
int|null getColumnCount()

Return Value

int|null

at line 114
int|null getRowCount()

Return Value

int|null

at line 120
float getTime()

Return Value

float

at line 129
array normalizeRow(array $row)

Normalizes result row.

Parameters

array $row

Return Value

array

at line 176
void dump()

Displays complete result set as HTML table for debug purposes.

Return Value

void

at line 185
void rewind()

Return Value

void

at line 193
current()

at line 199
key()

at line 205
void next()

Return Value

void

at line 211
bool valid()

Return Value

bool

at line 227
IRow|null fetch()

Fetches single row object.

Return Value

IRow|null

at line 254
mixed fetchField($column = 0)

Fetches single field.

Parameters

$column

Return Value

mixed

at line 267
array|null fetchFields()

Fetches array of fields.

Return Value

array|null

at line 277
array fetchPairs(string|int $key = null, string|int $value = null)

Fetches all rows as associative array.

Parameters

string|int $key column name used for an array key or null for numeric index
string|int $value column name used for an array value or null for the whole row

Return Value

array

at line 286
array fetchAll()

Fetches all rows.

Return Value

array

at line 298
array fetchAssoc(string $path)

Fetches all rows and returns associative tree.

Parameters

string $path associative descriptor

Return Value

array