aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2022-01-04 17:34:37 +0100
committerGitHub <noreply@github.com>2022-01-04 17:34:37 +0100
commit977d8479e382fba18e52c3fc52239b9a4bee2b32 (patch)
tree5095158e434ada0099af6a9d8a8a3fa9dd5a043f /lib/public
parent2ad566af634a924ee3abeb92fc4a0cf0e20ff3ab (diff)
parent005e717fe6d3f5bf38e65069c055b9b817a2b6ef (diff)
downloadnextcloud-server-977d8479e382fba18e52c3fc52239b9a4bee2b32.tar.gz
nextcloud-server-977d8479e382fba18e52c3fc52239b9a4bee2b32.zip
Merge pull request #30393 from nextcloud/feature/add-group-concat-aggregator-function
Add group_concat aggregator function
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/DB/QueryBuilder/IFunctionBuilder.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/public/DB/QueryBuilder/IFunctionBuilder.php b/lib/public/DB/QueryBuilder/IFunctionBuilder.php
index 33d0fbe3b1a..1e8d8c89f81 100644
--- a/lib/public/DB/QueryBuilder/IFunctionBuilder.php
+++ b/lib/public/DB/QueryBuilder/IFunctionBuilder.php
@@ -44,7 +44,7 @@ interface IFunctionBuilder {
* Combines two input strings
*
* @param string|ILiteral|IParameter|IQueryFunction $x The first input string
- * @param string|ILiteral|IParameter|IQueryFunction $y The seccond input string
+ * @param string|ILiteral|IParameter|IQueryFunction $y The second input string
*
* @return IQueryFunction
* @since 12.0.0
@@ -52,6 +52,22 @@ interface IFunctionBuilder {
public function concat($x, $y): IQueryFunction;
/**
+ * Returns a string which is the concatenation of all non-NULL values of X
+ *
+ * Usage examples:
+ *
+ * groupConcat('column') -- with comma as separator (default separator)
+ *
+ * groupConcat('column', ';') -- with different separator
+ *
+ * @param string|IQueryFunction $expr The expression to group
+ * @param string|null $separator The separator
+ * @return IQueryFunction
+ * @since 24.0.0
+ */
+ public function groupConcat($expr, ?string $separator = ','): IQueryFunction;
+
+ /**
* Takes a substring from the input string
*
* @param string|ILiteral|IParameter|IQueryFunction $input The input string