26use Wikimedia\ScopedCallback;
41 public const TRIGGER_IDLE = 1;
43 public const TRIGGER_COMMIT = 2;
45 public const TRIGGER_ROLLBACK = 3;
47 public const TRIGGER_CANCEL = 4;
50 public const TRANSACTION_EXPLICIT =
'';
52 public const TRANSACTION_INTERNAL =
'implicit';
55 public const ATOMIC_NOT_CANCELABLE =
'';
57 public const ATOMIC_CANCELABLE =
'cancelable';
60 public const FLUSHING_ONE =
'';
62 public const FLUSHING_ALL_PEERS =
'flush';
64 public const FLUSHING_INTERNAL =
'flush-internal';
67 public const REMEMBER_NOTHING =
'';
69 public const REMEMBER_PRIOR =
'remember';
71 public const RESTORE_PRIOR =
'prior';
73 public const RESTORE_INITIAL =
'initial';
76 public const ESTIMATE_TOTAL =
'total';
78 public const ESTIMATE_DB_APPLY =
'apply';
108 public const UNION_ALL =
true;
110 public const UNION_DISTINCT =
false;
113 public const LB_TRX_ROUND_ID =
'trxRoundId';
115 public const LB_READ_ONLY_REASON =
'readOnlyReason';
118 public const ROLE_STREAMING_MASTER =
'streaming-master';
120 public const ROLE_STREAMING_REPLICA =
'streaming-replica';
122 public const ROLE_STATIC_CLONE =
'static-clone';
124 public const ROLE_UNKNOWN =
'unknown';
227 public function setLBInfo( $nameOrArray, $value =
null );
290 public function setFlag( $flag, $remember = self::REMEMBER_NOTHING );
298 public function clearFlag( $flag, $remember = self::REMEMBER_NOTHING );
396 public function close( $fname = __METHOD__ );
423 public function query( $sql, $fname = __METHOD__, $flags = 0 );
438 array $sqls,
string $fname = __METHOD__,
int $flags = 0, ?
string $summarySql =
null
473 $table, $var, $cond =
'', $fname = __METHOD__, $options = [], $join_conds = []
497 $table, $var, $cond =
'', $fname = __METHOD__, $options = [], $join_conds = []
746 $tables, $var =
'*', $conds =
'', $fname = __METHOD__, $options = [], $join_conds = []
771 $tables, $var =
'*', $conds =
'', $fname = __METHOD__, $options = [], $join_conds = []
787 $table, $conds =
'', $fname = __METHOD__, $options = [], $join_conds = []
809 public function insert( $table, $rows, $fname = __METHOD__, $options = [] );
835 public function update( $table, $set, $conds, $fname = __METHOD__, $options = [] );
949 public function replace( $table, $uniqueKeys, $rows, $fname = __METHOD__ );
991 $table, array $rows, $uniqueKeys, array $set, $fname = __METHOD__
1032 public function delete( $table, $conds, $fname = __METHOD__ );
1069 $fname = __METHOD__,
1070 $insertOptions = [],
1071 $selectOptions = [],
1072 $selectJoinConds = []
1379 public function startAtomic( $fname = __METHOD__, $cancelable = self::ATOMIC_NOT_CANCELABLE );
1494 $fname, callable $callback, $cancelable = self::ATOMIC_NOT_CANCELABLE
1516 public function begin( $fname = __METHOD__, $mode = self::TRANSACTION_EXPLICIT );
1536 public function commit( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
1557 public function rollback( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
1576 public function flushSession( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
1597 public function flushSnapshot( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
1605 public function ping( &$rtt =
null );
1692 public function lock( $lockName, $method, $timeout = 5, $flags = 0 );
1704 public function unlock( $lockName, $method );
1767class_alias( IDatabase::class,
'IDatabase' );