vendredi 20 février 2015

How to call a mongodb function using monk/node.js?


Tyring to implement this:


http://ift.tt/XCnTjC


to provide sequence counters for a few things.


I've got the function stored in my db, but I can't call it without an error:


var model_id = db.eval('getNextSequence("model")');


Returns:


Object # has no method 'getNextSequence'


Is this because monk doesn't support the use of db functions via eval?





Aucun commentaire:

Enregistrer un commentaire