[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Move IDatabase/ILoadBalancer to /libs/rdbms

2016-09-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Move IDatabase/ILoadBalancer to /libs/rdbms
..


Move IDatabase/ILoadBalancer to /libs/rdbms

Change-Id: I71f980b1024dc2fbca9cafbad2c9daebb6f28c9b
---
M autoload.php
R includes/libs/rdbms/database/IDatabase.php
R includes/libs/rdbms/loadbalancer/ILoadBalancer.php
3 files changed, 10 insertions(+), 10 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/autoload.php b/autoload.php
index d6908c1..66736b3 100644
--- a/autoload.php
+++ b/autoload.php
@@ -575,12 +575,12 @@
'ICacheHelper' => __DIR__ . '/includes/cache/CacheHelper.php',
'IContextSource' => __DIR__ . '/includes/context/IContextSource.php',
'IDBAccessObject' => __DIR__ . '/includes/dao/IDBAccessObject.php',
-   'IDatabase' => __DIR__ . '/includes/db/IDatabase.php',
+   'IDatabase' => __DIR__ . '/includes/libs/rdbms/database/IDatabase.php',
'IEContentAnalyzer' => __DIR__ . '/includes/libs/IEContentAnalyzer.php',
'IEUrlExtension' => __DIR__ . '/includes/libs/IEUrlExtension.php',
'IExpiringStore' => __DIR__ . 
'/includes/libs/objectcache/IExpiringStore.php',
'IJobSpecification' => __DIR__ . 
'/includes/jobqueue/JobSpecification.php',
-   'ILoadBalancer' => __DIR__ . 
'/includes/db/loadbalancer/ILoadBalancer.php',
+   'ILoadBalancer' => __DIR__ . 
'/includes/libs/rdbms/loadbalancer/ILoadBalancer.php',
'IP' => __DIR__ . '/includes/utils/IP.php',
'IPSet' => __DIR__ . '/includes/compat/IPSetCompat.php',
'IPTC' => __DIR__ . '/includes/media/IPTC.php',
diff --git a/includes/db/IDatabase.php 
b/includes/libs/rdbms/database/IDatabase.php
similarity index 99%
rename from includes/db/IDatabase.php
rename to includes/libs/rdbms/database/IDatabase.php
index e2d7436..f1242e4 100644
--- a/includes/db/IDatabase.php
+++ b/includes/libs/rdbms/database/IDatabase.php
@@ -445,7 +445,7 @@
 * Closes a database connection.
 * if it is open : commits any open transactions
 *
-* @throws MWException
+* @throws DBError
 * @return bool Operation success. true if already closed.
 */
public function close();
@@ -474,7 +474,7 @@
 * comment (you can use __METHOD__ or add some extra info)
 * @param bool $tempIgnore Whether to avoid throwing an exception on 
errors...
 * maybe best to catch the exception instead?
-* @throws MWException
+* @throws DBError
 * @return bool|ResultWrapper True for a successful write query, 
ResultWrapper object
 * for a successful read query, or false on failure if $tempIgnore 
set
 */
@@ -890,7 +890,7 @@
 *- LIST_OR:ORed WHERE clause (without the WHERE)
 *- LIST_SET:   Comma separated with field names, like a SET clause
 *- LIST_NAMES: Comma separated field names
-* @throws MWException|DBUnexpectedError
+* @throws DBError
 * @return string
 */
public function makeList( $a, $mode = LIST_COMMA );
@@ -1486,7 +1486,7 @@
 *
 * @param string $prefix Only show tables with this prefix, e.g. mw_
 * @param string $fname Calling function name
-* @throws MWException
+* @throws DBError
 * @return array
 */
public function listTables( $prefix = null, $fname = __METHOD__ );
diff --git a/includes/db/loadbalancer/ILoadBalancer.php 
b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php
similarity index 98%
rename from includes/db/loadbalancer/ILoadBalancer.php
rename to includes/libs/rdbms/loadbalancer/ILoadBalancer.php
index 94e0f2b..69c6272 100644
--- a/includes/db/loadbalancer/ILoadBalancer.php
+++ b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php
@@ -37,7 +37,7 @@
 *  - waitTimeout : Maximum time to wait for replicas for consistency 
[optional]
 *  - srvCache : BagOStuff object [optional]
 *  - wanCache : WANObjectCache object [optional]
-* @throws MWException
+* @throws InvalidArgumentException
 */
public function __construct( array $params );
 
@@ -49,7 +49,7 @@
 * Side effect: opens connections to databases
 * @param string|bool $group Query group, or false for the generic 
reader
 * @param string|bool $wiki Wiki ID, or false for the current wiki
-* @throws MWException
+* @throws DBError
 * @return bool|int|string
 */
public function getReaderIndex( $group = false, $wiki = false );
@@ -98,7 +98,7 @@
 * @param array|string|bool $groups Query group(s), or false for the 
generic reader
 * @param string|bool $wiki Wiki ID, or false for the current wiki
 *
-* @throws MWException
+* @throws DBError
 * @return IDatabase
 */

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Move IDatabase/ILoadBalancer to /libs/rdbms

2016-09-14 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/310508

Change subject: Move IDatabase/ILoadBalancer to /libs/rdbms
..

Move IDatabase/ILoadBalancer to /libs/rdbms

Change-Id: I71f980b1024dc2fbca9cafbad2c9daebb6f28c9b
---
R includes/libs/rdbms/database/IDatabase.php
R includes/libs/rdbms/loadbalancer/ILoadBalancer.php
2 files changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/08/310508/1

diff --git a/includes/db/IDatabase.php 
b/includes/libs/rdbms/database/IDatabase.php
similarity index 99%
rename from includes/db/IDatabase.php
rename to includes/libs/rdbms/database/IDatabase.php
index e2d7436..f1242e4 100644
--- a/includes/db/IDatabase.php
+++ b/includes/libs/rdbms/database/IDatabase.php
@@ -445,7 +445,7 @@
 * Closes a database connection.
 * if it is open : commits any open transactions
 *
-* @throws MWException
+* @throws DBError
 * @return bool Operation success. true if already closed.
 */
public function close();
@@ -474,7 +474,7 @@
 * comment (you can use __METHOD__ or add some extra info)
 * @param bool $tempIgnore Whether to avoid throwing an exception on 
errors...
 * maybe best to catch the exception instead?
-* @throws MWException
+* @throws DBError
 * @return bool|ResultWrapper True for a successful write query, 
ResultWrapper object
 * for a successful read query, or false on failure if $tempIgnore 
set
 */
@@ -890,7 +890,7 @@
 *- LIST_OR:ORed WHERE clause (without the WHERE)
 *- LIST_SET:   Comma separated with field names, like a SET clause
 *- LIST_NAMES: Comma separated field names
-* @throws MWException|DBUnexpectedError
+* @throws DBError
 * @return string
 */
public function makeList( $a, $mode = LIST_COMMA );
@@ -1486,7 +1486,7 @@
 *
 * @param string $prefix Only show tables with this prefix, e.g. mw_
 * @param string $fname Calling function name
-* @throws MWException
+* @throws DBError
 * @return array
 */
public function listTables( $prefix = null, $fname = __METHOD__ );
diff --git a/includes/db/loadbalancer/ILoadBalancer.php 
b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php
similarity index 98%
rename from includes/db/loadbalancer/ILoadBalancer.php
rename to includes/libs/rdbms/loadbalancer/ILoadBalancer.php
index 94e0f2b..69c6272 100644
--- a/includes/db/loadbalancer/ILoadBalancer.php
+++ b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php
@@ -37,7 +37,7 @@
 *  - waitTimeout : Maximum time to wait for replicas for consistency 
[optional]
 *  - srvCache : BagOStuff object [optional]
 *  - wanCache : WANObjectCache object [optional]
-* @throws MWException
+* @throws InvalidArgumentException
 */
public function __construct( array $params );
 
@@ -49,7 +49,7 @@
 * Side effect: opens connections to databases
 * @param string|bool $group Query group, or false for the generic 
reader
 * @param string|bool $wiki Wiki ID, or false for the current wiki
-* @throws MWException
+* @throws DBError
 * @return bool|int|string
 */
public function getReaderIndex( $group = false, $wiki = false );
@@ -98,7 +98,7 @@
 * @param array|string|bool $groups Query group(s), or false for the 
generic reader
 * @param string|bool $wiki Wiki ID, or false for the current wiki
 *
-* @throws MWException
+* @throws DBError
 * @return IDatabase
 */
public function getConnection( $i, $groups = [], $wiki = false );
@@ -109,7 +109,7 @@
 * the same number of times as getConnection() to work.
 *
 * @param IDatabase $conn
-* @throws MWException
+* @throws InvalidArgumentException
 */
public function reuseConnection( $conn );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/310508
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I71f980b1024dc2fbca9cafbad2c9daebb6f28c9b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits