Add
Add( value_1, value_2, ... )
Add( value_1, value_2, ... )
Add( value_1, value_2, ... )
Add( value_1, value_2, ... )
add( value_1, value_2, ... )
Add( value_1, value_2, ... )
Description
The Add
function returns the sum of its numeric arguments. It can take
a single value or a list of values. Providing a single number returns
the number.
Examples
The query below returns the sum of 100 and 10.
client.Query(
Add(100, 10)
);
LongV(110)
result, err := client.Query(
f.Add(100, 10))
if err != nil {
fmt.Fprintln(os.Stderr, err)
} else {
fmt.Println(result)
}
110
System.out.println(
client.query(Add(Value(100), Value(10)))
.get());
110
client.query(
q.Add(100, 10)
)
.then((ret) => console.log(ret))
.catch((err) => console.error('Error: %s', err))
110
result = client.query(
q.add(100, 10)
)
print(result)
110
println(Await.result(
client.query(
Add(100, 10)
).recover {
case error: Any => "Error: " + error.getMessage()
}.andThen {
case _ => client.close()
},
5.seconds
))
110
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!