rdbms: make selectRowCount() use $var argument to exclude NULLs
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 15 Feb 2018 03:46:04 +0000 (19:46 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Sun, 18 Mar 2018 01:34:33 +0000 (01:34 +0000)
commitd395dfb039fce787c9e4acbfeecbfe0ec372a9be
tree4db335edc11b95fd87afbe0b5e3920c6e979a441
parent1f64fa48d397fca02befcd4fd7502655b9463619
rdbms: make selectRowCount() use $var argument to exclude NULLs

If the $var argument is provided, then it will make the resulting
count exclude rows where the value for that column is NULL.

Also add buildSelectSubquery() method and Subquery
wrapper class for use with select() for calculated tables.

Change-Id: I549d629af99afdf370602de095f7fba6d1546c37
autoload.php
includes/libs/rdbms/database/DBConnRef.php
includes/libs/rdbms/database/Database.php
includes/libs/rdbms/database/DatabaseMssql.php
includes/libs/rdbms/database/DatabaseMysqlBase.php
includes/libs/rdbms/database/DatabasePostgres.php
includes/libs/rdbms/database/IDatabase.php
includes/libs/rdbms/encasing/Subquery.php [new file with mode: 0644]
tests/phpunit/includes/libs/rdbms/database/DatabaseSQLTest.php