wiki.techinc.nl/includes/libs
Aaron Schulz 924d1f0374 rdbms: make IDatabase::insertId() less fragile and more consistent
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
2023-05-26 19:01:45 -07:00
..
composer
DebugInfo
eventrelayer
filebackend filebackend: Use SwiftFileBackend::$RES_ABSENT for self-documentation 2023-05-11 22:41:52 +02:00
http
iterators
lockmanager MemcLockManager: fix variable overwritten by foreach 2023-03-27 09:34:27 +11:00
Message
mime mime: Deprecate isPHPImageType function in MimeAnalyzer 2023-04-12 00:41:59 +00:00
objectcache objectcache: deprecate ATTR_EMULATION/QOS_EMULATION_SQL 2023-05-17 19:36:35 +00:00
ParamValidator Localisation updates from https://translatewiki.net. 2023-05-01 09:35:06 +02:00
rdbms rdbms: make IDatabase::insertId() less fragile and more consistent 2023-05-26 19:01:45 -07:00
redis redis: add missing space to "marked down" log entries in RedisConnectionPool 2023-02-03 12:03:06 -08:00
Stats Fix even more PHPStorm inspections (#3) 2023-03-25 00:30:15 +00:00
uuid
virtualrest virtualrest: Deprecate SwiftVirtualRESTService 2023-05-11 11:57:33 +05:30
WRStats
APACHE-LICENSE-2.0.txt
ArrayUtils.php
Cookie.php
CookieJar.php
CryptHKDF.php
Deflate.php
DnsSrvDiscoverer.php
Emptiable.php Reorg: Move Emptiable to libs/ 2023-04-20 18:55:48 +02:00
ExplodeIterator.php
GenericArrayObject.php
GhostFieldAccessTrait.php
HashRing.php
HtmlArmor.php
HttpStatus.php
jsminplus.php
MapCacheLRU.php
MappedIterator.php Fix some typos 2023-03-21 15:58:09 +01:00
MemoizedCallable.php
MessageSpecifier.php
MWCryptHash.php MWCryptHash: Clean up and add types of static fields 2023-01-14 01:30:29 -05:00
NonSerializableTrait.php
README
ReplacementArray.php
ReverseArrayIterator.php
RiffExtractor.php
StaticArrayWriter.php
StatusValue.php Merge "Remove unused arguments to private functions" 2023-02-08 22:42:46 +00:00
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.