==

ReQL command: ==, eq

Command syntax

value.eq(value[, value, ...]) → bool
value == value → bool

Description

Test if two or more values are equal.

Example: See if a user’s role field is set to administrator.

r.table('users').get(1)['role'].eq('administrator').run(conn)
# alternative syntax
(r.table('users').get(1)['role'] == 'administrator').run(conn)

Example: See if three variables contain equal values.

r.eq(a, 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/eq/

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部