aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-09-09 17:42:01 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-09-10 17:51:27 +0200
commit027fc052e78cb8401b3805c26a349c859ba7f275 (patch)
tree3740381d347472cac5f74f318a57c8f6ecc5aba3 /lib/public
parent531862d47477dfc3868240895a00a39c4dd6ac8e (diff)
downloadnextcloud-server-027fc052e78cb8401b3805c26a349c859ba7f275.tar.gz
nextcloud-server-027fc052e78cb8401b3805c26a349c859ba7f275.zip
fix: Adjust types of IQueryBuilder to properly allow joining with sub-query
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/DB/QueryBuilder/IQueryBuilder.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/public/DB/QueryBuilder/IQueryBuilder.php b/lib/public/DB/QueryBuilder/IQueryBuilder.php
index c21793a2421..22724c0c800 100644
--- a/lib/public/DB/QueryBuilder/IQueryBuilder.php
+++ b/lib/public/DB/QueryBuilder/IQueryBuilder.php
@@ -541,12 +541,13 @@ interface IQueryBuilder {
* </code>
*
* @param string $fromAlias The alias that points to a from clause.
- * @param string $join The table name to join.
+ * @param string|IQueryFunction $join The table name to join.
* @param string $alias The alias of the join table.
* @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
* @since 8.2.0
+ * @since 30.0.0 Allow passing IQueryFunction as parameter for `$join` to allow join with a sub-query.
*
* @psalm-taint-sink sql $fromAlias
* @psalm-taint-sink sql $join
@@ -1001,11 +1002,14 @@ interface IQueryBuilder {
public function getLastInsertId(): int;
/**
- * Returns the table name quoted and with database prefix as needed by the implementation
+ * Returns the table name quoted and with database prefix as needed by the implementation.
+ * If a query function is passed the function is casted to string,
+ * this allows passing functions as sub-queries for join expression.
*
* @param string|IQueryFunction $table
* @return string
* @since 9.0.0
+ * @since 24.0.0 accepts IQueryFunction as parameter
*/
public function getTableName($table);