Skip to content

Commit 7bd5637

Browse files
pakastinmbroadst
authored andcommitted
doc(sessions): update documentation for startSession
`MongoClient.prototype.startSession` doesn't take a second argument, or return a Promise. It returns the ClientSession from the mongodb-core.
1 parent 934a43a commit 7bd5637

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/mongo_client.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,7 @@ define.staticMethod('connect', { callback: true, promise: true });
495495
* Starts a new session on the server
496496
*
497497
* @param {object} [options] optional settings for a driver session
498-
* @param {MongoClient~sessionCallback} [callback] The callback called with a newly establish session, or an error if one occurred
499-
* @return {Promise} if no callback is specified, a promise will be returned for the newly established session
498+
* @return {ClientSession} the newly established session
500499
*/
501500
MongoClient.prototype.startSession = function(options) {
502501
options = options || {};

0 commit comments

Comments
 (0)