This was done automatically using the
`Universal.WhiteSpace.CommaSpacing` sniff, which will be included in the
next release of the MW PHPCS config.
Some of these have been adjusted manually where the autofix broke
vertical alignment.
Change-Id: I54a4668d8a2759b9d7de47742c943a535a04e211
- Fix typo
- Fix copy-paste issues in documentation
- Pass around caller info in getQueryInfo() and queryInfo()
- Make the Database methods internal
- Perf improvement on InsertQueryBuilder::row()
Bug: T335377
Change-Id: Idec9e62a0c392c34c0f81cfe8f65b477db7bb98f
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
Delete and Update query builders set the ->where( Database::ALL_ROWS )
as [ Database::ALL_ROWS ] internally and this makes sure they are
basically treated as condition simply being Database::ALL_ROWS
Bug: T332329
Change-Id: I79c308a8951f99869ffa09bd47c8e9bdf23f312e