22use InvalidArgumentException;
23use Wikimedia\ScopedCallback;
40 const TRIGGER_IDLE = 1;
42 const TRIGGER_COMMIT = 2;
44 const TRIGGER_ROLLBACK = 3;
46 const TRIGGER_CANCEL = 4;
49 const TRANSACTION_EXPLICIT =
'';
51 const TRANSACTION_INTERNAL =
'implicit';
54 const ATOMIC_NOT_CANCELABLE =
'';
56 const ATOMIC_CANCELABLE =
'cancelable';
59 const FLUSHING_ONE =
'';
61 const FLUSHING_ALL_PEERS =
'flush';
63 const FLUSHING_INTERNAL =
'flush-internal';
66 const REMEMBER_NOTHING =
'';
68 const REMEMBER_PRIOR =
'remember';
70 const RESTORE_PRIOR =
'prior';
72 const RESTORE_INITIAL =
'initial';
75 const ESTIMATE_TOTAL =
'total';
77 const ESTIMATE_DB_APPLY =
'apply';
112 const QUERY_NORMAL = 0;
114 const QUERY_SILENCE_ERRORS = 1;
119 const QUERY_PSEUDO_PERMANENT = 2;
121 const QUERY_REPLICA_ROLE = 4;
123 const QUERY_IGNORE_DBO_TRX = 8;
125 const QUERY_NO_RETRY = 16;
128 const UNION_ALL =
true;
130 const UNION_DISTINCT =
false;
208 public function setLBInfo( $nameOrArray, $value =
null );
301 public function setFlag( $flag, $remember = self::REMEMBER_NOTHING );
309 public function clearFlag( $flag, $remember = self::REMEMBER_NOTHING );
468 public function close( $fname = __METHOD__, $owner =
null );
497 public function query( $sql, $fname = __METHOD__, $flags = 0 );
525 $table, $var, $cond =
'', $fname = __METHOD__, $options = [], $join_conds = []
546 $table, $var, $cond =
'', $fname = __METHOD__, $options = [], $join_conds = []
792 $table, $var =
'*', $conds =
'', $fname = __METHOD__, $options = [], $join_conds = []
814 $tables, $var =
'*', $conds =
'', $fname = __METHOD__, $options = [], $join_conds = []
830 $table, $conds =
'', $fname = __METHOD__, $options = [], $join_conds = []
842 public function fieldExists( $table, $field, $fname = __METHOD__ );
853 public function indexExists( $table, $index, $fname = __METHOD__ );
895 public function insert( $table, $a, $fname = __METHOD__, $options = [] );
917 public function update( $table, $values, $conds, $fname = __METHOD__, $options = [] );
944 public function makeList( $a, $mode = self::LIST_COMMA );
980 public function bitAnd( $fieldLeft, $fieldRight );
987 public function bitOr( $fieldLeft, $fieldRight );
1013 $delim, $table, $field, $conds =
'', $join_conds = []
1062 $fname = __METHOD__,
1236 public function replace( $table, $uniqueIndexes, $rows, $fname = __METHOD__ );
1274 $table, array $rows, $uniqueIndexes, array $set, $fname = __METHOD__
1316 public function delete( $table, $conds, $fname = __METHOD__ );
1353 $fname = __METHOD__,
1354 $insertOptions = [],
1355 $selectOptions = [],
1356 $selectJoinConds = []
1406 array $permute_conds,
1408 $fname = __METHOD__,
1744 public function startAtomic( $fname = __METHOD__, $cancelable = self::ATOMIC_NOT_CANCELABLE );
1859 $fname, callable $callback, $cancelable = self::ATOMIC_NOT_CANCELABLE
1881 public function begin( $fname = __METHOD__, $mode = self::TRANSACTION_EXPLICIT );
1901 public function commit( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
1922 public function rollback( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
1943 public function flushSnapshot( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
1980 public function ping( &$rtt =
null );
2082 public function lock( $lockName, $method, $timeout = 5 );
2094 public function unlock( $lockName, $method );
2212class_alias( IDatabase::class,
'IDatabase' );