| layout | api-command | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| language | Java | ||||||||||
| permalink | api/java/gt/ | ||||||||||
| command | gt | ||||||||||
| related_commands |
|
Command syntax
{% apibody %} value.gt(value[, value, ...]) → bool {% endapibody %}
Description
Compare values, testing if the left-hand value is greater than the right-hand.
Example: Test if a player has scored more than 10 points.
r.table("players").get(1).g("score").gt(10).run(conn);
Example: Test if variables are ordered from lowest to highest, with no values being equal to one another.
int a = 10; int b = 20; int c = 15; r.gt(a, b, c).run(conn);
This is the equivalent of the following:
r.gt(a, b).and(r.gt(b, c)).run(conn);