Var
Var( name )
Var( name )
Var( name )
Var( name )
let name
Var ( name )
Examples
The query below defines two variables in a Let statement. The first variable "x" contains the value 1 and the second variable "y" contains the value 2. When the simple "in" expression is executed, it returns the value stored in the variable "x".
client.Query(
Let("x", 1, "y", 2).In(Var("x"))
);
LongV(1)
result, err := client.Query(
f.Let().Bind(
"x", 1).Bind(
"y", 2).In(
f.Var("x")))
if err != nil {
fmt.Fprintln(os.Stderr, err)
} else {
fmt.Println(result)
}
1
System.out.println(
client.query(
Let("x", Value(1), "y", Value(2)).in(Var("x"))
).get());
1
client.query(
q.Let({ x: 1, y: 2 }, q.Var('x'))
)
.then((ret) => console.log(ret))
.catch((err) => console.error('Error: %s', err))
1
result = client.query(
q.let({"x": 1, "y": 2}, q.var("x"))
)
print(result)
1
client.query(
Let(Seq("x" -> 1, "y" -> 2), Var("x"))
)
1
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!