moodle/lib/dml
Eloy Lafuente (stronk7) f8037d326d MDL-74143 database: Make get_indexes() to return original column names
Sometimes, in order to provide a cross-db behaviour of unique indexes
mixing null and not null columns, we create, under the hood, some
function based indexes.

When that happens get_indexes() is returning the name of the
expression objects used to calculate that function index. But we need
the original column names to be able to compare indexes and get
column dependencies properly.

So, this patch just looks, when the index is unique and function based,
to the expressions (pretty standard CASE statements) and gets the
original column name from it.

Covered with tests.
2022-03-23 23:17:30 +01:00
..
tests MDL-74143 database: Make get_indexes() to return original column names 2022-03-23 23:17:30 +01:00
auroramysql_native_moodle_database.php MDL-58931 dml: add support for aurora mysql 2020-07-01 22:56:20 +02:00
database_column_info.php MDL-53213 caching: Faster databasemeta caching for all databases. 2016-02-28 17:03:14 +11:00
mariadb_native_moodle_database.php Merge branch 'm35_MDL-59596_DDL_Issues_With_MariaDB_10p2_SQLMode' of https://github.com/scara/moodle 2018-05-28 08:15:09 +02:00
moodle_database.php MDL-52817 dml: implement driver methods for SQL group concatenation. 2021-02-19 15:30:54 +00:00
moodle_read_slave_trait.php MDL-71807 cleanup: Replace deprecated codingStandardsIgnore annotations 2022-03-08 10:49:01 +01:00
moodle_recordset.php
moodle_temptables.php MDL-53213 caching: Faster databasemeta caching for all databases. 2016-02-28 17:03:14 +11:00
moodle_transaction.php MDL-52284 core: PHP7 engine errors have type Throwable 2015-12-10 10:49:37 +08:00
mysqli_native_moodle_database.php MDL-73450 installation: Support Aurora MySQL >= 8.0.0 2022-02-10 15:13:54 -05:00
mysqli_native_moodle_recordset.php
mysqli_native_moodle_temptables.php
oci_native_moodle_database.php MDL-74143 database: Make get_indexes() to return original column names 2022-03-23 23:17:30 +01:00
oci_native_moodle_package.sql MDL-60041 dml: MOODLELIB sql file must have Unix line endings 2017-12-11 08:40:58 +00:00
oci_native_moodle_recordset.php
oci_native_moodle_temptables.php
pdo_moodle_database.php MDL-52817 dml: implement driver methods for SQL group concatenation. 2021-02-19 15:30:54 +00:00
pdo_moodle_recordset.php
pgsql_native_moodle_database.php MDL-69451 dml: use same temptables for both rw and ro database handle 2021-08-06 10:02:31 +10:00
pgsql_native_moodle_recordset.php MDL-60174 core_dml: get_recordset on Postgres eats all the RAM 2017-11-27 11:10:29 +00:00
pgsql_native_moodle_temptables.php
sqlite3_pdo_moodle_database.php MDL-58584 core: remove duplications from get_columns functions 2020-02-03 15:07:15 +11:00
sqlsrv_native_moodle_database.php MDL-71463 dml: escape square brackets for SQL Server LIKE operator. 2021-04-29 13:49:35 +01:00
sqlsrv_native_moodle_recordset.php
sqlsrv_native_moodle_temptables.php MDL-59581 database: remove mssql specific code from lib/dml 2018-04-09 01:58:26 +02:00