Skip to content

Commit

Permalink
example of ObjectID.generationTime
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Heckmann committed May 17, 2010
1 parent 688f052 commit 7a7b1de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/simple.js
Expand Up @@ -25,7 +25,10 @@ db.open(function(err, db) {

collection.find(function(err, cursor) {
cursor.each(function(err, item) {
if(item != null) sys.puts(sys.inspect(item));
if(item != null) {
sys.puts(sys.inspect(item));
sys.puts("created at " + new Date(item._id.generationTime) + "\n")
}
// Null signifies end of iterator
if(item == null) {
// Destory the collection
Expand Down

0 comments on commit 7a7b1de

Please sign in to comment.