-
Notifications
You must be signed in to change notification settings - Fork 5
LIMIT clause
Marijn van Wezel edited this page Dec 13, 2022
·
4 revisions
The LIMIT clause constrains the number of returned rows. It accepts an integer representing the maximum number of records in the output.
Query::limit(int|IntegerType $limit): Query-
$limit: The amount to use as the limit.
-
setLimit(int|IntegerType $limit): self: Sets the limit.
$persons = node('Person');
$query = query()
->match($persons)
->returning($persons->property('name'))
->limit(3)
->build();
$this->assertStringMatchesFormat("MATCH (%s:Person) RETURN %s.name LIMIT 3", $query);