aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2019-11-06 11:38:47 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-11-26 12:05:30 +0100
commit9e450d727a2374c218cdd62c1c97b5ad7ebf48a8 (patch)
tree1695f4521a05b66efc17f360d32696a0c8037a20 /lib/public
parentdfe85ae0c2c542178657a0a610ecea9f7cd1cea6 (diff)
downloadnextcloud-server-9e450d727a2374c218cdd62c1c97b5ad7ebf48a8.tar.gz
nextcloud-server-9e450d727a2374c218cdd62c1c97b5ad7ebf48a8.zip
add LEAST and GREATER to db function builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/DB/QueryBuilder/IFunctionBuilder.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/public/DB/QueryBuilder/IFunctionBuilder.php b/lib/public/DB/QueryBuilder/IFunctionBuilder.php
index 861a576914a..d82d3ada8cf 100644
--- a/lib/public/DB/QueryBuilder/IFunctionBuilder.php
+++ b/lib/public/DB/QueryBuilder/IFunctionBuilder.php
@@ -109,6 +109,8 @@ interface IFunctionBuilder {
/**
* Takes the maximum of all rows in a column
*
+ * If you want to get the maximum value of multiple columns in the same row, use `greatest` instead
+ *
* @param mixed $field the column to maximum
*
* @return IQueryFunction
@@ -119,10 +121,38 @@ interface IFunctionBuilder {
/**
* Takes the minimum of all rows in a column
*
+ * If you want to get the minimum value of multiple columns in the same row, use `least` instead
+ *
* @param mixed $field the column to minimum
*
* @return IQueryFunction
* @since 18.0.0
*/
public function min($field);
+
+ /**
+ * Takes the maximum of multiple values
+ *
+ * If you want to get the maximum value of all rows in a column, use `max` instead
+ *
+ * @param mixed $x the first input field or number
+ * @param mixed $y the first input field or number
+ *
+ * @return IQueryFunction
+ * @since 18.0.0
+ */
+ public function greatest($x, $y);
+
+ /**
+ * Takes the minimum of multiple values
+ *
+ * If you want to get the minimum value of all rows in a column, use `min` instead
+ *
+ * @param mixed $x the first input field or number
+ * @param mixed $y the first input field or number
+ *
+ * @return IQueryFunction
+ * @since 18.0.0
+ */
+ public function least($x, $y);
}