Or

Or(value_1, value_2, ...)
Or(value_1, value_2, ...)
Or(value_1, value_2, ...)
Or(value_1, value_2, ... )
or_expr(value_1, value_2, ...)
or_ value_1, value_2, ...
Or(value_1, value_2, ... )
Or(value_1, value_2, ...)

Description

The Or function operates on one or more values and returns true if at least one of the values is “true”.

Parameters

Argument Type Definition and Requirements

value

Any

A value to be compared.

Returns

A boolean value.

Examples

The query below returns true because at least one of the provided values is "true".

curl https://db.fauna.com/ \
    -u fnAChGwBcAACAO70ziE0cfROosNJHdgBmJU1PgpL: \
    -d '{ "or": [ true, true, false ] }'
client.Query(Or(true, true, false));
System.out.println(
        client.query(Or(Value(true), Value(true), Value(false)))
        .get());
result, _ := client.Query(f.Or(true, true, false))

fmt.Println(result)
client.query(Or(true, true, false))
client.query(q.or_expr(True, True, False))
$client.query do
  or_ true, true, false
end
client.query(Or(true, true, false))
client.query(q.Or(true, true, false))
.then((ret) => console.log(ret))
HTTP/1.1 200 OK
{ "resource": true }
true
true
true
true
true
true
true
true

Was this article helpful?

We're sorry to hear that.
Tell us how we can improve! documentation@fauna.com

Thank you for your feedback!