summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-04-12 16:09:35 +0200
committerRobin Appelman <robin@icewind.nl>2017-04-12 16:09:35 +0200
commitac45af68cd7d30bb202e6b39ecf5bfcfd4b00225 (patch)
treedb8e9c2672513ccd4ac9c4437b2dfb088b7d8073 /lib/public
parent18580395d4095842462e035a2d947e716413d2fd (diff)
downloadnextcloud-server-ac45af68cd7d30bb202e6b39ecf5bfcfd4b00225.tar.gz
nextcloud-server-ac45af68cd7d30bb202e6b39ecf5bfcfd4b00225.zip
Add sub() to the query function builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/DB/QueryBuilder/IFunctionBuilder.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/public/DB/QueryBuilder/IFunctionBuilder.php b/lib/public/DB/QueryBuilder/IFunctionBuilder.php
index 6c1f596966d..38d3a67da9b 100644
--- a/lib/public/DB/QueryBuilder/IFunctionBuilder.php
+++ b/lib/public/DB/QueryBuilder/IFunctionBuilder.php
@@ -59,4 +59,14 @@ interface IFunctionBuilder {
* @since 12.0.0
*/
public function substring($input, $start, $length = null);
+
+ /**
+ * Takes the sum of all rows in a column
+ *
+ * @param mixed $field the column to sum
+ *
+ * @return IQueryFunction
+ * @since 12.0.0
+ */
+ public function sum($field);
}