cypher-stream
Neo4j cypher queries as node object streams.
The majority of magic happens in the deserializer, which can be found here:
https://github.com/brian-gates/neo4j-stream-deserializer
Installation
npm install cypher-stream
Basic usage
var cypher = require('cypher-stream')('http://localhost:7474');
cypher('match (user:User) return user')
.on('data', function (result){
console.log(result.user.first_name);
})
.on('end', function() {
console.log('all done');
})
;
Handling errors
var cypher = require('cypher-stream')('http://localhost:7474');
cypher('invalid query')
.on('data', function (data){
console.log(data);
})
.on('error', function (error) {
console.log(error.statusCode);
})
.on('end', function() {
console.log('all done');
})
;
});