Skip to content

Instantly share code, notes, and snippets.

@ikwattro
Created July 26, 2015 10:13
Show Gist options
  • Select an option

  • Save ikwattro/25fc0af3d837ec6410de to your computer and use it in GitHub Desktop.

Select an option

Save ikwattro/25fc0af3d837ec6410de to your computer and use it in GitHub Desktop.
issue stefan
$q = 'MATCH (n:Person) OPTIONAL MATCH (n)-[r]->(m) RETURN DISTINCT n,COLLECT(r),m';
$result = $client->sendCypherQuery($q)->getResult();
print_r($result->getTableFormat());
Array
(
[0] => Array
(
[n] => Array
(
[firstname] => Rhoda
[lastname] => Feeney
)
[COLLECT(r)] => Array
(
)
[m] =>
)
[1] => Array
(
[n] => Array
(
[firstname] => Eden
[lastname] => Shanahan
)
[COLLECT(r)] => Array
(
[0] => Array
(
)
)
[m] => Array
(
[name] => CFML
)
)
[2] => Array
(
[n] => Array
(
[firstname] => Manley
[lastname] => Reynolds
)
[COLLECT(r)] => Array
(
[0] => Array
(
)
)
[m] => Array
(
[name] => Escher
)
)
[3] => Array
(
[n] => Array
(
[firstname] => Everett
[lastname] => Hessel
)
[COLLECT(r)] => Array
(
)
[m] =>
)
[4] => Array
(
[n] => Array
(
[firstname] => Hadley
[lastname] => Ankunding
)
[COLLECT(r)] => Array
(
)
[m] =>
)
[5] => Array
(
[n] => Array
(
[firstname] => Stan
[lastname] => Miller
)
[COLLECT(r)] => Array
(
)
[m] =>
)
[6] => Array
(
[n] => Array
(
[firstname] => Viviane
[lastname] => Carroll
)
[COLLECT(r)] => Array
(
)
[m] =>
)
[7] => Array
(
[n] => Array
(
[firstname] => Manley
[lastname] => Reynolds
)
[COLLECT(r)] => Array
(
[0] => Array
(
)
)
[m] => Array
(
[name] => Elm
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment