Skip to content

Commit 1746fb8

Browse files
jason-price-mongodbjason-price-mongodb
andauthored
DOCSP-23619 cursor example updates (#2810) (#2832)
* 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 7c8846f commit 1746fb8

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
@@ -538,7 +538,8 @@ Sessions
538538
.. code-block:: bash
539539

540540
var session = db.getMongo().startSession()
541-
var sessionId = session.getSessionId().id
541+
var sessionId = session
542+
sessionId // show the sessionId
542543

543544
var cursor = session.getDatabase("examples").getCollection("data").find().noCursorTimeout()
544545
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)