/** @var int DB handle should have DBO_TRX disabled and the caller will leave it as such */
const CONN_TRX_AUTOCOMMIT = 1;
- /** @var int Alias for CONN_TRX_AUTOCOMMIT for b/c; deprecated since 1.31 */
- const CONN_TRX_AUTO = 1;
/** @var string Manager of ILoadBalancer instances is running post-commit callbacks */
const STAGE_POSTCOMMIT_CALLBACKS = 'stage-postcommit-callbacks';
*/
public function __construct( array $params );
+ /**
+ * Get the local (and default) database domain ID of connection handles
+ *
+ * @see DatabaseDomain
+ * @return string Database domain ID; this specifies DB name, schema, and table prefix
+ * @since 1.31
+ */
+ public function getLocalDomainID();
+
+ /**
+ * @param DatabaseDomain|string|bool $domain Database domain
+ * @return string Value of $domain if provided or the local domain otherwise
+ * @since 1.32
+ */
+ public function resolveDomainID( $domain );
+
/**
* Get the index of the reader connection, which may be a replica DB
*
* This can be used a faster proxy for waitForAll()
*
* @param DBMasterPos|bool $pos Master position or false
- * @param int $timeout Max seconds to wait; default is mWaitTimeout
+ * @param int|null $timeout Max seconds to wait; default is mWaitTimeout
* @return bool Success (able to connect and no timeouts reached)
*/
public function waitForOne( $pos, $timeout = null );
* Set the master wait position and wait for ALL replica DBs to catch up to it
*
* @param DBMasterPos|bool $pos Master position or false
- * @param int $timeout Max seconds to wait; default is mWaitTimeout
+ * @param int|null $timeout Max seconds to wait; default is mWaitTimeout
* @return bool Success (able to connect and no timeouts reached)
*/
public function waitForAll( $pos, $timeout = null );
* Check if this load balancer object had any recent or still
* pending writes issued against it by this PHP thread
*
- * @param float $age How many seconds ago is "recent" [defaults to mWaitTimeout]
+ * @param float|null $age How many seconds ago is "recent" [defaults to mWaitTimeout]
* @return bool
*/
public function hasOrMadeRecentMasterChanges( $age = null );