Skip to content

Commit

Permalink
doc(sessions): update documentation for startSession
Browse files Browse the repository at this point in the history
`MongoClient.prototype.startSession` doesn't take a second argument, or return a Promise. It returns the ClientSession from the mongodb-core.
  • Loading branch information
pakastin authored and mbroadst committed Feb 23, 2018
1 parent 934a43a commit 7bd5637
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/mongo_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,7 @@ define.staticMethod('connect', { callback: true, promise: true });
* Starts a new session on the server
*
* @param {object} [options] optional settings for a driver session
* @param {MongoClient~sessionCallback} [callback] The callback called with a newly establish session, or an error if one occurred
* @return {Promise} if no callback is specified, a promise will be returned for the newly established session
* @return {ClientSession} the newly established session
*/
MongoClient.prototype.startSession = function(options) {
options = options || {};
Expand Down

0 comments on commit 7bd5637

Please sign in to comment.