DB: Add join conditions to selectField, selectFieldValues, and insertSelect
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 9 Jun 2017 16:58:09 +0000 (12:58 -0400)
committerTim Starling <tstarling@wikimedia.org>
Wed, 14 Jun 2017 05:07:42 +0000 (05:07 +0000)
commit31cb62dd2db05d151a25496367b60ca339f5fec1
treec239e6eec59b5fbcc0620c268960053629b1ae3b
parent46c0c39514298d2ed119e6665a180d023eed4207
DB: Add join conditions to selectField, selectFieldValues, and insertSelect

selectField() and selectFieldValues() are trivial, they just need to
pass it through to select(). In fact, selectFieldValues() was already
doing it, just no one ever updated IDatabase.

insertSelect() is a little more work. nativeInsertSelect() was
originally written as largely a copy-paste of select() and has since
gotten well out of sync. Now that we have selectSQLText(), we should be
able to just use that. DatabasePostgres's implementation can wrap the
parent implementation instead of being another copy-paste, but
DatabaseOracle seems to still need to be special.

Change-Id: I0e6a9e6daa510639d3212641606047a5db96c500
includes/db/DatabaseOracle.php
includes/libs/rdbms/database/DBConnRef.php
includes/libs/rdbms/database/Database.php
includes/libs/rdbms/database/DatabaseMssql.php
includes/libs/rdbms/database/DatabasePostgres.php
includes/libs/rdbms/database/IDatabase.php
tests/phpunit/includes/db/DatabaseSQLTest.php