summaryrefslogtreecommitdiffstats
path: root/lib/private/DB
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-04-16 11:43:12 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2019-04-16 15:42:21 +0200
commitf906913177cbb511ee3dd00a9920a7626ef8e751 (patch)
treedc2717603ba4dc8bb5be80c091066da44444ce43 /lib/private/DB
parent24d6a28f809278c7f31223ff656cd6b1c83a57ff (diff)
downloadnextcloud-server-f906913177cbb511ee3dd00a9920a7626ef8e751.tar.gz
nextcloud-server-f906913177cbb511ee3dd00a9920a7626ef8e751.zip
Allow to use Subqueries in from
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/DB')
-rw-r--r--lib/private/DB/QueryBuilder/QueryBuilder.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/DB/QueryBuilder/QueryBuilder.php b/lib/private/DB/QueryBuilder/QueryBuilder.php
index ebbcdeb0870..25d59fb7d7d 100644
--- a/lib/private/DB/QueryBuilder/QueryBuilder.php
+++ b/lib/private/DB/QueryBuilder/QueryBuilder.php
@@ -1170,6 +1170,10 @@ class QueryBuilder implements IQueryBuilder {
* @return string
*/
public function getTableName($table) {
+ if ($table instanceof IQueryFunction) {
+ return (string) $table;
+ }
+
$table = $this->prefixTableName($table);
return $this->helper->quoteColumnName($table);
}