26 use 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';
105 public const QUERY_NORMAL = 0;
107 public const QUERY_SILENCE_ERRORS = 1;
111 public const QUERY_REPLICA_ROLE = 4;
113 public const QUERY_IGNORE_DBO_TRX = 8;
115 public const QUERY_NO_RETRY = 16;
117 public const QUERY_CHANGE_NONE = 32;
119 public const QUERY_CHANGE_TRX = 64 | self::QUERY_IGNORE_DBO_TRX;
121 public const QUERY_CHANGE_ROWS = 128;
123 public const QUERY_CHANGE_SCHEMA = 256 | self::QUERY_IGNORE_DBO_TRX;
125 public const QUERY_CHANGE_LOCKS = 512 | self::QUERY_IGNORE_DBO_TRX;
131 public const UNION_ALL =
true;
133 public const UNION_DISTINCT =
false;
136 public const LB_TRX_ROUND_ID =
'trxRoundId';
138 public const LB_READ_ONLY_REASON =
'readOnlyReason';
141 public const ROLE_STREAMING_MASTER =
'streaming-master';
143 public const ROLE_STREAMING_REPLICA =
'streaming-replica';
145 public const ROLE_STATIC_CLONE =
'static-clone';
147 public const ROLE_UNKNOWN =
'unknown';
150 public const ALL_ROWS =
'*';
266 public function setLBInfo( $nameOrArray, $value =
null );
329 public function setFlag( $flag, $remember = self::REMEMBER_NOTHING );
337 public function clearFlag( $flag, $remember = self::REMEMBER_NOTHING );
435 public function close( $fname = __METHOD__ );
462 public function query( $sql, $fname = __METHOD__, $flags = 0 );
477 array $sqls,
string $fname = __METHOD__,
int $flags = 0, ?
string $summarySql =
null
505 $table, $var, $cond =
'', $fname = __METHOD__, $options = [], $join_conds = []
526 $table, $var, $cond =
'', $fname = __METHOD__, $options = [], $join_conds = []
766 $tables, $var =
'*', $conds =
'', $fname = __METHOD__, $options = [], $join_conds = []
788 $tables, $var =
'*', $conds =
'', $fname = __METHOD__, $options = [], $join_conds = []
804 $table, $conds =
'', $fname = __METHOD__, $options = [], $join_conds = []
816 public function fieldExists( $table, $field, $fname = __METHOD__ );
827 public function indexExists( $table, $index, $fname = __METHOD__ );
858 public function insert( $table, $rows, $fname = __METHOD__, $options = [] );
884 public function update( $table, $set, $conds, $fname = __METHOD__, $options = [] );
1017 public function replace( $table, $uniqueKeys, $rows, $fname = __METHOD__ );
1059 $table, array $rows, $uniqueKeys, array $set, $fname = __METHOD__
1100 public function delete( $table, $conds, $fname = __METHOD__ );
1137 $fname = __METHOD__,
1138 $insertOptions = [],
1139 $selectOptions = [],
1140 $selectJoinConds = []
1447 public function startAtomic( $fname = __METHOD__, $cancelable = self::ATOMIC_NOT_CANCELABLE );
1562 $fname, callable $callback, $cancelable = self::ATOMIC_NOT_CANCELABLE
1584 public function begin( $fname = __METHOD__, $mode = self::TRANSACTION_EXPLICIT );
1604 public function commit( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
1625 public function rollback( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
1644 public function flushSession( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
1665 public function flushSnapshot( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
1673 public function ping( &$rtt =
null );
1769 public function lock( $lockName, $method, $timeout = 5, $flags = 0 );
1781 public function unlock( $lockName, $method );
1844 class_alias( IDatabase::class,
'IDatabase' );