javascript - Equivalent of SELECT * in NEDB node.js -
i new on nedb
using node.js
wondering how display records or select * tablename
know nedb different mysql need embed database inside electron application, need know if nedb capable of db queries mysql can do.
the code below able me find single records want display records.
var datastrore = require('nedb'); var db = new datastrore({filename: 'guitars.db'}); db.loaddatabase(function(err){ db.find({year : 1990}, function (err,docs){ console.log(docs); }); });
just use
db.loaddatabase(function(err){ db.find({}, function (err,docs){ console.log(docs);//all docs }); });
Comments
Post a Comment