aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/DB
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2024-07-01 16:49:42 +0200
committerJoas Schilling <coding@schilljs.com>2024-07-19 11:21:13 +0200
commitbd383627a7ef3cb0a8e608b35de067d341f46da4 (patch)
tree03171deeabb17125567876bd4b729f75bb05fd3c /lib/public/DB
parente9bfaf31b88bb69c8ff47bb3edc0148a93b41331 (diff)
downloadnextcloud-server-bd383627a7ef3cb0a8e608b35de067d341f46da4.tar.gz
nextcloud-server-bd383627a7ef3cb0a8e608b35de067d341f46da4.zip
fix(db): Deprecate using table alias for DELETE and UPDATE
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/public/DB')
-rw-r--r--lib/public/DB/QueryBuilder/IQueryBuilder.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/public/DB/QueryBuilder/IQueryBuilder.php b/lib/public/DB/QueryBuilder/IQueryBuilder.php
index 72808835188..e4678221963 100644
--- a/lib/public/DB/QueryBuilder/IQueryBuilder.php
+++ b/lib/public/DB/QueryBuilder/IQueryBuilder.php
@@ -395,8 +395,8 @@ interface IQueryBuilder {
*
* <code>
* $qb = $conn->getQueryBuilder()
- * ->delete('users', 'u')
- * ->where('u.id = :user_id');
+ * ->delete('users')
+ * ->where('id = :user_id');
* ->setParameter(':user_id', 1);
* </code>
*
@@ -405,6 +405,7 @@ interface IQueryBuilder {
*
* @return $this This QueryBuilder instance.
* @since 8.2.0
+ * @since 30.0.0 Alias is deprecated and will no longer be used with the next Doctrine/DBAL update
*
* @psalm-taint-sink sql $delete
*/
@@ -416,9 +417,10 @@ interface IQueryBuilder {
*
* <code>
* $qb = $conn->getQueryBuilder()
- * ->update('users', 'u')
- * ->set('u.password', md5('password'))
- * ->where('u.id = ?');
+ * ->update('users')
+ * ->set('email', ':email')
+ * ->where('id = :user_id');
+ * ->setParameter(':user_id', 1);
* </code>
*
* @param string $update The table whose rows are subject to the update.
@@ -426,6 +428,7 @@ interface IQueryBuilder {
*
* @return $this This QueryBuilder instance.
* @since 8.2.0
+ * @since 30.0.0 Alias is deprecated and will no longer be used with the next Doctrine/DBAL update
*
* @psalm-taint-sink sql $update
*/