guileen/node-mongoskin — Issue #16: search by function ?
Author: Dededede4
Created: 2011-11-13 10:55:01+00:00
State: open

Hello,
in the terminal mongo this works:

var f = function(){return (this.root.address.test('testRegex') && this.root.name === 'MyName')};
db.my.find(f);

I can not do it on node.js:
var f = function(){return (this.root.address.test('testRegex') && this.root.name === 'MyName')};
db.my.find(f).toArray(feedback); //Cannot call method 'toArray' of undefined

but :
db.my.find().toArray(feedback); // work

an idea?
thank you !