node.js and neo4j using cypher-stream

59 views
Skip to first unread message

Dagmawi Moges

unread,
Dec 18, 2014, 6:33:04 AM12/18/14
to node-...@googlegroups.com
function recordMedication(){
data = {};
cypher('match(pd:PillDispenser{Serialno:"123456789"}) return pd.Serialno, pd.Slotnumber')
.on('data', function(result){
data =  result;
console.log(data);// this works fine, but the result will not be returned
}).on('end', function(){
console.log('all done');
});
return data; // no data
}


why is the global variable data not being affected on the callback function please help? you can find cypher-stream @ https://github.com/brian-gates/cypher-stream
Reply all
Reply to author
Forward
0 new messages