W3cubDocs

/RethinkDB Python

ReQL command: >=, ge

Command syntax

value.ge(value[, value, ...]) → bool
value >= value → bool

Description

Compare values, testing if the left-hand value is greater or equal to than the right-hand.

Example: Test if a player has scored 10 points or more.

r.table('players').get(1)['score'].ge(10).run(conn)
# alternative syntax
(r.table('players').get(1)['score'] >= 10).run(conn)

Example: Test if variables are ordered from lowest to highest.

a = 10
b = 20
c = 15
r.ge(a, b, c).run(conn)

This is the equivalent of the following:

py` r.ge(a, b).and(r.ge(b, c)).run(conn)

Related commands

Get more help

Couldn't find what you were looking for?

© RethinkDB contributors
Licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
https://rethinkdb.com/api/python/ge/