IsSet
IsSet( value )
Description
The IsSet
function returns true
only if value
is a
Set, otherwise it returns false
.
Examples
The following query uses Map
to iterate over an array of all of
the types of values that can be tested by a type-check function, passing
each item into a Lambda
function that returns an object, which
contains the value and the result of calling IsSet
with that
value:
[
{ value: [ 'array' ], IsSet: false },
{ value: true, IsSet: false },
{ value: false, IsSet: false },
{ value: Bytes("AQIDBA=="), IsSet: false },
{ value: [ 1, 2, 3, 4 ], IsSet: false },
{ value: Collection("Letters"), IsSet: false },
{ value: Ref(Credentials(), "268435422873387520"), IsSet: false },
{ value: Database("child_db"), IsSet: false },
{ value: Date("2019-11-12"), IsSet: false },
{ value: Ref(Collection("Letters"), "123"), IsSet: false },
{ value: 10.1, IsSet: false },
{ value: Function("double"), IsSet: false },
{ value: Index("letters"), IsSet: false },
{ value: 10, IsSet: false },
{ value: Ref(Keys(), "1"), IsSet: false },
{ value: Query(Lambda("x", Var("x"))), IsSet: false },
{ value: null, IsSet: false },
{ value: { x: 10 }, IsSet: false },
{ value: Role("employees"), IsSet: false },
{ value: Match(Index("letters")), IsSet: true },
{ value: 'ten', IsSet: false },
{ value: '10', IsSet: false },
{ value: Time("2020-06-15T22:06:59.634Z"), IsSet: false },
{ value: Ref(Tokens(), "1"), IsSet: false }
]
This query operates on a pre-existing schema, which is not provided here. Also, the query is executed via a client connection, that uses a secret
acquired by calling the |
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!