Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dependencies and Fix Pending Request Handling #2

Merged
merged 2 commits into from Apr 7, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions index.js
Expand Up @@ -40,8 +40,11 @@ exports.open = function(a, b, c) {
collectionWrapper.connection = collection;
pendingRequests = collectionWrapper.pendingRequests;
COLLECTION[collection.collectionName] = collection;
for (i = 0; request = pendingRequests[i]; i++)
collection[request.method].apply(collection, request.arguments);
if (pendingRequests) {
pendingRequests.forEach(function (request) {
collection[request.method].apply(collection, request.arguments);
});
}
}
}

Expand Down Expand Up @@ -150,4 +153,4 @@ mongo.Collection.prototype.findAll = function() {
}

//==============================================================================
init();
init();
10 changes: 5 additions & 5 deletions package.json
@@ -1,15 +1,15 @@
{
"name": "mongo-lazy",
"description": "Node-mongodb-native for lazy people. Don't ever open a collection again. Eat a piece of cake while doing parallel queries.",
"version": "0.0.2",
"version": "0.0.3",
"author": "Jie Meng-Gerard <contact@jie.fr>",
"repository": "git://github.com/jiem/mongo-lazy",
"keywords": ["mongo", "mongodb", "mongodb-native", "db"],
"main": "./index.js",
"main": "index.js",
"engines": {
"node": ">=0.7.0"
"node": "~0.10.0"
},
"dependencies": {
"mongodb": "1.0.x"
"mongodb": "~1.2.0"
}
}
}