aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorVitor Mattos <vitor@php.rio>2021-12-21 12:18:15 -0300
committerVitor Mattos <vitor@php.rio>2022-01-03 07:48:11 -0300
commit79b3df00f82f3d0eee397f5389d23c8af1727afd (patch)
tree69bd942fd443b7f560ae6d0dbd72f2b1be873e00 /lib/public
parent29dffd7e7fc84faa6a4317c691c6cac9eaf42f42 (diff)
downloadnextcloud-server-79b3df00f82f3d0eee397f5389d23c8af1727afd.tar.gz
nextcloud-server-79b3df00f82f3d0eee397f5389d23c8af1727afd.zip
Add group_concat aggregator function
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/DB/QueryBuilder/IFunctionBuilder.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/public/DB/QueryBuilder/IFunctionBuilder.php b/lib/public/DB/QueryBuilder/IFunctionBuilder.php
index 33d0fbe3b1a..e04a4cbfdba 100644
--- a/lib/public/DB/QueryBuilder/IFunctionBuilder.php
+++ b/lib/public/DB/QueryBuilder/IFunctionBuilder.php
@@ -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|ILiteral|IParameter|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