summaryrefslogtreecommitdiffstats
path: root/lib/private/DB/QueryBuilder
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-04-10 18:30:43 +0200
committerRobin Appelman <robin@icewind.nl>2018-04-11 19:21:45 +0200
commit89a9d35d90b7264d66411dfefec0aa84491d5cf9 (patch)
tree8e433546babedc20917bb0b81fa59f7438a4dfc5 /lib/private/DB/QueryBuilder
parent9260474ab69e85c292ac1b845a52e4ddf838d4ae (diff)
downloadnextcloud-server-89a9d35d90b7264d66411dfefec0aa84491d5cf9.tar.gz
nextcloud-server-89a9d35d90b7264d66411dfefec0aa84491d5cf9.zip
dont keep shared database locks when running cli scripts
For cli scripts we don't have the assumption that the universe will be cleaned up soon Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/DB/QueryBuilder')
-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));
+ }
}