]> source.dussan.org Git - nextcloud-server.git/commitdiff
Allow to use Subqueries in from
authorJoas Schilling <coding@schilljs.com>
Tue, 16 Apr 2019 09:43:12 +0000 (11:43 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Tue, 16 Apr 2019 13:42:21 +0000 (15:42 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/DB/QueryBuilder/QueryBuilder.php

index ebbcdeb0870d0ae2c2ad13d3144ffc990eadd6e6..25d59fb7d7dae0b024ce2cbb84e01bf529575181 100644 (file)
@@ -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);
        }