Closed qharlie closed 13 years ago
It's not yet implemented.
Added in b0d6b9d820a23759dae7, but not tested.
Please add some unit tests!
Ok, will add some unit tests now :).
There is a an error in line 170 of lib/db.js:
Should be change to : this.queryCommand(command, callback)
I'm also unsure how to pass arguments.
If I pass them as a list like the mongodb native driver does it, like this
db.eval( function ( x, y ) { return x; } , [ 2, 3 ] , function ( err, value) { console.log(value); });
I get , { retval: [ 2, 3 ], ok: 1 }, so X is actually a list of [2,3 ].
If I pass them like this,
db.eval( function ( x, y ) { return x; } , 2, 3 , function ( err, value) { console.log(err); });
which is what the mongolian code looks like it expects, I get: { stack: [Getter/Setter], arguments: undefined, type: undefined, message: 'Server Error: { \'$err\': \'BSONElement: bad type 49\', code: 10320 }', result: { '$err': 'BSONElement: bad type 49', code: 10320 } } 30 Apr 01:05:55 - [Log] - { '0': [] }
How should I be passing parameters ? After this is fixed I'll add some vows.
Your second example is right. But I had forgotten that manipulating arguments changes the values in the arguments array. I committed a fix for that error and some super simple tests based on your examples.
I need to execute some server side functions, how can I do this ?