Skip to content

Commit 168645c

Browse files
jason-price-mongodbjason-price-mongodb
andauthored
DOCSP-23619 cursor example updates (#2810) (#2831)
* DOCSP-23619-cursor-example-updates * DOCSP-23619-cursor-example-updates * DOCSP-23619-cursor-example-updates * DOCSP-23619-cursor-example-updates * DOCSP-23619-cursor-example-updates --------- Co-authored-by: jason-price-mongodb <[email protected]>
1 parent 798259c commit 168645c

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

source/reference/limits.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,8 @@ Sessions
515515
.. code-block:: bash
516516

517517
var session = db.getMongo().startSession()
518-
var sessionId = session.getSessionId().id
518+
var sessionId = session
519+
sessionId // show the sessionId
519520

520521
var cursor = session.getDatabase("examples").getCollection("data").find().noCursorTimeout()
521522
var refreshTimestamp = new Date() // take note of time at operation start

source/reference/method/cursor.maxTimeMS.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ session using the :dbcommand:`refreshSessions` command. For example:
9898
.. code-block:: javascript
9999

100100
var session = db.getMongo().startSession()
101-
var sessionId = session.getSessionId().id
101+
var sessionId = session
102+
sessionId // show the sessionId
102103

103104
var cursor = session.getDatabase("examples").getCollection("data").find().noCursorTimeout()
104105
var refreshTimestamp = new Date() // take note of time at operation start

source/reference/method/cursor.noCursorTimeout.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ session using the :dbcommand:`refreshSessions` command. For example:
5151
.. code-block:: bash
5252

5353
var session = db.getMongo().startSession()
54-
var sessionId = session.getSessionId().id
54+
var sessionId = session
55+
sessionId // show the sessionId
5556

5657
var cursor = session.getDatabase("examples").getCollection("data").find().noCursorTimeout()
5758
var refreshTimestamp = new Date() // take note of time at operation start

0 commit comments

Comments
 (0)