Move all of the reasonable DatabaseBase methods to Database class
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 16 Sep 2016 03:14:58 +0000 (20:14 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Sat, 17 Sep 2016 03:38:05 +0000 (03:38 +0000)
commit403a1ea17835664a4d45269fe9cd4bde5797616b
treecaf1d9ce0cf2ebea962b3ae666151e9badce3038
parent2f90b6f00a3bf4fd3686538d33475063754ea349
Move all of the reasonable DatabaseBase methods to Database class

The Database class was previously just a short-hand for "Database::",
and such calls should still work. The class now resides in /libs/rdbms.

The subclasses now extend DatabaseBase to avoid breaking type hints
that use that (hints use either IDatabase or DatabaseBase).

Also, use CASCADE with DROP TABLE for MySQL as with other DBs.
Keep SQLite excempt due to lack of support.

Added getDomainID() methods to avoid mentioning the word "wiki".

Change-Id: Ibd05d786cb26c21dcc9cb9601f6b2b52056af9ae
12 files changed:
autoload.php
includes/db/Database.php
includes/db/DatabaseMssql.php
includes/db/DatabaseMysqlBase.php
includes/db/DatabaseOracle.php
includes/db/DatabasePostgres.php
includes/db/DatabaseSqlite.php
includes/libs/rdbms/database/DBConnRef.php
includes/libs/rdbms/database/Database.php [new file with mode: 0644]
includes/libs/rdbms/database/IDatabase.php
includes/libs/rdbms/database/resultwrapper/ResultWrapper.php
tests/phpunit/includes/db/DatabaseSQLTest.php