ge

ReQL command: ge

Command syntax

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

Description

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

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

r.table('players').get(1)('score').ge(10).run(conn, callback);

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

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

This is the equivalent of the following:

r.ge(a, b).and(r.ge(b, c)).run(conn, callback);

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/javascript/ge/

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部