Back to top

ReQL command: floor

Command syntax

r.floor(number) → number

number.floor() → number


Rounds the given value down, returning the largest integer value less than or equal to the given value (the value’s floor).

Example: Return the floor of 12.345.

> r.floor(12.345).run(conn)


The floor command can also be chained after an expression.

Example: Return the floor of -12.345.

> r.expr(-12.345).floor().run(conn)


Example: Return Iron Man’s weight, rounded down with floor.


Get more help

Couldn't find what you were looking for?