aboutsummaryrefslogtreecommitdiffstats
path: root/includes/preferences
diff options
context:
space:
mode:
authorTim Starling <tstarling@wikimedia.org>2021-07-15 10:46:59 +1000
committerPetr Pchelko <ppchelko@wikimedia.org>2021-07-21 06:54:26 -0700
commitbc76602493ce814c8ccf3cfac97f4b237f9aff96 (patch)
tree1baeb5e21092a99bc670ceefd5c1c92c7c368627 /includes/preferences
parentf4adf4e75b5a6ed31288e612665b04e375dfe01d (diff)
downloadmediawikicore-bc76602493ce814c8ccf3cfac97f4b237f9aff96.tar.gz
mediawikicore-bc76602493ce814c8ccf3cfac97f4b237f9aff96.zip
DBMS-specific ResultWrapper subclasses
Cleanup after the switch of Database::query() to return ResultWrapper instead of resource. * Soft-deprecate the IResultWrapper accessors in IDatabase. * Move relevant DBMS-specific functionality to ResultWrapper subclasses. The deprecated methods in IResultWrapper become short and simple. ResultWrapper is now abstract (b/c break). * Move the implementation of fieldName(), numFields() and one of the fieldInfo() implementations to the ResultWrapper subclass in order to avoid ResultWrapper::unwrap() calls. * Make Database::doQuery() return a ResultWrapper subclass instead of underlying result data, so that the Database parent class does not need to be aware of wrapper construction. * Hard-deprecate ResultWrapper::unwrap(), DatabaseMysqlBase::fieldType(), DatabasePostgres::fieldType(). * Fix the inefficient seeking method in SQLite. * Make FakeResultWrapper extend ResultWrapper with an implementation similar to the SQLite one. This is possible because ResultWrapper does not depend on IDatabase anymore. * Resolve fixme in DatabasePostgres: from studying the source, neither pg_fetch_object() nor pg_num_rows() can set an error retrievable with pg_last_error(). Removed unnecessary warning suppression. * ResultWrapperTest didn't make sense as a unit test anymore, so I adapted it as an integration test against the current DBMS. This change also means that ResultWrapper::key() always gives the correct offset, even if Iterator methods are not being used. Bug: T286694 Change-Id: I935835316c0bd7d3d061bd8fde9c9ce99ce756ec
Diffstat (limited to 'includes/preferences')
0 files changed, 0 insertions, 0 deletions