diff options
Diffstat (limited to 'lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php')
-rw-r--r-- | lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php b/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php index 4e9e83a49d2..bb97d2e29f9 100644 --- a/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php +++ b/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php @@ -54,4 +54,10 @@ class SqliteFunctionBuilder extends FunctionBuilder { $quotedName = $this->helper->quoteColumnName($field); return new QueryFunction('LENGTH(CAST(' . $quotedName . ' as BLOB))' . $alias); } + + public function charLength($field, $alias = ''): IQueryFunction { + $alias = $alias ? (' AS ' . $this->helper->quoteColumnName($alias)) : ''; + $quotedName = $this->helper->quoteColumnName($field); + return new QueryFunction('LENGTH(' . $quotedName . ')' . $alias); + } } |