summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2021-03-03 11:34:56 +0100
committerGitHub <noreply@github.com>2021-03-03 11:34:56 +0100
commit11858a3d66d7fc7ac6b441310d3dec1cad33b32a (patch)
treef85745d011ad8702cc3379875c1570b952435943 /lib
parent74f36173bcd9ef4867d8c01592f9cec197e0e364 (diff)
parent47dd8e54b5d05d44596daccd64d50b645e275b19 (diff)
downloadnextcloud-server-11858a3d66d7fc7ac6b441310d3dec1cad33b32a.tar.gz
nextcloud-server-11858a3d66d7fc7ac6b441310d3dec1cad33b32a.zip
Merge pull request #25816 from nextcloud/iquerybuilder-join-conditions
allow non string join conditions in query builder
Diffstat (limited to 'lib')
-rw-r--r--lib/private/DB/QueryBuilder/QueryBuilder.php11
-rw-r--r--lib/public/DB/QueryBuilder/IQueryBuilder.php8
2 files changed, 10 insertions, 9 deletions
diff --git a/lib/private/DB/QueryBuilder/QueryBuilder.php b/lib/private/DB/QueryBuilder/QueryBuilder.php
index fb28fa28649..aa0327e89d9 100644
--- a/lib/private/DB/QueryBuilder/QueryBuilder.php
+++ b/lib/private/DB/QueryBuilder/QueryBuilder.php
@@ -48,6 +48,7 @@ use OC\DB\QueryBuilder\FunctionBuilder\SqliteFunctionBuilder;
use OC\DB\ResultAdapter;
use OC\SystemConfig;
use OCP\DB\IResult;
+use OCP\DB\QueryBuilder\ICompositeExpression;
use OCP\DB\QueryBuilder\ILiteral;
use OCP\DB\QueryBuilder\IParameter;
use OCP\DB\QueryBuilder\IQueryBuilder;
@@ -282,7 +283,7 @@ class QueryBuilder implements IQueryBuilder {
'app' => 'core',
]);
}
-
+
$result = $this->queryBuilder->execute();
if (is_int($result)) {
return $result;
@@ -664,7 +665,7 @@ class QueryBuilder implements IQueryBuilder {
* @param string $fromAlias The alias that points to a from clause.
* @param string $join The table name to join.
* @param string $alias The alias of the join table.
- * @param string $condition The condition for the join.
+ * @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
*/
@@ -692,7 +693,7 @@ class QueryBuilder implements IQueryBuilder {
* @param string $fromAlias The alias that points to a from clause.
* @param string $join The table name to join.
* @param string $alias The alias of the join table.
- * @param string $condition The condition for the join.
+ * @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
*/
@@ -720,7 +721,7 @@ class QueryBuilder implements IQueryBuilder {
* @param string $fromAlias The alias that points to a from clause.
* @param string $join The table name to join.
* @param string $alias The alias of the join table.
- * @param string $condition The condition for the join.
+ * @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
*/
@@ -748,7 +749,7 @@ class QueryBuilder implements IQueryBuilder {
* @param string $fromAlias The alias that points to a from clause.
* @param string $join The table name to join.
* @param string $alias The alias of the join table.
- * @param string $condition The condition for the join.
+ * @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
*/
diff --git a/lib/public/DB/QueryBuilder/IQueryBuilder.php b/lib/public/DB/QueryBuilder/IQueryBuilder.php
index e63df8a9024..0a5d42e48c5 100644
--- a/lib/public/DB/QueryBuilder/IQueryBuilder.php
+++ b/lib/public/DB/QueryBuilder/IQueryBuilder.php
@@ -471,7 +471,7 @@ interface IQueryBuilder {
* @param string $fromAlias The alias that points to a from clause.
* @param string $join The table name to join.
* @param string $alias The alias of the join table.
- * @param string $condition The condition for the join.
+ * @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
* @since 8.2.0
@@ -496,7 +496,7 @@ interface IQueryBuilder {
* @param string $fromAlias The alias that points to a from clause.
* @param string $join The table name to join.
* @param string $alias The alias of the join table.
- * @param string $condition The condition for the join.
+ * @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
* @since 8.2.0
@@ -521,7 +521,7 @@ interface IQueryBuilder {
* @param string $fromAlias The alias that points to a from clause.
* @param string $join The table name to join.
* @param string $alias The alias of the join table.
- * @param string $condition The condition for the join.
+ * @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
* @since 8.2.0
@@ -546,7 +546,7 @@ interface IQueryBuilder {
* @param string $fromAlias The alias that points to a from clause.
* @param string $join The table name to join.
* @param string $alias The alias of the join table.
- * @param string $condition The condition for the join.
+ * @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
* @since 8.2.0