diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-04-12 12:55:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-12 12:55:09 -0500 |
commit | 124fdf8062139d5f1877e5fa9d0ce1969aa51e93 (patch) | |
tree | 2f937827859fbeb2869e358f173fb9c6e3242e72 /lib/public | |
parent | 31024b7700e025c78c1da94ab77564adeca54dee (diff) | |
parent | ac45af68cd7d30bb202e6b39ecf5bfcfd4b00225 (diff) | |
download | nextcloud-server-124fdf8062139d5f1877e5fa9d0ce1969aa51e93.tar.gz nextcloud-server-124fdf8062139d5f1877e5fa9d0ce1969aa51e93.zip |
Merge pull request #4331 from nextcloud/query-builder-sum
Add sum() to the query function builder
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/DB/QueryBuilder/IFunctionBuilder.php | 10 |
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); } |