Subject: | if group() exists, I can't find the docs on it. is $cmd necessary? |
If there is a group() somewhere and I just can't find it, there should
probably be a doc for it.
If $cmd is necessary, something like this (ie, an example) should be
added to tutorial or ::Database or something. It took me a while to
work out the esoteric characters involved.
my $cmd = MongoDB::Connection->new->databasename->get_collectin('$cmd');
my $sum = $cmd->group({group=>{
ns=>"collection",
'$reduce'=>'function(o,p){p.sum += o.o;}',
initial=>{sum=>0}}})->{retval}{sum}; };
If this *is* in the docs somewhere, then sorry in advance. That happens
to me a lot.
-Paul
--
If riding in an airplane is flying, then riding in a boat is swimming.
116 jumps, 48.6 minutes of freefall, 92.9 freefall miles.