node.js - nodejs mongodb executeDbcommand error -


i trying run text search query on mongodb using executedbcommand method. however, "object has no method executedbcommand" error. here code:

var db  = require('mongodb').db;  db.connect("mongodb://localhost:27017/test",function(error,client){   client.executedbcommand({text: 'data', search:{'date': { '$gt' : last },"post": rgxp} },      function(e,o){  if(e) { console.log('error:') ; console.log(e); }  else  console.log(o); 

you misspelled executedbcommand (capital c).


Comments