2 // This file is part of Moodle - http://moodle.org/
4 // Moodle is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // Moodle is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 * Native Aurora MySQL class representing moodle database interface.
21 * @copyright 2020 Lafayette College ITS
22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
25 defined('MOODLE_INTERNAL') ||
die();
27 require_once(__DIR__
.'/moodle_database.php');
28 require_once(__DIR__
.'/mysqli_native_moodle_database.php');
29 require_once(__DIR__
.'/mysqli_native_moodle_recordset.php');
30 require_once(__DIR__
.'/mysqli_native_moodle_temptables.php');
33 * Native Aurora MySQL class representing moodle database interface.
36 * @copyright 2020 Lafayette College ITS
37 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
39 class auroramysql_native_moodle_database
extends mysqli_native_moodle_database
{
41 /** @var bool is compressed row format supported cache */
42 protected $compressedrowformatsupported = false;
45 * Returns localised database type name.
47 * Returns localised database type name. Can be used before connect().
50 public function get_name(): ?
string {
51 return get_string('nativeauroramysql', 'install');
55 * Returns localised database configuration help.
57 * Returns localised database configuration help. Can be used before connect().
60 public function get_configuration_help(): ?
string {
61 return get_string('nativeauroramysql', 'install');
65 * Returns the database vendor.
67 * Returns the database vendor. Can be used before connect().
68 * @return string The db vendor name, usually the same as db family name.
70 public function get_dbvendor(): ?
string {
75 * Returns more specific database driver type
77 * Returns more specific database driver type. Can be used before connect().
78 * @return string db type mysqli, pgsql, oci, mssql, sqlsrv
80 protected function get_dbtype(): ?
string {
85 * It is time to require transactions everywhere.
87 * MyISAM is NOT supported!
91 protected function transactions_supported(): ?
bool {
92 if ($this->external
) {
93 return parent
::transactions_supported();