I'm trying to get "Prepared Statement Example" working ( http://sailsjs.org/documentation/reference/waterline-orm/models/query ) but I only get "Error: ER_EMPTY_QUERY: Query was empty"
Here's what I have tried:
day: function(req, res, next) {
Lampo1.query({
text: 'SELECT id FROM lampo WHERE node = $1',
values: [ "node1" ]
}, function(err, lampo1) {
if (err) return res.serverError(err);
return res.json(lampo1);
});
},
So I try to make query and add values as parameter, but seems like it won't generate the query at all. Basic example query from the link above works.