X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/mediawiki.git/blobdiff_plain/19e297c21b10b1b8a3acad5e73fc71dcb35db44a..6932310fd58ebef145fa01eb76edf7150284d8ea:/includes/libs/rdbms/database/resultwrapper/IResultWrapper.php diff --git a/includes/libs/rdbms/database/resultwrapper/IResultWrapper.php b/includes/libs/rdbms/database/resultwrapper/IResultWrapper.php new file mode 100644 index 00000000..debf8a27 --- /dev/null +++ b/includes/libs/rdbms/database/resultwrapper/IResultWrapper.php @@ -0,0 +1,81 @@ +fieldname, with fields acting like member variables. If no more rows are available, + * false is returned. + * + * @return stdClass|bool + * @throws DBUnexpectedError Thrown if the database returns an error + */ + public function fetchObject(); + + /** + * Fetch the next row from the given result object, in associative array form. Fields are + * retrieved with $row['fieldname']. If no more rows are available, false is returned. + * + * @return array|bool + * @throws DBUnexpectedError Thrown if the database returns an error + */ + public function fetchRow(); + + /** + * Change the position of the cursor in a result object. + * See mysql_data_seek() + * + * @param int $row + */ + public function seek( $row ); + + /** + * Free a result object + * + * This either saves memory in PHP (buffered queries) or on the server (unbuffered queries). + * In general, queries are not large enough in result sets for this to be worth calling. + */ + public function free(); + + /** + * @return stdClass|array|bool + */ + public function current(); + + /** + * @return int + */ + public function key(); + + /** + * @return stdClass + */ + function next(); +}