Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2019-11-06 13:38:47 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2019-11-26 14:05:30 +0300
commit9e450d727a2374c218cdd62c1c97b5ad7ebf48a8 (patch)
tree1695f4521a05b66efc17f360d32696a0c8037a20 /lib/public/DB
parentdfe85ae0c2c542178657a0a610ecea9f7cd1cea6 (diff)
add LEAST and GREATER to db function builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/public/DB')
-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);
}