23use Wikimedia\ScopedCallback;
38 public const TRIGGER_IDLE = 1;
40 public const TRIGGER_COMMIT = 2;
42 public const TRIGGER_ROLLBACK = 3;
44 public const TRIGGER_CANCEL = 4;
47 public const TRANSACTION_EXPLICIT =
'';
49 public const TRANSACTION_INTERNAL =
'implicit';
52 public const ATOMIC_NOT_CANCELABLE =
'';
54 public const ATOMIC_CANCELABLE =
'cancelable';
57 public const FLUSHING_ONE =
'';
59 public const FLUSHING_ALL_PEERS =
'flush';
61 public const FLUSHING_INTERNAL =
'flush-internal';
64 public const ESTIMATE_TOTAL =
'total';
66 public const ESTIMATE_DB_APPLY =
'apply';
72 public const LB_TRX_ROUND_ID =
'trxRoundId';
74 public const LB_READ_ONLY_REASON =
'readOnlyReason';
77 public const ROLE_STREAMING_MASTER =
'streaming-master';
79 public const ROLE_STREAMING_REPLICA =
'streaming-replica';
81 public const ROLE_STATIC_CLONE =
'static-clone';
83 public const ROLE_UNKNOWN =
'unknown';
165 public function setLBInfo( $nameOrArray, $value =
null );
286 public function query( $sql, $fname = __METHOD__, $flags = 0 );
349 $table, $conds =
'', $fname = __METHOD__, $options = [], $join_conds = []
376 public function insert( $table, $rows, $fname = __METHOD__, $options = [] );
413 public function update( $table, $set, $conds, $fname = __METHOD__, $options = [] );
469 public function replace( $table, $uniqueKeys, $rows, $fname = __METHOD__ );
512 $table, array $rows, $uniqueKeys, array $set, $fname = __METHOD__
565 public function delete( $table, $conds, $fname = __METHOD__ );
608 $selectJoinConds = []
846 public function startAtomic( $fname = __METHOD__, $cancelable = self::ATOMIC_NOT_CANCELABLE );
961 $fname, callable $callback, $cancelable = self::ATOMIC_NOT_CANCELABLE
983 public function begin( $fname = __METHOD__, $mode = self::TRANSACTION_EXPLICIT );
1003 public function commit( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
1024 public function rollback( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
1043 public function flushSession( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
1065 public function flushSnapshot( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
1109 public function lock( $lockName, $method, $timeout = 5, $flags = 0 );
1121 public function unlock( $lockName, $method );