mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 01:21:03 +01:00
Reflow internal js function MINOR
Signed-off-by: Eliot <eliot@10gen.com>
This commit is contained in:
parent
4a8c39140b
commit
e5a3d001a6
@ -1216,11 +1216,18 @@ namespace mongo {
|
||||
|
||||
s->exec( "$reduce = " + reduceCode , "reduce setup" , false , true , true , 100 );
|
||||
s->exec( "$arr = [];" , "reduce setup 2" , false , true , true , 100 );
|
||||
ScriptingFunction f = s->createFunction( "function(){ "
|
||||
" if ( $arr[n] == null ){ next = {}; Object.extend( next , $key ); Object.extend( next , $initial ); $arr[n] = next; next = null; }"
|
||||
" $reduce( obj , $arr[n] ); "
|
||||
"}" );
|
||||
|
||||
ScriptingFunction f = s->createFunction(
|
||||
"function(){ "
|
||||
" if ( $arr[n] == null ){ "
|
||||
" next = {}; "
|
||||
" Object.extend( next , $key ); "
|
||||
" Object.extend( next , $initial ); "
|
||||
" $arr[n] = next; "
|
||||
" next = null; "
|
||||
" } "
|
||||
" $reduce( obj , $arr[n] ); "
|
||||
"}" );
|
||||
|
||||
ScriptingFunction keyFunction = 0;
|
||||
if ( keyFunctionCode.size() ){
|
||||
keyFunction = s->createFunction( keyFunctionCode.c_str() );
|
||||
|
Loading…
Reference in New Issue
Block a user