summaryrefslogtreecommitdiffstats
path: root/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php')
-rw-r--r--lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php b/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php
index 1d745306351..bd367973097 100644
--- a/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php
+++ b/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php
@@ -63,4 +63,12 @@ class FunctionBuilder implements IFunctionBuilder {
public function lower($field) {
return new QueryFunction('LOWER(' . $this->helper->quoteColumnName($field) . ')');
}
+
+ public function add($x, $y) {
+ return new QueryFunction($this->helper->quoteColumnName($x) . ' + ' . $this->helper->quoteColumnName($y));
+ }
+
+ public function subtract($x, $y) {
+ return new QueryFunction($this->helper->quoteColumnName($x) . ' - ' . $this->helper->quoteColumnName($y));
+ }
}