Is there an underlying function in the Java – mongodb aggregation framework?
•
Java
I tried to do some integer math in mongodb and encountered some problems Is there any way to round up or down doubles in Mongo DB aggregation framework?
Solution
According to stennie's comments, floor and ceiling methods are not supported
According to my comments above, the best solution I can find is to perform an operation that looks like this: (Num mod (Num, 1)), which should produce the same result as the floor function
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码