\CGExtensions\queryarray_resultset

The array resultset class simulates a resultset object from a flat array.

This is useful for using an array of loaded data in the reporting classes.

This class does not support a limit or pagination.

Summary

Methods
Properties
Constants
__construct()
RecordCount()
TotalMatches()
MoveNext()
MoveFirst()
Rewind()
MoveLast()
EOF()
get_object()
FetchAll()
current()
next()
key()
valid()
get_query()
getIterator()
Close()
get_pagination()
$EOF
$fields
No constants found
_query()
$_filter
$_totalmatching
N/A
No private methods found
No private properties found
N/A

Properties

$EOF

$EOF : bool

Alias for the EOF() method.

Type

bool

$fields

$fields : array

An array representing the current row in the result set.

Type

array

$_filter

$_filter

The current filter object.

$_totalmatching

$_totalmatching

The total number of records matching the query (independent of limit and offset)

Methods

RecordCount()

RecordCount() : int

Get the number of records returned in this recordset.

Returns

int

TotalMatches()

TotalMatches() : int

return the total number of matches (independent of limit and offset)

Returns

int

MoveNext()

MoveNext()

Move the pointer to the next matching row in the recordset.

MoveFirst()

MoveFirst()

Move the pointer to the first matching row in the recordset.

Rewind()

Rewind()

Move the pointer to the first matching row in the recordset.

MoveLast()

MoveLast()

Move the pointer to the last matching row in the recordset.

EOF()

EOF() : bool

Test if the pointer is at the end of the recordset (there are no more records)

Returns

bool

get_object()

get_object() : object

Get an object representing the data at the current pointer position

Returns

object

FetchAll()

FetchAll() : object[]

Fetch all of the records in this resultset as an array of objects.

Returns

object[]

current()

current()

next()

next()

key()

key()

valid()

valid()

getIterator()

getIterator()

Close()

Close()

Close the recordset, and free resources.

get_pagination()

get_pagination() : \CGExtensions\query\pagination

Get a pagination object for this query and resultset

Returns

\CGExtensions\query\pagination

_query()

_query()

Use the data from the query object, perform the database query and set the recordset member.

This method should first see if the recordset has been set and not repeat the query... for the same of optimal behavior.