summaryrefslogtreecommitdiffstats
path: root/lib/public/DB
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2019-09-04 16:48:02 +0200
committerRobin Appelman <robin@icewind.nl>2019-09-06 12:28:17 +0200
commit8ef5a366eccaab850dab4641619c704a0b36f3d9 (patch)
tree66358c6d83850bc3ef08a65db5730e764779f0ca /lib/public/DB
parent6d20876eb2aae5cb2269c7551e7a4f43e7a31222 (diff)
downloadnextcloud-server-8ef5a366eccaab850dab4641619c704a0b36f3d9.tar.gz
nextcloud-server-8ef5a366eccaab850dab4641619c704a0b36f3d9.zip
add MAX and MIN to functionbuilder
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/public/DB')
-rw-r--r--lib/public/DB/QueryBuilder/IFunctionBuilder.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/public/DB/QueryBuilder/IFunctionBuilder.php b/lib/public/DB/QueryBuilder/IFunctionBuilder.php
index 1e17290f145..066be470150 100644
--- a/lib/public/DB/QueryBuilder/IFunctionBuilder.php
+++ b/lib/public/DB/QueryBuilder/IFunctionBuilder.php
@@ -105,4 +105,24 @@ interface IFunctionBuilder {
* @since 14.0.0
*/
public function count($count, $alias = '');
+
+ /**
+ * Takes the maximum of all rows in a column
+ *
+ * @param mixed $field the column to maximum
+ *
+ * @return IQueryFunction
+ * @since 18.0.0
+ */
+ public function max($field);
+
+ /**
+ * Takes the minimum of all rows in a column
+ *
+ * @param mixed $field the column to minimum
+ *
+ * @return IQueryFunction
+ * @since 18.0.0
+ */
+ public function min($field);
}