neo4j-core
neo4j-core copied to clipboard
.set(...) with a string parameter
I noticed that it's possible to do:
query.where('q.name = ?', 'something')
But not:
query.set('q.name = ?', 'something')
It could be useful in this case:
query.set('q.score = COALESCE(q.score, 0) * ?', 5)
Yeah, I could definitely see that. For now if you want to protect against injection you can use params:
query.set('q.score = COALESCE(q.score, 0) * {score_multiplier}').params(score_multiplier: 5}
More awkward, I know
Uhm, at least you should improve the documentation for it, I think!
But it does the trick, thanks!