summaryrefslogtreecommitdiffstats
path: root/lib/public/DB
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-03-24 16:17:37 +0100
committerVincent Petry (Rebase PR Action) <PVince81@users.noreply.github.com>2022-03-24 20:35:02 +0000
commitefebbacca4d5a5045271eeecd209c8a0b4253598 (patch)
treee9e7d33b8ca9ec8f9fb5c287e31f317d2c94435e /lib/public/DB
parent7dc3eb1e9e9a2cf6b52dc17986b4bbca395f0998 (diff)
downloadnextcloud-server-efebbacca4d5a5045271eeecd209c8a0b4253598.tar.gz
nextcloud-server-efebbacca4d5a5045271eeecd209c8a0b4253598.zip
Add octetLength and charLength to function builder, and tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/public/DB')
-rw-r--r--lib/public/DB/QueryBuilder/IFunctionBuilder.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/public/DB/QueryBuilder/IFunctionBuilder.php b/lib/public/DB/QueryBuilder/IFunctionBuilder.php
index 04c5cbd07bd..d4edc8ea9f8 100644
--- a/lib/public/DB/QueryBuilder/IFunctionBuilder.php
+++ b/lib/public/DB/QueryBuilder/IFunctionBuilder.php
@@ -124,6 +124,24 @@ interface IFunctionBuilder {
public function count($count = '', $alias = ''): IQueryFunction;
/**
+ * @param string|ILiteral|IParameter|IQueryFunction $field The input to be measured
+ * @param string $alias Alias for the length
+ *
+ * @return IQueryFunction
+ * @since 24.0.0
+ */
+ public function octetLength($field, $alias = ''): IQueryFunction;
+
+ /**
+ * @param string|ILiteral|IParameter|IQueryFunction $field The input to be measured
+ * @param string $alias Alias for the length
+ *
+ * @return IQueryFunction
+ * @since 24.0.0
+ */
+ public function charLength($field, $alias = ''): IQueryFunction;
+
+ /**
* Takes the maximum of all rows in a column
*
* If you want to get the maximum value of multiple columns in the same row, use `greatest` instead