MediaWiki master
IConnectionProvider.php
Go to the documentation of this file.
1<?php
20namespace Wikimedia\Rdbms;
21
45 public function getPrimaryDatabase( $domain = false ): IDatabase;
46
57 public function getReplicaDatabase( $domain = false, $group = null ): IReadableDatabase;
58
75 public function commitAndWaitForReplication( $fname, $ticket, array $opts = [] );
76
86 public function getEmptyTransactionTicket( $fname );
87}
Provide primary and replica IDatabase connections.
getEmptyTransactionTicket( $fname)
Get a token asserting that no write transactions are active on tracked connections.
commitAndWaitForReplication( $fname, $ticket, array $opts=[])
Commit primary DB transactions and wait for replication (if $ticket indicates it is safe).
getPrimaryDatabase( $domain=false)
Get connection to the primary database.
getReplicaDatabase( $domain=false, $group=null)
Get connection to a replica database.
Basic database interface for live and lazy-loaded relation database handles.
Definition IDatabase.php:36
A database connection without write operations.