@@ -261,78 +261,88 @@ var Connection = require('./connection').Connection, | ||
| var startDate = new Date().getTime(); | ||
| // Attempt to locate a callback instance | ||
| // Callback instance | ||
| var callbackInfo = null; | ||
| var dbInstanceObject = null; | ||
| // Locate a callback instance and remove any additional ones | ||
| for(var i = 0; i < server.dbInstances.length; i++) { | ||
| var dbInstanceObject = server.dbInstances[i]; | ||
| // Locate the callback info | ||
| var callbackInfo = dbInstanceObject._findHandler(mongoReply.responseTo.toString()); | ||
| // Only execute callback if we have a caller | ||
| if(callbackInfo.callback && Array.isArray(callbackInfo.info.chained)) { | ||
| // Check if callback has already been fired (missing chain command) | ||
| var chained = callbackInfo.info.chained; | ||
| var numberOfFoundCallbacks = 0; | ||
| var dbInstanceObjectTemp = server.dbInstances[i]; | ||
| var hasHandler = dbInstanceObjectTemp._hasHandler(mongoReply.responseTo.toString()); | ||
| // Assign the first one we find and remove any duplicate ones | ||
| if(hasHandler && callbackInfo == null) { | ||
| callbackInfo = dbInstanceObjectTemp._findHandler(mongoReply.responseTo.toString()); | ||
| dbInstanceObject = dbInstanceObjectTemp; | ||
| } else if(hasHandler) { | ||
| dbInstanceObjectTemp._removeHandler(mongoReply.responseTo.toString()); | ||
| } | ||
| } | ||
| // Only execute callback if we have a caller | ||
| if(callbackInfo.callback && Array.isArray(callbackInfo.info.chained)) { | ||
| // Check if callback has already been fired (missing chain command) | ||
| var chained = callbackInfo.info.chained; | ||
| var numberOfFoundCallbacks = 0; | ||
| for(var i = 0; i < chained.length; i++) { | ||
| if(dbInstanceObject._hasHandler(chained[i])) numberOfFoundCallbacks++; | ||
| } | ||
| // If we have already fired then clean up rest of chain and move on | ||
| if(numberOfFoundCallbacks != chained.length) { | ||
| for(var i = 0; i < chained.length; i++) { | ||
| if(dbInstanceObject._hasHandler(chained[i])) numberOfFoundCallbacks++; | ||
| dbInstanceObject._removeHandler(chained[i]); | ||
| } | ||
| // If we have already fired then clean up rest of chain and move on | ||
| if(numberOfFoundCallbacks != chained.length) { | ||
| for(var i = 0; i < chained.length; i++) { | ||
| dbInstanceObject._removeHandler(chained[i]); | ||
| // Just return from function | ||
| return; | ||
| } | ||
| // Parse the body | ||
| mongoReply.parseBody(message, connectionPool.bson, callbackInfo.info.raw, function(err) { | ||
| var callbackInfo = dbInstanceObject._findHandler(mongoReply.responseTo.toString()); | ||
| // If we have an error let's execute the callback and clean up all other | ||
| // chained commands | ||
| var firstResult = mongoReply && mongoReply.documents; | ||
| // Check for an error, if we have one let's trigger the callback and clean up | ||
| // The chained callbacks | ||
| if(firstResult[0].err != null || firstResult[0].errmsg != null) { | ||
| // Trigger the callback for the error | ||
| dbInstanceObject._callHandler(mongoReply.responseTo, mongoReply, null); | ||
| } else { | ||
| var chainedIds = callbackInfo.info.chained; | ||
| if(chainedIds.length > 0 && chainedIds[chainedIds.length - 1] == mongoReply.responseTo) { | ||
| // Cleanup all other chained calls | ||
| chainedIds.pop(); | ||
| // Remove listeners | ||
| for(var i = 0; i < chainedIds.length; i++) dbInstanceObject._removeHandler(chainedIds[i]); | ||
| // Call the handler | ||
| dbInstanceObject._callHandler(mongoReply.responseTo, callbackInfo.info.results.shift(), null); | ||
| } else{ | ||
| // Add the results to all the results | ||
| for(var i = 0; i < chainedIds.length; i++) { | ||
| var handler = dbInstanceObject._findHandler(chainedIds[i]); | ||
| // Check if we have an object, if it's the case take the current object commands and | ||
| // and add this one | ||
| if(handler.info != null) { | ||
| handler.info.results = Array.isArray(callbackInfo.info.results) ? callbackInfo.info.results : []; | ||
| handler.info.results.push(mongoReply); | ||
| } | ||
| } | ||
| } | ||
| // Just return from function | ||
| return; | ||
| } | ||
| // Parse the body | ||
| mongoReply.parseBody(message, connectionPool.bson, callbackInfo.info.raw, function(err) { | ||
| var callbackInfo = dbInstanceObject._findHandler(mongoReply.responseTo.toString()); | ||
| // If we have an error let's execute the callback and clean up all other | ||
| // chained commands | ||
| var firstResult = mongoReply && mongoReply.documents; | ||
| // Check for an error, if we have one let's trigger the callback and clean up | ||
| // The chained callbacks | ||
| if(firstResult[0].err != null || firstResult[0].errmsg != null) { | ||
| // Trigger the callback for the error | ||
| dbInstanceObject._callHandler(mongoReply.responseTo, mongoReply, null); | ||
| } else { | ||
| var chainedIds = callbackInfo.info.chained; | ||
| if(chainedIds.length > 0 && chainedIds[chainedIds.length - 1] == mongoReply.responseTo) { | ||
| // Cleanup all other chained calls | ||
| chainedIds.pop(); | ||
| // Remove listeners | ||
| for(var i = 0; i < chainedIds.length; i++) dbInstanceObject._removeHandler(chainedIds[i]); | ||
| // Call the handler | ||
| dbInstanceObject._callHandler(mongoReply.responseTo, callbackInfo.info.results.shift(), null); | ||
| } else{ | ||
| // Add the results to all the results | ||
| for(var i = 0; i < chainedIds.length; i++) { | ||
| var handler = dbInstanceObject._findHandler(chainedIds[i]); | ||
| // Check if we have an object, if it's the case take the current object commands and | ||
| // and add this one | ||
| if(handler.info != null) { | ||
| handler.info.results = Array.isArray(callbackInfo.info.results) ? callbackInfo.info.results : []; | ||
| handler.info.results.push(mongoReply); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }); | ||
| } else if(callbackInfo.callback) { | ||
| // Parse the body | ||
| mongoReply.parseBody(message, connectionPool.bson, callbackInfo.info.raw, function(err) { | ||
| // Let's record the stats info if it's enabled | ||
| if(server.recordQueryStats == true && server._state['runtimeStats'] != null | ||
| && server._state.runtimeStats['queryStats'] instanceof RunningStats) { | ||
| // Add data point to the running statistics object | ||
| server._state.runtimeStats.queryStats.push(new Date().getTime() - callbackInfo.info.start); | ||
| } | ||
| // Trigger the callback | ||
| dbInstanceObject._callHandler(mongoReply.responseTo, mongoReply, null); | ||
| }); | ||
| } | ||
| } | ||
| }); | ||
| } else if(callbackInfo.callback) { | ||
| // Parse the body | ||
| mongoReply.parseBody(message, connectionPool.bson, callbackInfo.info.raw, function(err) { | ||
| // Let's record the stats info if it's enabled | ||
| if(server.recordQueryStats == true && server._state['runtimeStats'] != null | ||
| && server._state.runtimeStats['queryStats'] instanceof RunningStats) { | ||
| // Add data point to the running statistics object | ||
| server._state.runtimeStats.queryStats.push(new Date().getTime() - callbackInfo.info.start); | ||
| } | ||
| // Trigger the callback | ||
| dbInstanceObject._callHandler(mongoReply.responseTo, mongoReply, null); | ||
| }); | ||
| } | ||
| } | ||
@@ -339,0 +349,0 @@ } catch (err) { |
@@ -275,3 +275,3 @@ /** | ||
| server.dbInstances.push(newDbInstance); | ||
| } | ||
| } | ||
| // Return new db object | ||
@@ -278,0 +278,0 @@ return newDbInstance; |
+1
-1
| { "name" : "mongodb" | ||
| , "description" : "A node.js driver for MongoDB" | ||
| , "keywords" : ["mongodb", "mongo", "driver", "db"] | ||
| , "version" : "0.9.9-3" | ||
| , "version" : "0.9.9-4" | ||
| , "author" : "Christian Amor Kvalheim <christkv@gmail.com>" | ||
@@ -6,0 +6,0 @@ , "contributors" : [ "Aaron Heckmann", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
-413
| 0.9.9.3 2012-02-23 | ||
| ------------------ | ||
| * document: save callback arguments are both undefined, (Issue #518) | ||
| * Native BSON parser install error with npm, (Issue #517) | ||
| 0.9.9.2 2012-02-17 | ||
| ------------------ | ||
| * Improved detection of Buffers using Buffer.isBuffer instead of instanceof. | ||
| * Added wrap error around db.dropDatabase to catch all errors (Issue #512) | ||
| * Added aggregate helper to collection, only for MongoDB >= 2.1 | ||
| 0.9.9.1 2012-02-15 | ||
| ------------------ | ||
| * Better handling of safe when using some commands such as createIndex, ensureIndex, addUser, removeUser, createCollection. | ||
| * Mapreduce now throws error if out parameter is not specified. | ||
| 0.9.9 2012-02-13 | ||
| ---------------- | ||
| * Added createFromTime method on ObjectID to allow for queries against _id more easily using the timestamp. | ||
| * Db.close(true) now makes connection unusable as it's been force closed by app. | ||
| * Fixed mapReduce and group functions to correctly send slaveOk on queries. | ||
| * Fixes for find method to correctly work with find(query, fields, callback) (Issue #506). | ||
| * A fix for connection error handling when using the SSL on MongoDB. | ||
| 0.9.8-7 2012-02-06 | ||
| ------------------ | ||
| * Simplified findOne to use the find command instead of the custom code (Issue #498). | ||
| * BSON JS parser not also checks for _bsonType variable in case BSON object is in weird scope (Issue #495). | ||
| 0.9.8-6 2012-02-04 | ||
| ------------------ | ||
| * Removed the check for replicaset change code as it will never work with node.js. | ||
| 0.9.8-5 2012-02-02 | ||
| ------------------ | ||
| * Added geoNear command to Collection. | ||
| * Added geoHaystackSearch command to Collection. | ||
| * Added indexes command to collection to retrieve the indexes on a Collection. | ||
| * Added stats command to collection to retrieve the statistics on a Collection. | ||
| * Added listDatabases command to admin object to allow retrieval of all available dbs. | ||
| * Changed createCreateIndexCommand to work better with options. | ||
| * Fixed dereference method on Db class to correctly dereference Db reference objects. | ||
| * Moved connect object onto Db class(Db.connect) as well as keeping backward compatibility. | ||
| * Removed writeBuffer method from gridstore, write handles switching automatically now. | ||
| * Changed readBuffer to read on Gridstore, Gridstore now only supports Binary Buffers no Strings anymore. | ||
| * Moved Long class to bson directory. | ||
| 0.9.8-4 2012-01-28 | ||
| ------------------ | ||
| * Added reIndex command to collection and db level. | ||
| * Added support for $returnKey, $maxScan, $min, $max, $showDiskLoc, $comment to cursor and find/findOne methods. | ||
| * Added dropDups and v option to createIndex and ensureIndex. | ||
| * Added isCapped method to Collection. | ||
| * Added indexExists method to Collection. | ||
| * Added findAndRemove method to Collection. | ||
| * Fixed bug for replicaset connection when no active servers in the set. | ||
| * Fixed bug for replicaset connections when errors occur during connection. | ||
| * Merged in patch for BSON Number handling from Lee Salzman, did some small fixes and added test coverage. | ||
| 0.9.8-3 2012-01-21 | ||
| ------------------ | ||
| * Workaround for issue with Object.defineProperty (Issue #484) | ||
| * ObjectID generation with date does not set rest of fields to zero (Issue #482) | ||
| 0.9.8-2 2012-01-20 | ||
| ------------------ | ||
| * Fixed a missing this in the ReplSetServers constructor. | ||
| 0.9.8-1 2012-01-17 | ||
| ------------------ | ||
| * FindAndModify bug fix for duplicate errors (Issue #481) | ||
| 0.9.8 2012-01-17 | ||
| ---------------- | ||
| * Replicasets now correctly adjusts to live changes in the replicaset configuration on the servers, reconnecting correctly. | ||
| - Set the interval for checking for changes setting the replicaSetCheckInterval property when creating the ReplSetServers instance or on db.serverConfig.replicaSetCheckInterval. (default 1000 miliseconds) | ||
| * Fixes formattedOrderClause in collection.js to accept a plain hash as a parameter (Issue #469) https://github.com/tedeh | ||
| * Removed duplicate code for formattedOrderClause and moved to utils module | ||
| * Pass in poolSize for ReplSetServers to set default poolSize for new replicaset members | ||
| * Bug fix for BSON JS deserializer. Isolating the eval functions in separate functions to avoid V8 deoptimizations | ||
| * Correct handling of illegal BSON messages during deserialization | ||
| * Fixed Infinite loop when reading GridFs file with no chunks (Issue #471) | ||
| * Correctly update existing user password when using addUser (Issue #470) | ||
| 0.9.7.3-5 2012-01-04 | ||
| -------------------- | ||
| * Fix for RegExp serialization for 0.4.X where typeof /regexp/ == 'function' vs in 0.6.X typeof /regexp/ == 'object' | ||
| * Don't allow keepAlive and setNoDelay for 0.4.X as it throws errors | ||
| 0.9.7.3-4 2012-01-04 | ||
| -------------------- | ||
| * Chased down potential memory leak on findAndModify, Issue #467 (node.js removeAllListeners leaves the key in the _events object, node.js bug on eventlistener?, leads to extremely slow memory leak on listener object) | ||
| * Sanity checks for GridFS performance with benchmark added | ||
| 0.9.7.3-3 2012-01-04 | ||
| -------------------- | ||
| * Bug fixes for performance issues going form 0.9.6.X to 0.9.7.X on linux | ||
| * BSON bug fixes for performance | ||
| 0.9.7.3-2 2012-01-02 | ||
| -------------------- | ||
| * Fixed up documentation to reflect the preferred way of instantiating bson types | ||
| * GC bug fix for JS bson parser to avoid stop-and-go GC collection | ||
| 0.9.7.3-1 2012-01-02 | ||
| -------------------- | ||
| * Fix to make db.bson_serializer and db.bson_deserializer work as it did previously | ||
| 0.9.7.3 2011-12-30 | ||
| -------------------- | ||
| * Moved BSON_BINARY_SUBTYPE_DEFAULT from BSON object to Binary object and removed the BSON_BINARY_ prefixes | ||
| * Removed Native BSON types, C++ parser uses JS types (faster due to cost of crossing the JS-C++ barrier for each call) | ||
| * Added build fix for 0.4.X branch of Node.js where GetOwnPropertyNames is not defined in v8 | ||
| * Fix for wire protocol parser for corner situation where the message is larger than the maximum socket buffer in node.js (Issue #464, #461, #447) | ||
| * Connection pool status set to connected on poolReady, isConnected returns false on anything but connected status (Issue #455) | ||
| 0.9.7.2-5 2011-12-22 | ||
| -------------------- | ||
| * Brand spanking new Streaming Cursor support Issue #458 (https://github.com/christkv/node-mongodb-native/pull/458) thanks to Mr Aaron Heckmann | ||
| 0.9.7.2-4 2011-12-21 | ||
| -------------------- | ||
| * Refactoring of callback code to work around performance regression on linux | ||
| * Fixed group function to correctly use the command mode as default | ||
| 0.9.7.2-3 2011-12-18 | ||
| -------------------- | ||
| * Fixed error handling for findAndModify while still working for mongodb 1.8.6 (Issue #450). | ||
| * Allow for force send query to primary, pass option (read:'primary') on find command. | ||
| * ``find({a:1}, {read:'primary'}).toArray(function(err, items) {});`` | ||
| 0.9.7.2-2 2011-12-16 | ||
| -------------------- | ||
| * Fixes infinite streamRecords QueryFailure fix when using Mongos (Issue #442) | ||
| 0.9.7.2-1 2011-12-16 | ||
| -------------------- | ||
| * ~10% perf improvement for ObjectId#toHexString (Issue #448, https://github.com/aheckmann) | ||
| * Only using process.nextTick on errors emitted on callbacks not on all parsing, reduces number of ticks in the driver | ||
| * Changed parsing off bson messages to use process.nextTick to do bson parsing in batches if the message is over 10K as to yield more time to the event look increasing concurrency on big mongoreply messages with multiple documents | ||
| 0.9.7.2 2011-12-15 | ||
| ------------------ | ||
| * Added SSL support for future version of mongodb (VERY VERY EXPERIMENTAL) | ||
| * pass in the ssl:true option to the server or replicaset server config to enable | ||
| * a bug either in mongodb or node.js does not allow for more than 1 connection pr db instance (poolSize:1). | ||
| * Added getTimestamp() method to objectID that returns a date object | ||
| * Added finalize function to collection.group | ||
| * function group (keys, condition, initial, reduce, finalize, command, callback) | ||
| * Reaper no longer using setTimeout to handle reaping. Triggering is done in the general flow leading to predictable behavior. | ||
| * reaperInterval, set interval for reaper (default 10000 miliseconds) | ||
| * reaperTimeout, set timeout for calls (default 30000 miliseconds) | ||
| * reaper, enable/disable reaper (default false) | ||
| * Work around for issues with findAndModify during high concurrency load, insure that the behavior is the same across the 1.8.X branch and 2.X branch of MongoDb | ||
| * Reworked multiple db's sharing same connection pool to behave correctly on error, timeout and close | ||
| * EnsureIndex command can be executed without a callback (Issue #438) | ||
| * Eval function no accepts options including nolock (Issue #432) | ||
| * eval(code, parameters, options, callback) (where options = {nolock:true}) | ||
| 0.9.7.1-4 2011-11-27 | ||
| -------------------- | ||
| * Replaced install.sh with install.js to install correctly on all supported os's | ||
| 0.9.7.1-3 2011-11-27 | ||
| -------------------- | ||
| * Fixes incorrect scope for ensureIndex error wrapping (Issue #419) https://github.com/ritch | ||
| 0.9.7.1-2 2011-11-27 | ||
| -------------------- | ||
| * Set statistical selection strategy as default for secondary choice. | ||
| 0.9.7.1-1 2011-11-27 | ||
| -------------------- | ||
| * Better handling of single server reconnect (fixes some bugs) | ||
| * Better test coverage of single server failure | ||
| * Correct handling of callbacks on replicaset servers when firewall dropping packets, correct reconnect | ||
| 0.9.7.1 2011-11-24 | ||
| ------------------ | ||
| * Better handling of dead server for single server instances | ||
| * FindOne and find treats selector == null as {}, Issue #403 | ||
| * Possible to pass in a strategy for the replicaset to pick secondary reader node | ||
| * parameter strategy | ||
| * ping (default), pings the servers and picks the one with the lowest ping time | ||
| * statistical, measures each request and pick the one with the lowest mean and std deviation | ||
| * Set replicaset read preference replicaset.setReadPreference() | ||
| * Server.READ_PRIMARY (use primary server for reads) | ||
| * Server.READ_SECONDARY (from a secondary server (uses the strategy set)) | ||
| * tags, {object of tags} | ||
| * Added replay of commands issued to a closed connection when the connection is re-established | ||
| * Fix isConnected and close on unopened connections. Issue #409, fix by (https://github.com/sethml) | ||
| * Moved reaper to db.open instead of constructor (Issue #406) | ||
| * Allows passing through of socket connection settings to Server or ReplSetServer under the option socketOptions | ||
| * timeout = set seconds before connection times out (default 0) | ||
| * noDelay = Disables the Nagle algorithm (default true) | ||
| * keepAlive = Set if keepAlive is used (default 0, which means no keepAlive, set higher than 0 for keepAlive) | ||
| * encoding = ['ascii', 'utf8', or 'base64'] (default null) | ||
| * Fixes for handling of errors during shutdown off a socket connection | ||
| * Correctly applies socket options including timeout | ||
| * Cleanup of test management code to close connections correctly | ||
| * Handle parser errors better, closing down the connection and emitting an error | ||
| * Correctly emit errors from server.js only wrapping errors that are strings | ||
| 0.9.7 2011-11-10 | ||
| ---------------- | ||
| * Added priority setting to replicaset manager | ||
| * Added correct handling of passive servers in replicaset | ||
| * Reworked socket code for simpler clearer handling | ||
| * Correct handling of connections in test helpers | ||
| * Added control of retries on failure | ||
| * control with parameters retryMiliSeconds and numberOfRetries when creating a db instance | ||
| * Added reaper that will timeout and cleanup queries that never return | ||
| * control with parameters reaperInterval and reaperTimeout when creating a db instance | ||
| * Refactored test helper classes for replicaset tests | ||
| * Allows raw (no bson parser mode for insert, update, remove, find and findOne) | ||
| * control raw mode passing in option raw:true on the commands | ||
| * will return buffers with the binary bson objects | ||
| * Fixed memory leak in cursor.toArray | ||
| * Fixed bug in command creation for mongodb server with wrong scope of call | ||
| * Added db(dbName) method to db.js to allow for reuse of connections against other databases | ||
| * Serialization of functions in an object is off by default, override with parameter | ||
| * serializeFunctions [true/false] on db level, collection level or individual insert/update/findAndModify | ||
| * Added Long.fromString to c++ class and fixed minor bug in the code (Test case for $gt operator on 64-bit integers, Issue #394) | ||
| * FindOne and find now share same code execution and will work in the same manner, Issue #399 | ||
| * Fix for tailable cursors, Issue #384 | ||
| * Fix for Cursor rewind broken, Issue #389 | ||
| * Allow Gridstore.exist to query using regexp, Issue #387, fix by (https://github.com/kaij) | ||
| * Updated documentation on https://github.com/christkv/node-mongodb-native | ||
| * Fixed toJSON methods across all objects for BSON, Binary return Base64 Encoded data | ||
| 0.9.6-22 2011-10-15 | ||
| ------------------- | ||
| * Fixed bug in js bson parser that could cause wrong object size on serialization, Issue #370 | ||
| * Fixed bug in findAndModify that did not throw error on replicaset timeout, Issue #373 | ||
| 0.9.6-21 2011-10-05 | ||
| ------------------- | ||
| * Reworked reconnect code to work correctly | ||
| * Handling errors in different parts of the code to ensure that it does not lock the connection | ||
| * Consistent error handling for Object.createFromHexString for JS and C++ | ||
| 0.9.6-20 2011-10-04 | ||
| ------------------- | ||
| * Reworked bson.js parser to get rid off Array.shift() due to it allocating new memory for each call. Speedup varies between 5-15% depending on doc | ||
| * Reworked bson.cc to throw error when trying to serialize js bson types | ||
| * Added MinKey, MaxKey and Double support for JS and C++ parser | ||
| * Reworked socket handling code to emit errors on unparsable messages | ||
| * Added logger option for Db class, lets you pass in a function in the shape | ||
| { | ||
| log : function(message, object) {}, | ||
| error : function(errorMessage, errorObject) {}, | ||
| debug : function(debugMessage, object) {}, | ||
| } | ||
| Usage is new Db(new Server(..), {logger: loggerInstance}) | ||
| 0.9.6-19 2011-09-29 | ||
| ------------------- | ||
| * Fixing compatibility issues between C++ bson parser and js parser | ||
| * Added Symbol support to C++ parser | ||
| * Fixed socket handling bug for seldom misaligned message from mongodb | ||
| * Correctly handles serialization of functions using the C++ bson parser | ||
| 0.9.6-18 2011-09-22 | ||
| ------------------- | ||
| * Fixed bug in waitForConnection that would lead to 100% cpu usage, Issue #352 | ||
| 0.9.6-17 2011-09-21 | ||
| ------------------- | ||
| * Fixed broken exception test causing bamboo to hang | ||
| * Handling correctly command+lastError when both return results as in findAndModify, Issue #351 | ||
| 0.9.6-16 2011-09-14 | ||
| ------------------- | ||
| * Fixing a bunch of issues with compatibility with MongoDB 2.0.X branch. Some fairly big changes in behavior from 1.8.X to 2.0.X on the server. | ||
| * Error Connection MongoDB V2.0.0 with Auth=true, Issue #348 | ||
| 0.9.6-15 2011-09-09 | ||
| ------------------- | ||
| * Fixed issue where pools would not be correctly cleaned up after an error, Issue #345 | ||
| * Fixed authentication issue with secondary servers in Replicaset, Issue #334 | ||
| * Duplicate replica-set servers when omitting port, Issue #341 | ||
| * Fixing findAndModify to correctly work with Replicasets ensuring proper error handling, Issue #336 | ||
| * Merged in code from (https://github.com/aheckmann) that checks for global variable leaks | ||
| 0.9.6-14 2011-09-05 | ||
| ------------------- | ||
| * Minor fixes for error handling in cursor streaming (https://github.com/sethml), Issue #332 | ||
| * Minor doc fixes | ||
| * Some more cursor sort tests added, Issue #333 | ||
| * Fixes to work with 0.5.X branch | ||
| * Fix Db not removing reconnect listener from serverConfig, (https://github.com/sbrekken), Issue #337 | ||
| * Removed node_events.h includes (https://github.com/jannehietamaki), Issue #339 | ||
| * Implement correct safe/strict mode for findAndModify. | ||
| 0.9.6-13 2011-08-24 | ||
| ------------------- | ||
| * Db names correctly error checked for illegal characters | ||
| 0.9.6-12 2011-08-24 | ||
| ------------------- | ||
| * Nasty bug in GridFS if you changed the default chunk size | ||
| * Fixed error handling bug in findOne | ||
| 0.9.6-11 2011-08-23 | ||
| ------------------- | ||
| * Timeout option not correctly making it to the cursor, Issue #320, Fix from (https://github.com/year2013) | ||
| * Fixes for memory leaks when using buffers and C++ parser | ||
| * Fixes to make tests pass on 0.5.X | ||
| * Cleanup of bson.js to remove duplicated code paths | ||
| * Fix for errors occurring in ensureIndex, Issue #326 | ||
| * Removing require.paths to make tests work with the 0.5.X branch | ||
| 0.9.6-10 2011-08-11 | ||
| ------------------- | ||
| * Specific type Double for capped collections (https://github.com/mbostock), Issue #312 | ||
| * Decorating Errors with all all object info from Mongo (https://github.com/laurie71), Issue #308 | ||
| * Implementing fixes for mongodb 1.9.1 and higher to make tests pass | ||
| * Admin validateCollection now takes an options argument for you to pass in full option | ||
| * Implemented keepGoing parameter for mongodb 1.9.1 or higher, Issue #310 | ||
| * Added test for read_secondary count issue, merged in fix from (https://github.com/year2013), Issue #317 | ||
| 0.9.6-9 | ||
| ------- | ||
| * Bug fix for bson parsing the key '':'' correctly without crashing | ||
| 0.9.6-8 | ||
| ------- | ||
| * Changed to using node.js crypto library MD5 digest | ||
| * Connect method support documented mongodb: syntax by (https://github.com/sethml) | ||
| * Support Symbol type for BSON, serializes to it's own type Symbol, Issue #302, #288 | ||
| * Code object without scope serializing to correct BSON type | ||
| * Lot's of fixes to avoid double callbacks (https://github.com/aheckmann) Issue #304 | ||
| * Long deserializes as Number for values in the range -2^53 to 2^53, Issue #305 (https://github.com/sethml) | ||
| * Fixed C++ parser to reflect JS parser handling of long deserialization | ||
| * Bson small optimizations | ||
| 0.9.6-7 2011-07-13 | ||
| ------------------ | ||
| * JS Bson deserialization bug #287 | ||
| 0.9.6-6 2011-07-12 | ||
| ------------------ | ||
| * FindAndModify not returning error message as other methods Issue #277 | ||
| * Added test coverage for $push, $pushAll and $inc atomic operations | ||
| * Correct Error handling for non 12/24 bit ids on Pure JS ObjectID class Issue #276 | ||
| * Fixed terrible deserialization bug in js bson code #285 | ||
| * Fix by andrewjstone to avoid throwing errors when this.primary not defined | ||
| 0.9.6-5 2011-07-06 | ||
| ------------------ | ||
| * Rewritten BSON js parser now faster than the C parser on my core2duo laptop | ||
| * Added option full to indexInformation to get all index info Issue #265 | ||
| * Passing in ObjectID for new Gridstore works correctly Issue #272 | ||
| 0.9.6-4 2011-07-01 | ||
| ------------------ | ||
| * Added test and bug fix for insert/update/remove without callback supplied | ||
| 0.9.6-3 2011-07-01 | ||
| ------------------ | ||
| * Added simple grid class called Grid with put, get, delete methods | ||
| * Fixed writeBuffer/readBuffer methods on GridStore so they work correctly | ||
| * Automatic handling of buffers when using write method on GridStore | ||
| * GridStore now accepts a ObjectID instead of file name for write and read methods | ||
| * GridStore.list accepts id option to return of file ids instead of filenames | ||
| * GridStore close method returns document for the file allowing user to reference _id field | ||
| 0.9.6-2 2011-06-30 | ||
| ------------------ | ||
| * Fixes for reconnect logic for server object (replays auth correctly) | ||
| * More testcases for auth | ||
| * Fixes in error handling for replicaset | ||
| * Fixed bug with safe parameter that would fail to execute safe when passing w or wtimeout | ||
| * Fixed slaveOk bug for findOne method | ||
| * Implemented auth support for replicaset and test cases | ||
| * Fixed error when not passing in rs_name | ||
| 0.9.6-1 2011-06-25 | ||
| ------------------ | ||
| * Fixes for test to run properly using c++ bson parser | ||
| * Fixes for dbref in native parser (correctly handles ref without db component) | ||
| * Connection fixes for replicasets to avoid runtime conditions in cygwin (https://github.com/vincentcr) | ||
| * Fixes for timestamp in js bson parser (distinct timestamp type now) | ||
| 0.9.6 2011-06-21 | ||
| ---------------- | ||
| * Worked around npm version handling bug | ||
| * Race condition fix for cygwin (https://github.com/vincentcr) | ||
| 0.9.5-1 2011-06-21 | ||
| ------------------ | ||
| * Extracted Timestamp as separate class for bson js parser to avoid instanceof problems | ||
| * Fixed driver strict mode issue | ||
| 0.9.5 2011-06-20 | ||
| ---------------- | ||
| * Replicaset support (failover and reading from secondary servers) | ||
| * Removed ServerPair and ServerCluster | ||
| * Added connection pool functionality | ||
| * Fixed serious bug in C++ bson parser where bytes > 127 would generate 2 byte sequences | ||
| * Allows for forcing the server to assign ObjectID's using the option {forceServerObjectId: true} | ||
| 0.6.8 | ||
| ----- | ||
| * Removed multiple message concept from bson | ||
| * Changed db.open(db) to be db.open(err, db) | ||
| 0.1 2010-01-30 | ||
| -------------- | ||
| * Initial release support of driver using native node.js interface | ||
| * Supports gridfs specification | ||
| * Supports admin functionality |
-413
| Main Documentation site | ||
| ======================= | ||
| http://christkv.github.com/node-mongodb-native/ | ||
| Install | ||
| ======== | ||
| To install the most recent release from npm, run: | ||
| npm install mongodb | ||
| That may give you a warning telling you that bugs['web'] should be bugs['url'], it would be safe to ignore it (this has been fixed in the development version) | ||
| To install from the latest from the repository, run:: | ||
| npm install path/to/node-mongodb-native | ||
| Community | ||
| ======== | ||
| Check out the google group [node-mongodb-native](http://groups.google.com/group/node-mongodb-native) for questions/answers from users of the driver. | ||
| Introduction | ||
| ======== | ||
| This is a node.js driver for MongoDB. It's a port (or close to a port) of the library for ruby at http://github.com/mongodb/mongo-ruby-driver/. | ||
| A simple example of inserting a document. | ||
| var client = new Db('test', new Server("127.0.0.1", 27017, {})), | ||
| test = function (err, collection) { | ||
| collection.insert({a:2}, function(err, docs) { | ||
| collection.count(function(err, count) { | ||
| test.assertEquals(1, count); | ||
| }); | ||
| // Locate all the entries using find | ||
| collection.find().toArray(function(err, results) { | ||
| test.assertEquals(1, results.length); | ||
| test.assertTrue(results.a === 2); | ||
| // Let's close the db | ||
| client.close(); | ||
| }); | ||
| }); | ||
| }; | ||
| client.open(function(err, p_client) { | ||
| client.collection('test_insert', test); | ||
| }); | ||
| Data types | ||
| ======== | ||
| To store and retrieve the non-JSON MongoDb primitives ([ObjectID](http://www.mongodb.org/display/DOCS/Object+IDs), Long, Binary, [Timestamp](http://www.mongodb.org/display/DOCS/Timestamp+data+type), [DBRef](http://www.mongodb.org/display/DOCS/Database+References#DatabaseReferences-DBRef), Code). | ||
| In particular, every document has a unique `_id` which can be almost any type, and by default a 12-byte ObjectID is created. ObjectIDs can be represented as 24-digit hexadecimal strings, but you must convert the string back into an ObjectID before you can use it in the database. For example: | ||
| // Get the objectID type | ||
| var ObjectID = require('mongodb').ObjectID; | ||
| var idString = '4e4e1638c85e808431000003'; | ||
| collection.findOne({_id: new ObjectID(idString)}, console.log) // ok | ||
| collection.findOne({_id: idString}, console.log) // wrong! callback gets undefined | ||
| Here are the constructors the non-Javascript BSON primitive types: | ||
| // Fetch the library | ||
| var mongo = require('mongodb'); | ||
| // Create new instances of BSON types | ||
| new mongo.Long(numberString) | ||
| new mongo.ObjectID(hexString) | ||
| new mongo.Timestamp() // the actual unique number is generated on insert. | ||
| new mongo.DBRef(collectionName, id, dbName) | ||
| new mongo.Binary(buffer) // takes a string or Buffer | ||
| new mongo.Code(code, [context]) | ||
| new mongo.Symbol(string) | ||
| new mongo.MinKey() | ||
| new mongo.MaxKey() | ||
| new mongo.Double(number) // Force double storage | ||
| The C/C++ bson parser/serializer | ||
| -------- | ||
| From V0.8.0 to V0.9.6.9, the Javascript bson parser was slower than an optional C/C++ bson parser. As of V0.9.6.9+, due to performance improvements in the Javascript parser, the C/C++ parser is deprecated and is not installed by default anymore. | ||
| If you are running a version of this library has the C/C++ parser compiled, to enable the driver to use the C/C++ bson parser pass it the option native_parser:true like below | ||
| // using Deprecated native_parser: | ||
| var client = new Db('integration_tests_20', | ||
| new Server("127.0.0.1", 27017), | ||
| {native_parser:true}); | ||
| The C++ parser uses the js objects both for serialization and deserialization. | ||
| GitHub information | ||
| ======== | ||
| The source code is available at http://github.com/christkv/node-mongodb-native. | ||
| You can either clone the repository or download a tarball of the latest release. | ||
| Once you have the source you can test the driver by running | ||
| $ make test | ||
| in the main directory. You will need to have a mongo instance running on localhost for the integration tests to pass. | ||
| Examples | ||
| ======== | ||
| For examples look in the examples/ directory. You can execute the examples using node. | ||
| $ cd examples | ||
| $ node queries.js | ||
| GridStore | ||
| ========= | ||
| The GridStore class allows for storage of binary files in mongoDB using the mongoDB defined files and chunks collection definition. | ||
| For more information have a look at [Gridstore](https://github.com/christkv/node-mongodb-native/blob/master/docs/gridfs.md) | ||
| Replicasets | ||
| =========== | ||
| For more information about how to connect to a replicaset have a look at [Replicasets](https://github.com/christkv/node-mongodb-native/blob/master/docs/replicaset.md) | ||
| Primary Key Factories | ||
| -------- | ||
| Defining your own primary key factory allows you to generate your own series of id's | ||
| (this could f.ex be to use something like ISBN numbers). The generated the id needs to be a 12 byte long "string". | ||
| Simple example below | ||
| // Custom factory (need to provide a 12 byte array); | ||
| CustomPKFactory = function() {} | ||
| CustomPKFactory.prototype = new Object(); | ||
| CustomPKFactory.createPk = function() { | ||
| return new ObjectID("aaaaaaaaaaaa"); | ||
| } | ||
| var p_client = new Db('integration_tests_20', new Server("127.0.0.1", 27017, {}), {'pk':CustomPKFactory}); | ||
| p_client.open(function(err, p_client) { | ||
| p_client.dropDatabase(function(err, done) { | ||
| p_client.createCollection('test_custom_key', function(err, collection) { | ||
| collection.insert({'a':1}, function(err, docs) { | ||
| collection.find({'_id':new ObjectID("aaaaaaaaaaaa")}, function(err, cursor) { | ||
| cursor.toArray(function(err, items) { | ||
| test.assertEquals(1, items.length); | ||
| // Let's close the db | ||
| p_client.close(); | ||
| }); | ||
| }); | ||
| }); | ||
| }); | ||
| }); | ||
| }); | ||
| Strict mode | ||
| -------- | ||
| Each database has an optional strict mode. If it is set then asking for a collection | ||
| that does not exist will return an Error object in the callback. Similarly if you | ||
| attempt to create a collection that already exists. Strict is provided for convenience. | ||
| var error_client = new Db('integration_tests_', new Server("127.0.0.1", 27017, {auto_reconnect: false}), {strict:true}); | ||
| test.assertEquals(true, error_client.strict); | ||
| error_client.open(function(err, error_client) { | ||
| error_client.collection('does-not-exist', function(err, collection) { | ||
| test.assertTrue(err instanceof Error); | ||
| test.assertEquals("Collection does-not-exist does not exist. Currently in strict mode.", err.message); | ||
| }); | ||
| error_client.createCollection('test_strict_access_collection', function(err, collection) { | ||
| error_client.collection('test_strict_access_collection', function(err, collection) { | ||
| test.assertTrue(collection instanceof Collection); | ||
| // Let's close the db | ||
| error_client.close(); | ||
| }); | ||
| }); | ||
| }); | ||
| Documentation | ||
| ======== | ||
| If this document doesn't answer your questions, see the source of | ||
| [Collection](https://github.com/christkv/node-mongodb-native/blob/master/lib/mongodb/collection.js) | ||
| or [Cursor](https://github.com/christkv/node-mongodb-native/blob/master/lib/mongodb/cursor.js), | ||
| or the documentation at MongoDB for query and update formats. | ||
| Find | ||
| -------- | ||
| The find method is actually a factory method to create | ||
| Cursor objects. A Cursor lazily uses the connection the first time | ||
| you call `nextObject`, `each`, or `toArray`. | ||
| The basic operation on a cursor is the `nextObject` method | ||
| that fetches the next matching document from the database. The convenience | ||
| methods `each` and `toArray` call `nextObject` until the cursor is exhausted. | ||
| Signatures: | ||
| var cursor = collection.find(query, [fields], options); | ||
| cursor.sort(fields).limit(n).skip(m). | ||
| cursor.nextObject(function(err, doc) {}); | ||
| cursor.each(function(err, doc) {}); | ||
| cursor.toArray(function(err, docs) {}); | ||
| cursor.rewind() // reset the cursor to its initial state. | ||
| Useful chainable methods of cursor. These can optionally be options of `find` instead of method calls: | ||
| * `.limit(n).skip(m)` to control paging. | ||
| * `.sort(fields)` Order by the given fields. There are several equivalent syntaxes: | ||
| * `.sort({field1: -1, field2: 1})` descending by field1, then ascending by field2. | ||
| * `.sort([['field1', 'desc'], ['field2', 'asc']])` same as above | ||
| * `.sort([['field1', 'desc'], 'field2'])` same as above | ||
| * `.sort('field1')` ascending by field1 | ||
| Other options of `find`: | ||
| * `fields` the fields to fetch (to avoid transferring the entire document) | ||
| * `tailable` if true, makes the cursor [tailable](http://www.mongodb.org/display/DOCS/Tailable+Cursors). | ||
| * `batchSize` The number of the subset of results to request the database | ||
| to return for every request. This should initially be greater than 1 otherwise | ||
| the database will automatically close the cursor. The batch size can be set to 1 | ||
| with `batchSize(n, function(err){})` after performing the initial query to the database. | ||
| * `hint` See [Optimization: hint](http://www.mongodb.org/display/DOCS/Optimization#Optimization-Hint). | ||
| * `explain` turns this into an explain query. You can also call | ||
| `explain()` on any cursor to fetch the explanation. | ||
| * `snapshot` prevents documents that are updated while the query is active | ||
| from being returned multiple times. See more | ||
| [details about query snapshots](http://www.mongodb.org/display/DOCS/How+to+do+Snapshotted+Queries+in+the+Mongo+Database). | ||
| * `timeout` if false, asks MongoDb not to time out this cursor after an | ||
| inactivity period. | ||
| For information on how to create queries, see the | ||
| [MongoDB section on querying](http://www.mongodb.org/display/DOCS/Querying). | ||
| var mongodb = require('mongodb'); | ||
| var server = new mongodb.Server("127.0.0.1", 27017, {}); | ||
| new mongodb.Db('test', server, {}).open(function (error, client) { | ||
| if (error) throw error; | ||
| var collection = new mongodb.Collection(client, 'test_collection'); | ||
| collection.find({}, {limit:10}).toArray(function(err, docs) { | ||
| console.dir(docs); | ||
| }); | ||
| }); | ||
| Insert | ||
| -------- | ||
| Signature: | ||
| collection.insert(docs, options, [callback]); | ||
| where `docs` can be a single document or an array of documents. | ||
| Useful options: | ||
| * `safe:true` Should always set if you have a callback. | ||
| See also: [MongoDB docs for insert](http://www.mongodb.org/display/DOCS/Inserting). | ||
| var mongodb = require('mongodb'); | ||
| var server = new mongodb.Server("127.0.0.1", 27017, {}); | ||
| new mongodb.Db('test', server, {}).open(function (error, client) { | ||
| if (error) throw error; | ||
| var collection = new mongodb.Collection(client, 'test_collection'); | ||
| collection.insert({hello: 'world'}, {safe:true}, | ||
| function(err, objects) { | ||
| if (err) console.warn(err.message); | ||
| if (err && err.message.indexOf('E11000 ') !== -1) { | ||
| // this _id was already inserted in the database | ||
| } | ||
| }); | ||
| }); | ||
| Note that there's no reason to pass a callback to the insert or update commands | ||
| unless you use the `safe:true` option. If you don't specify `safe:true`, then | ||
| your callback will be called immediately. | ||
| Update; update and insert (upsert) | ||
| -------- | ||
| The update operation will update the first document that matches your query | ||
| (or all documents that match if you use `multi:true`). | ||
| If `safe:true`, `upsert` is not set, and no documents match, your callback | ||
| will be given an error. | ||
| See the [MongoDB docs](http://www.mongodb.org/display/DOCS/Updating) for | ||
| the modifier (`$inc`, `$set`, `$push`, etc.) formats. | ||
| Signature: | ||
| collection.update(criteria, objNew, options, [callback]); | ||
| Useful options: | ||
| * `safe:true` Should always set if you have a callback. | ||
| * `multi:true` If set, all matching documents are updated, not just the first. | ||
| * `upsert:true` Atomically inserts the document if no documents matched. | ||
| Example for `update`: | ||
| var mongodb = require('mongodb'); | ||
| var server = new mongodb.Server("127.0.0.1", 27017, {}); | ||
| new mongodb.Db('test', server, {}).open(function (error, client) { | ||
| if (error) throw error; | ||
| var collection = new mongodb.Collection(client, 'test_collection'); | ||
| collection.update({hi: 'here'}, {$set: {hi: 'there'}}, {safe:true}, | ||
| function(err) { | ||
| if (err) console.warn(err.message); | ||
| else console.log('successfully updated'); | ||
| }); | ||
| }); | ||
| Find and modify | ||
| -------- | ||
| `findAndModify` is like `update`, but it also gives the updated document to | ||
| your callback. But there are a few key differences between findAndModify and | ||
| update: | ||
| 1. The signatures differ. | ||
| 2. You can only findAndModify a single item, not multiple items. | ||
| Signature: | ||
| collection.findAndModify(query, sort, update, options, callback) | ||
| The sort parameter is used to specify which object to operate on, if more than | ||
| one document matches. It takes the same format as the cursor sort (see | ||
| Connection.find above). | ||
| See the | ||
| [MongoDB docs for findAndModify](http://www.mongodb.org/display/DOCS/findAndModify+Command) | ||
| for more details. | ||
| Useful options: | ||
| * `remove:true` set to a true to remove the object before returning | ||
| * `new:true` set to true if you want to return the modified object rather than the original. Ignored for remove. | ||
| * `upsert:true` Atomically inserts the document if no documents matched. | ||
| Example for `findAndModify`: | ||
| var mongodb = require('mongodb'); | ||
| var server = new mongodb.Server("127.0.0.1", 27017, {}); | ||
| new mongodb.Db('test', server, {}).open(function (error, client) { | ||
| if (error) throw error; | ||
| var collection = new mongodb.Collection(client, 'test_collection'); | ||
| collection.findAndModify({hello: 'world'}, [['_id','asc']], {$set: {hi: 'there'}}, {}, | ||
| function(err, object) { | ||
| if (err) console.warn(err.message); | ||
| else console.dir(object); // undefined if no matching object exists. | ||
| }); | ||
| }); | ||
| Save | ||
| -------- | ||
| The `save` method is a shorthand for upsert if the document contains an | ||
| `_id`, or an insert if there is no `_id`. | ||
| Sponsors | ||
| ======== | ||
| Just as Felix Geisendörfer I'm also working on the driver for my own startup and this driver is a big project that also benefits other companies who are using MongoDB. | ||
| If your company could benefit from a even better-engineered node.js mongodb driver I would appreciate any type of sponsorship you may be able to provide. All the sponsors will get a lifetime display in this readme, priority support and help on problems and votes on the roadmap decisions for the driver. If you are interested contact me on [christkv AT g m a i l.com](mailto:christkv@gmail.com) for details. | ||
| And I'm very thankful for code contributions. If you are interested in working on features please contact me so we can discuss API design and testing. | ||
| Release Notes | ||
| ============= | ||
| See HISTORY | ||
| Credits | ||
| ======== | ||
| 1. [10gen](http://github.com/mongodb/mongo-ruby-driver/) | ||
| 2. [Google Closure Library](http://code.google.com/closure/library/) | ||
| 3. [Jonas Raoni Soares Silva](http://jsfromhell.com/classes/binary-parser) | ||
| Contributors | ||
| ============= | ||
| Aaron Heckmann, Christoph Pojer, Pau Ramon Revilla, Nathan White, Emmerman, Seth LaForge, Boris Filipov, Stefan Schärmeli, Tedde Lundgren, renctan, Sergey Ukustov, Ciaran Jessup, kuno, srimonti, Erik Abele, Pratik Daga, Slobodan Utvic, Kristina Chodorow, Yonathan Randolph, Brian Noguchi, Sam Epstein, James Harrison Fisher, Vladimir Dronnikov, Ben Hockey, Henrik Johansson, Simon Weare, Alex Gorbatchev, Shimon Doodkin, Kyle Mueller, Eran Hammer-Lahav, Marcin Ciszak, François de Metz, Vinay Pulim, nstielau, Adam Wiggins, entrinzikyl, Jeremy Selier, Ian Millington, Public Keating, andrewjstone, Christopher Stott, Corey Jewett, brettkiefer, Rob Holland, Senmiao Liu, heroic, gitfy | ||
| License | ||
| ======== | ||
| Copyright 2009 - 2010 Christian Amor Kvalheim. | ||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
-25
| TODO for jan 4 - 2011 | ||
| - Chase down potential memory leak in findAndModify | ||
| - Check compatibility for gridFS between python and js | ||
| - Ensure Gridfs speed is comparable to other solutions | ||
| - Map out python replicaset driver functionality | ||
| ACCOMPLISHED jan 4 - 2011 | ||
| + Chase down potential memory leak in findAndModify | ||
| + Check compatibility for gridFS between python and js | ||
| + Ensure Gridfs speed is comparable to other solutions | ||
| 0.9.7.4-dev | ||
| - Amortize documents (only deserialize when accessed) | ||
| - Mongo tests to handle special Mongos situations | ||
| - If a secondary server disappears don't kill the driver connection | ||
| - Check for new servers coming online (a new secondary server etc) | ||
| - http://api.mongodb.org/python/current/api/pymongo/index.html#pymongo.ReadPreference | ||
| --------------------------------------------------------------------------------------------* Allow secondary read with no master | ||
| * Add lowest response time selection of read server for replicaset using a selectable strategy. First one being using the ping command response time | ||
| * Allow execution of multiple commands against the same server connection when having a connection pool | ||
| * Implement tag support for replicasets | ||
| * Change bson c++ parser to use js objects instead of native c++ objects | ||
| * Whole stack benchmark with profiling to locate where the driver spends time | ||
| * Change bson c++ parser to be stackless to look at performance difference |
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
13190
0.07%627224
-5.86%54
-8.47%1
Infinity%0
-100%