FQL v4 will be decommissioned on June 30, 2025. Ensure that you complete your migration from FQL v4 to FQL v10 by that date.

Fauna accounts created after August 21, 2024 must use FQL v10. These accounts will not be able to run FQL v4 queries or access the v4 Dashboard.

For more details, see the v4 EOL announcement and migration guide. Contact support@fauna.com with any questions.

Multiply

This reference topic applies to FQL v4. Go to this page for the latest FQL v10 reference topics.

Multiply( value_1, value_2, ... )
multiply( value_1, value_2, ... )
Multiply( value_1, value_2, ... )
Multiply( value_1, value_2, ... )
Multiply( value_1, value_2, ... )
Multiply( value_1, value_2, ... )

Description

The Multiply function computes the product of a list of numbers. Providing a single number returns the number.

Attempting to call Multiply without any arguments results in the error "Non-empty array expected."

Parameters

Parameter Type Definition and Requirements

value

List of Numbers

A single Value or a list of Values.

Returns

A Number which is the product of the list of values.

Examples

client.query(
  q.Multiply(100, 10)
)
.then((ret) => console.log(ret))
.catch((err) => console.error(
  'Error: [%s] %s: %s',
  err.name,
  err.message,
  err.errors()[0].description,
))
1000
result = client.query(
  q.multiply(100, 10)
)
print(result)
1000
result, err := client.Query(
	f.Multiply(100, 10))

if err != nil {
	fmt.Fprintln(os.Stderr, err)
} else {
	fmt.Println(result)
}
1000
try
{
    Value result = await client.Query(
        Multiply(100, 10)
    );
    Console.WriteLine(result);
}
catch (Exception e)
{
    Console.WriteLine($"ERROR: {e.Message}");
}
LongV(1000)
System.out.println(
    client.query(
        Multiply(Value(100), Value(10))
    ).get());
1000
Multiply(100, 10)
1000
Query metrics:
  •    bytesIn:  21

  •   bytesOut:  17

  • computeOps:   1

  •    readOps:   0

  •   writeOps:   0

  •  readBytes:   0

  • writeBytes:   0

  •  queryTime: 1ms

  •    retries:   0

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!