Querydsl: Round(x) Function

Created on 18 Jul 2013  ·  4Comments  ·  Source: querydsl/querydsl

I saw there is a round() function that return the closest int from the numeric variable.
But there is no round(x) function that would return the numeric value with x decimal.

For example:

select round(192.4525, 2) -> 192.46
select round(2.3246, 2) -> 2.32 

Some doc here:
http://www.postgresql.org/docs/9.1/static/functions-math.html

Most helpful comment

Added to MathExpressions

All 4 comments

How well is this supported in other SQL dialects?

Added to MathExpressions

Released in 3.2.2

Was this page helpful?
0 / 5 - 0 ratings