See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401]
Database driver test class for testing moodle_read_slave_trait
Copyright: | 2018 Srdjan Janković, Catalyst IT |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 134 lines (4 kb) |
Included or required: | 1 time |
Referenced: | 0 times |
Includes or requires: | 1 file lib/dml/tests/fixtures/read_slave_moodle_database.php |
read_slave_moodle_database_special:: (4 methods):
get_records_sql()
get_records_sql_p()
get_recordset_sql()
count_records()
read_slave_moodle_recordset_special:: (5 methods):
close()
current()
next()
key()
valid()
Class: read_slave_moodle_database_special - X-Ref
Database driver mock test class that uses read_slave_moodle_recordset_specialget_records_sql($sql, array $params = null, $limitfrom = 0, $limitnum = 0) X-Ref |
Returns empty array param: string $sql the SQL select query to execute. param: array $params array of sql parameters param: int $limitfrom return a subset of records, starting at this point (optional). param: int $limitnum return a subset comprising this many records (optional, required if $limitfrom is set). return: string $handle handle property |
get_records_sql_p($sql, array $params = null, $limitfrom = 0, $limitnum = 0) X-Ref |
Returns read_slave_moodle_database::get_records_sql() For the tests where we need both fake result and dbhandle info. param: string $sql the SQL select query to execute. param: array $params array of sql parameters param: int $limitfrom return a subset of records, starting at this point (optional). param: int $limitnum return a subset comprising this many records (optional, required if $limitfrom is set). return: string $handle handle property |
get_recordset_sql($sql, array $params = null, $limitfrom = 0, $limitnum = 0) X-Ref |
Returns fake recordset param: string $sql param: array $params param: int $limitfrom param: int $limitnum return: bool true |
count_records($table, array $conditions = null) X-Ref |
Count the records in a table where all the given conditions met. param: string $table The table to query. param: array $conditions optional array $fieldname=>requestedvalue with AND in between return: int The count of records returned from the specified criteria. |