-
Notifications
You must be signed in to change notification settings - Fork 5
ORDER BY clause
Marijn van Wezel edited this page Oct 13, 2021
·
2 revisions
The ORDER BY
clause accepts a list of properties to order on, and optionally whether to sort in descending order.
$n = Query::variable("n");
$name = $n->property("name");
$age = $n->property("age");
$statement = Query::new()
->orderBy([$name, $age], true)
->build();
$this->assertSame("ORDER BY n.name, n.age DESCENDING", $statement);