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';
79 public const UNION_ALL =
true;
81 public const UNION_DISTINCT =
false;
84 public const LB_TRX_ROUND_ID =
'trxRoundId';
86 public const LB_READ_ONLY_REASON =
'readOnlyReason';
89 public const ROLE_STREAMING_MASTER =
'streaming-master';
91 public const ROLE_STREAMING_REPLICA =
'streaming-replica';
93 public const ROLE_STATIC_CLONE =
'static-clone';
95 public const ROLE_UNKNOWN =
'unknown';
173 public function setLBInfo( $nameOrArray, $value =
null );
268 public function query( $sql, $fname = __METHOD__, $flags = 0 );
290 array $sqls,
string $fname = __METHOD__,
int $flags = 0, ?
string $summarySql =
null
318 $table, $conds =
'', $fname = __METHOD__, $options = [], $join_conds = []
343 public function insert( $table, $rows, $fname = __METHOD__, $options = [] );
372 public function update( $table, $set, $conds, $fname = __METHOD__, $options = [] );
426 public function replace( $table, $uniqueKeys, $rows, $fname = __METHOD__ );
469 $table, array $rows, $uniqueKeys, array $set, $fname = __METHOD__
516 public function delete( $table, $conds, $fname = __METHOD__ );
559 $selectJoinConds = []
797 public function startAtomic( $fname = __METHOD__, $cancelable = self::ATOMIC_NOT_CANCELABLE );
912 $fname, callable $callback, $cancelable = self::ATOMIC_NOT_CANCELABLE
934 public function begin( $fname = __METHOD__, $mode = self::TRANSACTION_EXPLICIT );
954 public function commit( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
975 public function rollback( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
994 public function flushSession( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
1016 public function flushSnapshot( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
1054 public function lock( $lockName, $method, $timeout = 5, $flags = 0 );
1066 public function unlock( $lockName, $method );
1109class_alias( IDatabase::class,
'IDatabase' );