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.

Space

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

Space( count )
space( count )
Space( count )
Space( count )
Space( count )
Space( count )

Description

The Space function returns a string of the specified number of spaces.

Parameters

Parameter Type Definition and Requirements

count

Integer

The Number of spaces to be returned.

Returns

A String which has the specified number of spaces.

Examples

The following query executes an array of independent Space operations and returns the results in an array. The result array position matches the execution array position. The first operation takes the count of 1 and returns a string with a single space, placing it in the top position of the result array. The second operation calls Space with a count of 20 and returns a string of 20 spaces, placing it in the second position of the result array:

client.query(
  [
    q.Space(1),
    q.Space(20),
  ]
)
.then((ret) => console.log(ret))
.catch((err) => console.error(
  'Error: [%s] %s: %s',
  err.name,
  err.message,
  err.errors()[0].description,
))
[ ' ', '                    ' ]
result = client.query(
  [
    q.space(1),
    q.space(20),
  ]
)
print(result)
[' ', '                    ']
result, err := client.Query(
	f.Arr{
		f.Space(1),
		f.Space(20),
	})

if err != nil {
	fmt.Fprintln(os.Stderr, err)
} else {
	fmt.Println(result)
}
[                      ]
try
{
    Value result = await client.Query(
        Arr(
            Space(1),
            Space(20)
        )
    );

    Console.WriteLine(result);
}
catch (Exception e)
{
    Console.WriteLine($"ERROR: {e.Message}");
}
Arr(StringV( ), StringV(                    ))
System.out.println(
    client.query(
        Arr(
            Space(1),
            Space(20)
        )
    ).get());
[" ", "                    "]
[
  Space(1),
  Space(20),
]
[ ' ', '                    ' ]
Query metrics:
  •    bytesIn:  26

  •   bytesOut:  41

  • computeOps:   1

  •    readOps:   0

  •   writeOps:   0

  •  readBytes:   0

  • writeBytes:   0

  •  queryTime: 5ms

  •    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!