Moodle APIs
3.8
Moodle 3.8.6 (Build: 20201109)
|
Abstract class for resultsets returned from database functions. More...
Public Member Functions | |
close () | |
Did we reach the end? More... | |
rewind () | |
Returns current record - fields as object properties, lowercase. More... | |
Abstract class for resultsets returned from database functions.
This is a simple Iterator with needed recorset closing support.
The difference from old recorset is that the records are returned as objects, not arrays. You should use "foreach ($recordset as $record) {}" followed by "$recordset->close()".
Do not forget to close all recordsets when they are not needed anymore!
|
abstract |
Did we reach the end?
boolean | Free resources and connections, recordset can not be used anymore. |
void |
Reimplemented in question_test_recordset, sqlsrv_native_moodle_recordset, pgsql_native_moodle_recordset, pdo_moodle_recordset, oci_native_moodle_recordset, and mysqli_native_moodle_recordset.
moodle_recordset::rewind | ( | ) |
Returns current record - fields as object properties, lowercase.
object | Returns the key of current row |
int | current row Moves forward to next row |
void | Rewinds are not supported! |
void |