Skip to content

CALL procedure clause

Marijn van Wezel edited this page Oct 13, 2021 · 8 revisions

The CALL procedure clause accepts a procedure name, a list of arguments and a list of variables to yield.

Examples

$statement = Query::new()
	->callProcedure("apoc.json")
	->build();

$this->assertSame("CALL apoc.json()", $statement);
$name = Query::variable("name");
$signature = Query::variable("signature");

$statement = Query::new()
	->callProcedure("dbms.procedures", [], [$name, $signature])
	->build();

$this->assertSame("CALL dbms.procedures() YIELD name, signature", $statement);
$username = Query::literal("example_username");
$password = Query::literal("example_password");

$statement = Query::new()
	->callProcedure("dbms.security.createUser", [$username, $password, Query::literal(false)])
	->build();

$this->assertSame("CALL dbms.security.createUser('example_username', 'example_password', false)", $statement);
Clone this wiki locally