Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 401 and 402] [Versions 401 and 403]

Database driver test class for testing mysqli_native_moodle_database with 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: 66 lines (2 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 2 files
 lib/dml/tests/fixtures/test_moodle_read_slave_trait.php
 lib/dml/mysqli_native_moodle_database.php

Defines 1 class

read_slave_moodle_database_mock_mysqli:: (2 methods):
  get_tables()
  change_database_structure()


Class: read_slave_moodle_database_mock_mysqli  - X-Ref

Database driver mock test class that exposes some methods

get_tables($usecache = true)   X-Ref
Return tables in database WITHOUT current prefix

param: bool $usecache if true, returns list of cached tables.
return: array of table names in lowercase and without prefix

change_database_structure($sql, $tablenames = null)   X-Ref
To be used by database_manager

param: string|array $sql query
param: array|null $tablenames an array of xmldb table names affected by this request.
return: bool true