aboutsummaryrefslogtreecommitdiffstats
path: root/includes/SiteStats
Commit message (Collapse)AuthorAgeFilesLines
* Use type declaration on undocumented private functionsUmherirrender2025-04-021-2/+2
| | | | Change-Id: I0d8d2237500ed6f18439410c902d47c42e4119bc
* Namespace all remaining files in includes/jobqueueJames D. Forrester2025-03-201-1/+1
| | | | | Bug: T353458 Change-Id: I95690a312e356c45dbeed607d32fb0e4626690cf
* Change some type hints from IDatabase to IReadableDatabaseUmherirrender2024-05-242-6/+6
| | | | | | Use narrow interface if no writes are done Change-Id: I55148c8b6fda8830a29a235c63fc118f636ab3e6
* Stop using LoadBalancer::getConnectionRef() so it can be hard-deprecatedAmir Sarabadani2024-04-301-5/+5
| | | | | Bug: T326274 Change-Id: I90493d7cd4c21fdc022bcc19765fc04d986a9c8f
* Standardise all our class alias deprecation comments for ease of greppingJames D. Forrester2024-03-192-6/+2
| | | | Change-Id: I7f85d931d3b79da23e87b4e5692b2e14be8fcaa0
* Change uses of getDBLoadBalancerFactory() to getConnectionProvider()Bartosz Dziewoński2024-01-221-2/+2
| | | | | | | | | | | | Update cases where one of the IConnectionProvider methods is called immediately. This doesn't really change anything, but I hope it helps promote getConnectionProvider() as the common way to do this. Follow-up to 8604c384f624273f46b653ec252ffaed30e6ff89. Change-Id: Id0e7d02bab0c570343c2b1f03c70b44ee39db112
* Namespace remaining files under includes/deferredJames D. Forrester2023-11-221-1/+1
| | | | | Bug: T166010 Change-Id: Ibd40734b96fd2900e3ce12239d09becfb4150059
* SiteStats: Use ICP in SiteStatsInitAmir Sarabadani2023-11-011-17/+19
| | | | | | | Much cleaner. Bug: T330641 Change-Id: I5331157821a5ccd13247eed88a8ac51832b0c51a
* Mass migrate simple cases to use expression builderAmir Sarabadani2023-10-261-1/+1
| | | | | | | | | | | | | | | Done via '([A-Za-z_\.]+) ?(=|!=|<|<=|>|>=) ?' . (\$db(?:r|w|))->addQuotes\( (.+?) \) to: $3->expr\( '$1', '$2', $4 \) And '([A-Za-z_\.]+) IS NULL OR ([A-Za-z_\.]+) ?(=|!=|<|<=|>|>=) ?' . (\$db(?:r|w|))->addQuotes\( (.+?) \) to: $4->expr( '$1', '=', null )->or\( '$2', '$3', $5 \) Bug: T210206 Change-Id: I109bf2a712bdefa9e074f775b1bee41ac5b9d665
* Migrate another major batch to SelectQueryBuilderAmir Sarabadani2023-09-201-1/+5
| | | | | | | | I fixed some edge cases in the script that migrates to SQB and it managed to fix these now. Bug: T344971 Change-Id: I00cc9a6660d9bd4c64c976121b2121ccd7aae1f0
* In query builders, use insertInto() and deleteFrom() instead of insert() and ↵Tim Starling2023-09-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | delete() The design principle for SelectQueryBuilder was to make the chained builder calls look as much like SQL as possible, so that developers could leverage their knowledge of SQL to understand what the query builder is doing. That's why SelectQueryBuilder::select() takes a list of fields, and by the same principle, it makes sense for UpdateQueryBuilder::update() to take a table. However with "insert" and "delete", the SQL designers chose to add prepositions "into" and "from", and I think it makes sense to follow that here. In terms of natural language, we update a table, but we don't delete a table, or insert a table. We delete rows from a table, or insert rows into a table. The table is not the object of the verb. So, add insertInto() as an alias for insert(), and add deleteFrom() as an alias for delete(). Use the new methods in MW core callers where PHPStorm knows the type. Change-Id: Idb327a54a57a0fb2288ea067472c1e9727016000
* Migrate Database::upsert() calls to InsertQueryBuilderAmir Sarabadani2023-09-061-15/+14
| | | | | Bug: T335377 Change-Id: I0e0c3f3a9150c7a62d8fff95fe8867bdce356071
* Follow-up e182010: Add in-code comment on aliases for when they were addedJames D. Forrester2023-08-292-0/+6
| | | | Change-Id: Ib4ea167078ba7ba026e7fa61de7fb0bf514f74d5
* mark various anonymous functions as staticReedy2023-08-221-2/+2
| | | | Change-Id: Iefe896769359f0d32e52bf20aa03e1c3715d5074
* Mass migrate Database::insert calls to InsertQueryBuilderAmir Sarabadani2023-08-071-6/+5
| | | | | | | Done automatically based on a php parser written on top of ANTLR4 Bug: T335377 Change-Id: Ie8fabc594edab18e55cb1d5bbf573762106e3d71
* Migrate more calls of Database::select* to SelectQueryBuilderAmir Sarabadani2023-07-261-6/+5
| | | | | | | | | Using a php parser written on top of ANTLR4, done semi-automatically. I checked everything and made adjustments. Bug: T311866 Change-Id: I6150c6909bce8f3dbd745a26380cc0af9d9c547f
* Reorg: Move SiteStats*.php to SiteStats/Amir Sarabadani2023-04-272-0/+546
It's going to be a bit small and narrow but it's better than sitting in the root of includes/ plus I hope we can hollow out SiteStatsUpdate class into the third one and or move this under a better directory in the future. Bug: T321882 Change-Id: Ia503b53b31ca00600f8c18b61a2652c3e146494e