Track the insert ID value in Database, similar to the affected rows. This makes it possible for subclasses to stash or override the value, which is useful when emulating a write operation using multiple queries. This includes the case of internal use of atomic sections, where the COMMIT/RELEASE can reset the last_insert_id tracked in the PECL driver itself. Use separate methods and fields for "last query statement" information and "last query method" information. Make insertId() for SQLite and Postgres better match MySQL: * Return 0 if the last query statement did not change any rows. This helps protect against callers that fail to check affectedRows(). * Make it return the existing ROWID/SERIAL column when upsert() updates an existing row. This adds a new getInsertIdColumnForUpsert() helper function. Directly use query() in doReplace() and doInsertSelectGeneric() to make the affected row/ID logic easier to follow. Improve insertId() and affectedRows() documentation. Add more integration tests of row insertion methods. Bug: T314100 Change-Id: I7d43a2e52260e66acb713554bb883f5f4a14d010 |
||
|---|---|---|
| .. | ||
| composer | ||
| DebugInfo | ||
| eventrelayer | ||
| filebackend | ||
| http | ||
| iterators | ||
| lockmanager | ||
| Message | ||
| mime | ||
| objectcache | ||
| ParamValidator | ||
| rdbms | ||
| redis | ||
| Stats | ||
| uuid | ||
| virtualrest | ||
| WRStats | ||
| APACHE-LICENSE-2.0.txt | ||
| ArrayUtils.php | ||
| Cookie.php | ||
| CookieJar.php | ||
| CryptHKDF.php | ||
| Deflate.php | ||
| DnsSrvDiscoverer.php | ||
| Emptiable.php | ||
| ExplodeIterator.php | ||
| GenericArrayObject.php | ||
| GhostFieldAccessTrait.php | ||
| HashRing.php | ||
| HtmlArmor.php | ||
| HttpStatus.php | ||
| jsminplus.php | ||
| MapCacheLRU.php | ||
| MappedIterator.php | ||
| MemoizedCallable.php | ||
| MessageSpecifier.php | ||
| MWCryptHash.php | ||
| NonSerializableTrait.php | ||
| README | ||
| ReplacementArray.php | ||
| ReverseArrayIterator.php | ||
| RiffExtractor.php | ||
| StaticArrayWriter.php | ||
| StatusValue.php | ||
| StringUtils.php | ||
| Timing.php | ||
| UDPTransport.php | ||
| XhprofData.php | ||
The classes in this directory ./includes/libs are considered standalone from the remainder of the MediaWiki codebase. They do not call on any other portions of MediaWiki code, and can be used in other projects without dependency issues.