Closed GotEmB closed 12 years ago
var collection = db.collection;
var cursor = collection.find.sync(collection);
var count = cursor.count.sync(cursor);
var cursor = collection.find.sync(collection);
Where would my query go?
var cursor = collection.find.sync(collection, {your : 'query'}, {title : 1, content : 1});
Hey! Got it working by supplying the this to the .sync()
function as you suggested.
I have a doubt now. In the model that I've adopted (GotEmB/DeCon/web.js), are the requests non-blocking? i.e. Do they run in separate fibers?
I get errors like
when trying to use something like
db.collection.find(...).count.sync(null)
.Source @ GotEmB/Decon/web.js. Here, lines 48, 72, 73 & 95 don't work.