Skip to content

Commit

Permalink
expose bson types visible in the shell using the shell names. fixes #99
Browse files Browse the repository at this point in the history
f
  • Loading branch information
mafintosh committed Nov 20, 2013
1 parent c09b057 commit 06bbf02
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,15 @@ var connect = function(config, collections) {
};

connect.connect = connect; // backwards compat

// expose bson stuff visible in the shell
connect.ObjectId = mongodb.ObjectID;
connect.DBRef = mongodb.DBRef;
connect.Timestamp = mongodb.Timestamp;
connect.MinKey = mongodb.MinKey;
connect.MaxKey = mongodb.MaxKey;
connect.NumberLong = mongodb.Long;

connect.Cursor = Cursor;
connect.Collection = Collection;
connect.Database = Database;
Expand Down

0 comments on commit 06bbf02

Please sign in to comment.