neo4jphp icon indicating copy to clipboard operation
neo4jphp copied to clipboard

When query returns a collect() column, represent it as something easily convertable to array

Open rulatir opened this issue 9 years ago • 2 comments

When a query returns a collect() column, the collection is (surprisingly!) returned as an instance of Everyman\Neo4j\Query\Row. This class seems neither convertible to an array without running a loop over it, nor does it work with functions like array_slice(). This complicates writing views.

Please add a toArray() method to Row.

rulatir avatar Dec 21 '15 20:12 rulatir

+1

marwanzak avatar Jul 13 '16 21:07 marwanzak

I think it's returned as an Iterator so I've managed to turn it into an array using iterator_to_array without foreach

nebkam avatar Feb 21 '17 08:02 nebkam