ReQL command reference - RethinkDB
Command syntax
bool.and([bool, bool, ...]) β bool
r.and([bool, bool, ...]) β bool
Description
Compute the logical βandβ of one or more values.
The and command can be used as an infix operator after its first argument (r.expr(true).and(false)) or given all of its arguments as parameters (r.and(true,false)).
Calling and with zero arguments will return true.
Example: Return whether both a and b evaluate to true.
boolean a = true;
boolean b = false;
r.expr(a).and(b).run(conn);
// Result:
false
Example: Return whether all of x, y and z evaluate to true.
boolean x = true;
boolean y = true;
boolean z = true;
r.and(x, y, z).run(conn);
// Result:
true