javascript - massive-js limit columns from result -
the following code returns id, title , content fields. need id , title.
db.laws.search({columns: ["title", "content"], term: req.params.text}, function(err,laws){ res.contenttype('application/json'); res.send(json.stringify(laws)); });
i need , equivalent of "select id, title laws where...". can not find in docs.
i avoid loop filter out unwanted columns, less efficient.
as can see in massive.js code, have not option remove id
result row in search
method. advice use inline sql
Comments
Post a Comment