I want to make this query parametrized
var query = ["Match
(name:Name)-[r:IN_CLASS]->(class:Class)-[r1:HAS_STUDENTS]->(s:Student)
where id(s)=",rollno," and lower(s.Name)=~'.*",name,".*' RETURN
id(s),s.Name limit 5"].join('');
I have tried this code but it is giving error :
var query = ["Match
(name:Name)-[r:IN_CLASS]->(class:Class)-[r1:HAS_STUDENTS]->(s:Student)
where id(s)=",rollno," and lower(s.Name)=~'.*{name}.*' RETURN id(s),s.Name
limit 5"].join('');
db.query(query , {name : name} , function(err,results){
if (err) return callback(err);
if(results){
return callback(null,results);
}
else{
return callback(null,false);
}
});
Please tell me where I am wrong?
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.