23use InvalidArgumentException;
25use Wikimedia\ScopedCallback;
40 public const TRIGGER_IDLE = 1;
42 public const TRIGGER_COMMIT = 2;
44 public const TRIGGER_ROLLBACK = 3;
46 public const TRIGGER_CANCEL = 4;
49 public const TRANSACTION_EXPLICIT =
'';
51 public const TRANSACTION_INTERNAL =
'implicit';
54 public const ATOMIC_NOT_CANCELABLE =
'';
56 public const ATOMIC_CANCELABLE =
'cancelable';
59 public const FLUSHING_ONE =
'';
61 public const FLUSHING_ALL_PEERS =
'flush';
63 public const FLUSHING_INTERNAL =
'flush-internal';
66 public const REMEMBER_NOTHING =
'';
68 public const REMEMBER_PRIOR =
'remember';
70 public const RESTORE_PRIOR =
'prior';
72 public const RESTORE_INITIAL =
'initial';
75 public const ESTIMATE_TOTAL =
'total';
77 public const ESTIMATE_DB_APPLY =
'apply';
112 public const QUERY_NORMAL = 0;
114 public const QUERY_SILENCE_ERRORS = 1;
119 public const QUERY_PSEUDO_PERMANENT = 2;
121 public const QUERY_REPLICA_ROLE = 4;
123 public const QUERY_IGNORE_DBO_TRX = 8;
125 public const QUERY_NO_RETRY = 16;
127 public const QUERY_CHANGE_NONE = 32;
129 public const QUERY_CHANGE_TRX = 64 | self::QUERY_IGNORE_DBO_TRX;
131 public const QUERY_CHANGE_ROWS = 128;
133 public const QUERY_CHANGE_SCHEMA = 256 | self::QUERY_IGNORE_DBO_TRX;
139 public const UNION_ALL =
true;
141 public const UNION_DISTINCT =
false;
144 public const LB_TRX_ROUND_ID =
'trxRoundId';
146 public const LB_READ_ONLY_REASON =
'readOnlyReason';
149 public const ROLE_STREAMING_MASTER =
'streaming-master';
151 public const ROLE_STREAMING_REPLICA =
'streaming-replica';
153 public const ROLE_STATIC_CLONE =
'static-clone';
155 public const ROLE_UNKNOWN =
'unknown';
158 public const ALL_ROWS =
'*';
285 public function setLBInfo( $nameOrArray, $value =
null );
370 public function setFlag( $flag, $remember = self::REMEMBER_NOTHING );
378 public function clearFlag( $flag, $remember = self::REMEMBER_NOTHING );
567 public function close( $fname = __METHOD__, $owner =
null );
596 public function query( $sql, $fname = __METHOD__, $flags = 0 );
623 $table, $var, $cond =
'', $fname = __METHOD__, $options = [], $join_conds = []
644 $table, $var, $cond =
'', $fname = __METHOD__, $options = [], $join_conds = []
907 $tables, $var =
'*', $conds =
'', $fname = __METHOD__, $options = [], $join_conds = []
929 $tables, $var =
'*', $conds =
'', $fname = __METHOD__, $options = [], $join_conds = []
945 $table, $conds =
'', $fname = __METHOD__, $options = [], $join_conds = []
957 public function fieldExists( $table, $field, $fname = __METHOD__ );
968 public function indexExists( $table, $index, $fname = __METHOD__ );
999 public function insert( $table, $rows, $fname = __METHOD__, $options = [] );
1025 public function update( $table, $set, $conds, $fname = __METHOD__, $options = [] );
1052 public function makeList( array $a, $mode = self::LIST_COMMA );
1094 public function bitAnd( $fieldLeft, $fieldRight );
1101 public function bitOr( $fieldLeft, $fieldRight );
1127 $delim, $table, $field, $conds =
'', $join_conds = []
1208 $fname = __METHOD__,
1394 public function replace( $table, $uniqueKeys, $rows, $fname = __METHOD__ );
1431 $table, array $rows, $uniqueKeys, array $set, $fname = __METHOD__
1475 public function delete( $table, $conds, $fname = __METHOD__ );
1512 $fname = __METHOD__,
1513 $insertOptions = [],
1514 $selectOptions = [],
1515 $selectJoinConds = []
1565 array $permute_conds,
1567 $fname = __METHOD__,
1582 public function conditional( $cond, $caseTrueExpression, $caseFalseExpression );
1934 public function startAtomic( $fname = __METHOD__, $cancelable = self::ATOMIC_NOT_CANCELABLE );
2049 $fname, callable $callback, $cancelable = self::ATOMIC_NOT_CANCELABLE
2071 public function begin( $fname = __METHOD__, $mode = self::TRANSACTION_EXPLICIT );
2091 public function commit( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
2112 public function rollback( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
2133 public function flushSnapshot( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
2170 public function ping( &$rtt =
null );
2273 public function lock( $lockName, $method, $timeout = 5, $flags = 0 );
2285 public function unlock( $lockName, $method );
2403class_alias( IDatabase::class,
'IDatabase' );
foreach( $mmfl['setupFiles'] as $fileName) if($queue) if(empty( $mmfl['quiet'])) $s