diff options
author | Robin Appelman <robin@icewind.nl> | 2022-04-28 15:16:07 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2022-06-02 15:52:12 +0200 |
commit | 2a68819a67045d87a369a8a6413f153b3b2bea5f (patch) | |
tree | 13978f741bb54c603b9085318612c9ea021aaa6c /lib/public | |
parent | 813b50ed428a8bc36817d19c84444e96dbe3b668 (diff) | |
download | nextcloud-server-2a68819a67045d87a369a8a6413f153b3b2bea5f.tar.gz nextcloud-server-2a68819a67045d87a369a8a6413f153b3b2bea5f.zip |
add case statement to sql function builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/DB/QueryBuilder/IFunctionBuilder.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/public/DB/QueryBuilder/IFunctionBuilder.php b/lib/public/DB/QueryBuilder/IFunctionBuilder.php index d4edc8ea9f8..811e8d06aaf 100644 --- a/lib/public/DB/QueryBuilder/IFunctionBuilder.php +++ b/lib/public/DB/QueryBuilder/IFunctionBuilder.php @@ -188,4 +188,16 @@ interface IFunctionBuilder { * @since 18.0.0 */ public function least($x, $y): IQueryFunction; + + /** + * Takes the minimum of multiple values + * + * If you want to get the minimum value of all rows in a column, use `min` instead + * + * @param array<array{"when": string|ILiteral|IParameter|IQueryFunction, "then": string|ILiteral|IParameter|IQueryFunction}> $whens + * @param string|ILiteral|IParameter|IQueryFunction $else + * @return IQueryFunction + * @since 18.0.0 + */ + public function case(array $whens, $else): IQueryFunction; } |