0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00
mongodb/jstests/distinct2.js
2009-10-27 12:56:59 -04:00

14 lines
231 B
JavaScript

t = db.distinct2;
t.drop();
t.save({a:null});
assert.eq( 0 , t.distinct('a.b').length , "A" );
t.drop();
t.save( { a : 1 } );
assert.eq( [1] , t.distinct( "a" ) , "B" );
t.save( {} )
assert.eq( [1] , t.distinct( "a" ) , "C" );